Re: Possible interest in a webcast/presentation about Django site with 40mil+ rows of data??

2011-06-29 Thread Wagner Vaz
Please, count me in. On Jun 22, 2011 10:15 AM, "Cal Leeming [Simplicity Media Ltd]" < cal.leem...@simplicitymedialtd.co.uk> wrote: > Hi all, > > Some of you may have noticed, in the last few months I've done quite a few > posts/snippets about handling large data sets in Django. At the end of this >

Managing objects spred among several tables/databases.

2011-06-29 Thread qMax
Hello here. My application task is to integrate several applications, and it should manipulate objects, spread among several tables in several databases. Final object is constructed by 'joining' tables by single field (or derivatives). A user should see such objects as solid entities and manipulat

Re: unable to import Modules Present in subdirectores

2011-06-29 Thread Kenneth Gonsalves
On Wed, 2011-06-29 at 03:51 -0400, srinivasan panneer wrote: > For example I have Views.py is it Views.py or views.py? -- regards KG http://lawgon.livejournal.com Coimbatore LUG rox http://ilugcbe.techstud.org/ -- You received this message because you are subscribed to the Google Groups "Djang

Re: Comparing ManyToManyFields

2011-06-29 Thread Josh Lothian
Heh, whoops. So I'm reading in all the information about a machine from a file that is generated periodically on the machine (XML right now). I need to compare all the data about that machine to what's currently in the database, and create a new entry if anything has changed. The models are re

Re: Comparing ManyToManyFields

2011-06-29 Thread Andre Terra
You'll first have to explain what you mean by 'reading from a file' and 'comparing'. Are we comparing against serialized model exports? Is the user importing data from a csv file? What column(s) is(are) you using as keys for matching db objects against the file? Give us a little more details and

Re: ImportError: No module named site

2011-06-29 Thread Andre Terra
As you can see from your urls.py, there is a reference to admin.site and that is probably what's not working on your setup. Try this: $ ./manage.py shell >>> import django >>> django.get_version() >>> from django.contrib import admin >>> admin.site ..and see how far you can go before the first ex

Re: Possible interest in a webcast/presentation about Django site with 40mil+ rows of data??

2011-06-29 Thread Matteius
If I am unable to attend at the scheduled time I absolutely must watch the resulting recording. Thanks for your efforts. On Jun 22, 5:50 pm, "Cal Leeming [Simplicity Media Ltd]" wrote: > Nice! > > On Wed, Jun 22, 2011 at 11:39 PM, Thomas Weholt > wrote: > > > > > > > On Wed, Jun 22, 2011 at 4:4

Re: getting objects unique in several ways (annotate?)

2011-06-29 Thread Michał Sawicz
Dnia 2011-06-29, śro o godzinie 16:31 -0700, elliot pisze: > Book.objects.annotate(mostrecent = Max('transaction__start_date')) .values('pk') Or whatever values you want. -- Michał Sawicz signature.asc Description: This is a digitally signed message part

getting objects unique in several ways (annotate?)

2011-06-29 Thread elliot
Sorry about the vague title. Its hard for me to summarize this in one short sentence. Lets say I have two models (using pseudo code): Book(model.Model): name = charfield() Transaction(model.Model): start_date = DateTimeField() item = ManytoMany(Book) recipient = CharField() Now for ever

How to make comment view redirect me directly to my next field instead to preview view

2011-06-29 Thread Ariel
Hi everybody, I am using comments framework in django, but I need that when the comment form is not valid the comment post view doens't send me to a preview view to show me the errors in the form instead of that I need the view send me directly to the 'next' url and show me there the form errors. A

Re: Global generic files? Best practice(s)?

2011-06-29 Thread Micky Hulse
Hi Andre! Thanks so much for the reply, I really appreciate the help! :) On Wed, Jun 29, 2011 at 9:51 AM, Andre Terra wrote: > If you're using it for multiple apps, but just one project and the apps are > project-specific, then this code could very well lie in your project's > utils.py or any ot

Re: let the users download files

2011-06-29 Thread Jagdeep Singh Malhi
On Jun 29, 10:34 am, pankaj sharma wrote: > hello friends , > i have a database in which i have some files say photos... Why you store you files in database? You need to store the path of file in database and files area stored in that path or folder. > {i am uploading photos from django admin.}

ImportError: No module named site

2011-06-29 Thread Kyle Latham
I searched this group for that error, and browsed through several pages and dozens of posts...but none of them helped me solve my error. Yesterday I had my server up and running, and I left it running overnight. I do not remember changing anything in any of my .py files, but when I shut down my se

Re: Global generic files? Best practice(s)?

2011-06-29 Thread Andre Terra
If you're using it for multiple apps, but just one project and the apps are project-specific, then this code could very well lie in your project's utils.py or any other module. If you're writing code that's meant to be reused by third-parties, then the picture is rather different. I recently had a

Re: unable to import Modules Present in subdirectores

2011-06-29 Thread Andre Terra
This can't be stressed enough. Please read http://www.python.org/dev/peps/pep-0008/ and try to follow it as best as you can. Sincerely, André Terra On Wed, Jun 29, 2011 at 12:26 PM, bruno desthuilliers < bruno.desthuilli...@gmail.com> wrote: > > > On Jun 29, 3:41 pm, Bill Freeman wrote: > >

Re: "attempt to write a readonly database" with write permissions in database file and folder

2011-06-29 Thread Anoop Thomas Mathew
Hi, Seems selinux permissions are causing trouble. Try shutting it off and try again. Regards, Anoop On 29 Jun 2011 21:03, "hectoraka" wrote: > Hello, > > I am getting the "attempt to write a readonly database" when trying to > access the admin site. I have read that this is usually due to > incor

"attempt to write a readonly database" with write permissions in database file and folder

2011-06-29 Thread hectoraka
Hello, I am getting the "attempt to write a readonly database" when trying to access the admin site. I have read that this is usually due to incorrect permissions but the error persists even if I make the database file and folder writable by all: database file: -rw-rw-rw-. 1 hector developers 40

Re: Possible interest in a webcast/presentation about Django site with 40mil+ rows of data??

2011-06-29 Thread Cal Leeming [Simplicity Media Ltd]
Wow, that sucks! :X Never known a corp to block google docs On Wed, Jun 29, 2011 at 2:16 PM, Andre Terra wrote: > Can't access google spreadsheets through my corporate proxy (go figure), > but I will vote later today. > > Really interested in watching this! > > > Andre > > On Tue, Jun 28, 2011 a

Re: unable to import Modules Present in subdirectores

2011-06-29 Thread bruno desthuilliers
On Jun 29, 3:41 pm, Bill Freeman wrote: > A couple of basic python things for you to check: (...) > 2: Python imported names are case sensitive, even if your filesystem > is not.  Thus you cannot import a module named "Views.py" using the > name "views", as in "polls.views".  You would have to u

Media (JS/CSS) handling outsite Forms

2011-06-29 Thread Thomas Guettler
Hi, inside Forms including of JS/CSS files is solved: You use the Media-Object. But outside Forms? I have a python method which returns a HTML snippet, which gets included in several views. It requires a JS file How do you handle this dependency? One solution would be to add all needed medi

Vs: how to override a ModelChoiceField in order to add FKs directly in a TextInput?

2011-06-29 Thread Martin Pajuste
Since ModelChoiceField validates that the given id exists in the queryset, there can be no valid choices when you use MyRelatedClass.objects.none(). Try MyRelatedClass.objects.all() or filter by some attribute. If the queryset depends on some user input or conditions you can use something like:

Re: unable to import Modules Present in subdirectores

2011-06-29 Thread Bill Freeman
A couple of basic python things for you to check: 1: You must have a file named "__init__.py" (it may be an empty file) in any directory that is to occur before a "." in an import statement. The presence of this file makes the directory a "package", just like having a name ending in ".py" makes a

Re: unable to import Modules Present in subdirectores

2011-06-29 Thread Tim Shaffer
You do have a __init__.py file in each of the sub folders, correct? -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/G33m7AMAv7wJ. To post to this group, sen

Re: Possible interest in a webcast/presentation about Django site with 40mil+ rows of data??

2011-06-29 Thread Andre Terra
Can't access google spreadsheets through my corporate proxy (go figure), but I will vote later today. Really interested in watching this! Andre On Tue, Jun 28, 2011 at 12:30 PM, Cal Leeming [Simplicity Media Ltd] < cal.leem...@simplicitymedialtd.co.uk> wrote: > Second call for anyone who wants

Database partition strategies and scalability advice

2011-06-29 Thread Jake D
Hello all, I'm in the development stage of my web app, and I'm trying to think about model partitioning early. There are some messages on this topic before there was robust support for multiple databases in Django, and I wanted to get some advice from the experts, now that routers are easy to use.

Re: Curious int/float/division/math 'gotcha' in py (discussion)

2011-06-29 Thread Cal Leeming [Simplicity Media Ltd]
Thanks for explaining this Geoff. My math is somewhat basic, so it's always good to learn new things like this. On 29 Jun 2011 08:00, "Geoff Kuenning" wrote: > > > On Jun 29, 1:37 am, Tom Evans wrote: >> Damn, this was the bit I meant to comment upon - hard and fast rules >> are dangerous. Integr

Re: Curious int/float/division/math 'gotcha' in py (discussion)

2011-06-29 Thread Cal Leeming
Thanks for explaining this Geoff. My math is somewhat basic, so it's always good to learn new things like this. On 29 Jun 2011 08:00, "Geoff Kuenning" wrote: > > > On Jun 29, 1:37 am, Tom Evans wrote: >> Damn, this was the bit I meant to comment upon - hard and fast rules >> are dangerous. Integr

unable to import Modules Present in subdirectores

2011-06-29 Thread srinivasan panneer
Hi Guys I am very new to Python and Django and having problem with importing modules in my project, I am following the tutorial, which i downloaded from django website. Where I have the following folder hierarchy in my Django project.(using Pycharm IDE) HelloWorldDjangoHelloWorldDjango/HelloWor

Re: Curious int/float/division/math 'gotcha' in py (discussion)

2011-06-29 Thread Geoff Kuenning
On Jun 29, 1:37 am, Tom Evans wrote: > Damn, this was the bit I meant to comment upon - hard and fast rules > are dangerous. Integral types are distinctly different to floating > point types, and you should be aware of which one you are using and > why. You definitely should not be using floats