Re: Queryset-refactor branch has been merged into trunk

2008-04-27 Thread Julien
Thanks Malcolm for this huge contribution! I switched a quite big live project to the new trunk and it's working really well so far. Cheers, Julien On Apr 28, 3:23 pm, simonbun <[EMAIL PROTECTED]> wrote: > So qs-rf hit trunk and was merged into nfa on the same day! That's > excellent news,

Re: Queryset-refactor branch has been merged into trunk

2008-04-27 Thread simonbun
So qs-rf hit trunk and was merged into nfa on the same day! That's excellent news, both for me and for django. Thanks so much for your efforts Malcolm (and Brosner for the quick merge)! regards, Simon Malcolm Tredinnick wrote: > I merged queryset-refactor into trunk just now. This was changeset

Re: multiple children in multitable inheritance

2008-04-27 Thread Malcolm Tredinnick
On Sun, 2008-04-27 at 21:43 -0700, AmanKow wrote: > Thanks for the reply, Malcolm. > > Between what you wrote above and just creating the models and looking > at the tables and indexes generated clarified the whole thing for > me... > > My purposes are similar to what I was attempting with the

Re: multiple children in multitable inheritance

2008-04-27 Thread AmanKow
Thanks for the reply, Malcolm. Between what you wrote above and just creating the models and looking at the tables and indexes generated clarified the whole thing for me... My purposes are similar to what I was attempting with the above example, with people instead of places (they can be any or

Re: [Django Code] #7101: ordering ForeignKey(self) =FieldError: Infinite loop caused by ordering.

2008-04-27 Thread Malcolm Tredinnick
On Sun, 2008-04-27 at 23:19 -0500, Carl Karsten wrote: [...] > order_by('parent_id') doesn't do anything for the Admin UI, which is where I > 'need' this. I made a typo. It should be 'parent__id' there (double underscore). You're manually telling Django to order by one level, using the

Re: [Django Code] #7101: ordering ForeignKey(self) =FieldError: Infinite loop caused by ordering.

2008-04-27 Thread Carl Karsten
Django Code wrote: > #7101: ordering ForeignKey(self) =FieldError: Infinite loop caused by > ordering. > -+-- >Reporter: Carl Karsten <[EMAIL PROTECTED]> |Owner: > nobody > Status:

Re: Django Performance Discoveries Part 1

2008-04-27 Thread rich
Yes, I too am at a similar level of confusion as to when django is not thread safe. I assume this could happen only if I explicitly create new threads myself, or if I use some non-django module that isn't itself thread safe. Would be fantastic if someone could clarify this! many thanks

Re: Queryset-refactor branch has been merged into trunk

2008-04-27 Thread sserrano
Thanks for the great work!!! On Apr 27, 12:04 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > I merged queryset-refactor into trunk just now. This was changeset > r7477. > > There are still a couple of enhancements to do, but I've decided they're > not worth holding up the entire branch for.

MySQL-python-1.2.2 - install errors

2008-04-27 Thread [EMAIL PROTECTED]
Hello, Can anyone help me with these errors: python setup.py buildrunning build running build_py copying MySQLdb/release.py -> build/lib.macosx-10.5-i386-2.5/MySQLdb running build_ext building '_mysql' extension gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused- madd

displaying subsets of data from an existing model in the admin panel

2008-04-27 Thread steve skelton
I have created a django app that loads and displays all the data from the db from the papers link on the admin panel. i'd like to add links that just display subsets of the db but have not figured out quite how to do this -- some views do work but what i need is to allow the user to view and

NEW WEB 2.0 GIVES YOU A CHANCE!

2008-04-27 Thread ktwon73
Hello, I found this new FULL INTERNET UPGRADE technology that is about to upgrade THE ENTIRE INTERNET to Web 2.0 standards and IT'S FREE! Plus, they are giving away ONE MILLION DOLLARS to spread the word about it - and you can get a share for helping - NO COST! Check it out at:

Re: Grrr, can't import custom template tag

2008-04-27 Thread Jay
Even more frustrating is that I just checked in the python shell and can successfully load paginate: #python Python 2.5.1 (r251:54863, Mar 7 2008, 03:39:23) [GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2 Type "help", "copyright", "credits" or "license" for more

Grrr, can't import custom template tag

2008-04-27 Thread Jay
Hi, all. I think I have an uncommon problem here--I've been looking into it for hours, and it's driving me crazy. I'm trying to install a custom paginator template tag in Django revision 7403. I'm getting the error message: 'paginate' is not a valid tag library: Could not load template

Re: accessing dictionary values in a template for loop

2008-04-27 Thread Malcolm Tredinnick
On Sun, 2008-04-27 at 13:35 -0500, Alex Ezell wrote: [...] > Depending on the version of Django you are using, you should be able to do > this: > > {% for key, value in results %} > > {{ key }} > {{ value }} > > {% endfor %} Or, for older versions: {% for item in

Re: multiple children in multitable inheritance

2008-04-27 Thread Malcolm Tredinnick
On Sun, 2008-04-27 at 11:14 -0700, AmanKow wrote: [...] > class Place(models.Model): > name = models.CharField(max_length=50) > address = models.CharField(max_length=80) > > class Restaurant(Place): > serves_hot_dogs = models.BooleanField() > serves_pizza = models.BooleanField()

Re: Large file upload to Amazon S3?

2008-04-27 Thread Derek Hoy
I'm using boto for uploading short mp3 files of around 20MB and it's working fine. It's easy to use so you should be able to test it without much trouble. The main things with s3 is to sort out the location of your buckets (US or European...) and remember to set the permissions on each file you

Re: Updating django forms makes me...

2008-04-27 Thread Darryl Ross
notfound wrote: I think it has refreshed itself somehow, and when I refresh the page finally it shows me my form. However only sometimes. Usually each second refresh I'm getting the correct form, but inbetween I still see the error. It sounds like some of the Apache children have reached the

[nf-admin] Accessing field initial values on change_form.html

2008-04-27 Thread Ariel Mauricio Nunez Gomez
Hi everyone, I am trying to access the fields values on then admin/includes/fieldset.htmltemplate. I know I can access the verbose label name with {{ field.label_tag

Re: Odd Multi Select Behavior

2008-04-27 Thread Alex Ezell
On Sun, Apr 27, 2008 at 1:42 PM, James Bennett <[EMAIL PROTECTED]> wrote: > On Sun, Apr 27, 2008 at 1:39 PM, Alex Ezell <[EMAIL PROTECTED]> wrote: > > but if I log the value of "request.POST['point_list']" I see this: > > > > 37​.​4482804​,-​122​.​12251 > > > > It's like it doesn't

Re: Odd Multi Select Behavior

2008-04-27 Thread James Bennett
On Sun, Apr 27, 2008 at 1:39 PM, Alex Ezell <[EMAIL PROTECTED]> wrote: > but if I log the value of "request.POST['point_list']" I see this: > > 37​.​4482804​,-​122​.​12251 > > It's like it doesn't know that it's a list. This makes it problematic > to do anything with the values in

Odd Multi Select Behavior

2008-04-27 Thread Alex Ezell
Hi, I have a select field in my HTML (not a forms widget, but just raw HTML). When the form is submitted to the view, I get some odd results. The select field is changed to a multiple select on submit and all the options are selected automatically via javascript. If I log the value of

Re: accessing dictionary values in a template for loop

2008-04-27 Thread Alex Ezell
On Sun, Apr 27, 2008 at 1:27 PM, RaviKondamuru <[EMAIL PROTECTED]> wrote: > > Hi, > I have the following lines of code to access the key, values in a > template for loop. > > > > {% for key in results %} > > {{ key|escape }} > {{ results.key }} >

Re: New Project : Django Sites Integration

2008-04-27 Thread Bryan Veloso
Hey Mike, I can add this to the Django Plugables directory if you'd like. Let me know. :) Cheers, Bryan On Apr 27, 10:36 am, Mike H <[EMAIL PROTECTED]> wrote: > Oh, and it automatically filters the model's querysets by the current   > site. Kinda important that it does that, and I forgot to

multiple children in multitable inheritance

2008-04-27 Thread AmanKow
Thanks so much for qsrf, my excitement is off the charts! I have a question about whether I am going about the following the right way. I would like to have a model that is subclassed several time, where it is possible for a child to point at the same parent as another child in another

UnicodeDecodeError in request.get_full_path()

2008-04-27 Thread Amit Ramon
Hi, I'm getting a random, wierd UnicodeDecodeError when calling request.get_full_path() in one of my views. This specific view displays some search reaults, and the error always occurs when a user selects the second results page (results are paginated). The query string is UTF-8 encoded, and

libgmail KeyError

2008-04-27 Thread NoobStick
Hi guys and gals, I am receiving this error Exception Type: KeyError Exception Value:'GMAIL_AT' Exception Location: C:\Python25\lib\site-packages\libgmail.py in _getActionToken, line 562 I have made all of the other necessary changes to get it up and functioning to this

Re: New Project : Django Sites Integration

2008-04-27 Thread Mike H
Oh, and it automatically filters the model's querysets by the current site. Kinda important that it does that, and I forgot to mention it, heh. Cheers, Mike On 27 Apr 2008, at 18:29, Mike H wrote: > > Hi all, > > I've been putting together a site using projects from >

New Project : Django Sites Integration

2008-04-27 Thread Mike H
Hi all, I've been putting together a site using projects from djangopluggables.com. It's been going great, except in one area. My site is going to run across various subdomains, and you will see different groups, forums, blog etc. depending on which subdomain you go to (it's like a

Large file upload to Amazon S3?

2008-04-27 Thread truebosko
Hi there, Recently been toying with the idea of using Amazon S3 to host a bunch of media for a community site I run For small files, Amazon S3 is slick and awesome. But I also want to have the ability to upload larger files. With the standard Amazon S3 library this is just not feasible (It dies

Re: Queryset-refactor branch has been merged into trunk

2008-04-27 Thread TP
Great! I tried trunk as of a few minutes ago with a moderately complicated project I have using MySQL and everything seems to work fine. Will keep testing it over the next few days and report any problems. On Apr 26, 11:04 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > I merged

Re: Reverse relations, select_related, and the Queryset Refactor Branch

2008-04-27 Thread Trey
Are one to one fields going to allow reverse select_related style caching? I thought that Queryset Refactor might have included this but no such luck. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

re:FIND SOME GREAT DEALS ON GAMES,DVD,MUSIC

2008-04-27 Thread kev
hi guys check out> http://www.find-a-great-deal.blogspot.com http://www.find-a-deal.blogspot.com http://www.niceeasy-cash.blogspot.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Re: ForeignKey = True invalid

2008-04-27 Thread steve skelton
never mind! figured it out - just moved blank=True after the FK name. sorry! On Apr 27, 11:13 am, steve skelton <[EMAIL PROTECTED]> wrote: > i am setting up an app based on existing data and have several drop- > downs on the admin page to display various standard choices. i do not > want to

Re: Complex Django Hosting

2008-04-27 Thread jonknee
> I do wish it was easier to get Django running on MediaTemple. I'll > probably give it one more go, as it really shouldn't be as hard as it > seems and I'm not exactly a novice at this sort of thing... If I can > get that working, a (dv) or several would definitely be one pretty > easy way of

Re: Complex Django Hosting

2008-04-27 Thread Josh
So it sounds like the best three options are (in no particular order): 1. Remain with Webfaction. 2. Move to Slicehost. 3. Move to a colocated server. Obviously this is something that will require discussion with my client, but I'm perfectly capable of managing a colocated server, so the main

HPV - should I vaccinate my daughter?

2008-04-27 Thread HPV VACCINE STUDY
Dear everyone, Thank you for clicking on our post. We would like to invite you to take part in an university project that we are conducting in our capacity as students at the University of Birmingham, UK. Your responses are entirely confidential and we will not be asking for details that can

Re: Updating django forms makes me...

2008-04-27 Thread James Bennett
On Sun, Apr 27, 2008 at 10:28 AM, notfound <[EMAIL PROTECTED]> wrote: > What could be the reason here that it sometimes works, sometimes does not? Multiple server processes; each one has its own copy of the code, and refreshes independently. -- "Bureaucrat Conrad, you are technically correct

Re: Updating django forms makes me...

2008-04-27 Thread notfound
2008/4/27 James Bennett <[EMAIL PROTECTED]>: > > On Sun, Apr 27, 2008 at 7:17 AM, notfound <[EMAIL PROTECTED]> wrote: > > No, that's a hosted server, I don't have access to Apache > > unfortunately. Is there any other way I could make it reload the code? > > Not really, no. In a production

Re: Updating django forms makes me...

2008-04-27 Thread Matthew Miller
You could always download your project and work locally with some dummy data, using SQLite and use: python manage.py runserver. Upon deployment dont forget to switch the settings.py file back. notfound wrote: > 2008/4/27 James Bennett <[EMAIL PROTECTED]>: > >> On Sun, Apr 27, 2008 at 7:17

Re: SUM on a model

2008-04-27 Thread dimrub
In addition to the above, you can have a field in your model, that will contain that sum, and update it in your save(). It may not be as beneficial with sum() as it is with some other functions that work on multiple rows. 陈亮 wrote: > Hi there, > I've googled a lot on how to get the sum of a

Re: SUM on a model

2008-04-27 Thread James Bennett
On Sun, Apr 27, 2008 at 8:47 AM, Darryl Ross <[EMAIL PROTECTED]> wrote: > I use: > >total = sum([obj.amount for obj in Model.objects.all()]) As of the merge of qsrf, this will also work: total = sum(Model.objects.values_list('amount', flat=True)) Plus there's the SoC project which

Re: Updating django forms makes me...

2008-04-27 Thread Karen Tracey
On Sun, Apr 27, 2008 at 9:33 AM, notfound <[EMAIL PROTECTED]> wrote: > > 2008/4/27 James Bennett <[EMAIL PROTECTED]>: > > > > On Sun, Apr 27, 2008 at 7:17 AM, notfound <[EMAIL PROTECTED]> > wrote: > > > No, that's a hosted server, I don't have access to Apache > > > unfortunately. Is there

Re: SUM on a model

2008-04-27 Thread Darryl Ross
陈亮 wrote: Hi there, I've googled a lot on how to get the sum of a integer field for all the objects of a model. There are some solutions. But none of them looks like a standard way to do so. Does django have this feature? I use: total = sum([obj.amount for obj in

SUM on a model

2008-04-27 Thread 陈亮
Hi there, I've googled a lot on how to get the sum of a integer field for all the objects of a model. There are some solutions. But none of them looks like a standard way to do so. Does django have this feature? Leon --~--~-~--~~~---~--~~ You received this

Re: Updating django forms makes me...

2008-04-27 Thread notfound
2008/4/27 James Bennett <[EMAIL PROTECTED]>: > > On Sun, Apr 27, 2008 at 7:17 AM, notfound <[EMAIL PROTECTED]> wrote: > > No, that's a hosted server, I don't have access to Apache > > unfortunately. Is there any other way I could make it reload the code? > > Not really, no. In a production

Re: Updating django forms makes me...

2008-04-27 Thread James Bennett
On Sun, Apr 27, 2008 at 7:17 AM, notfound <[EMAIL PROTECTED]> wrote: > No, that's a hosted server, I don't have access to Apache > unfortunately. Is there any other way I could make it reload the code? Not really, no. In a production deployment, the code stays resident in memory for the life

Re: Queryset-refactor branch has been merged into trunk

2008-04-27 Thread kamil
I wish god will pay you Malcolm. ;) It's a great news for django community. thanx --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: PicklingError with Queryset Refactor

2008-04-27 Thread Malcolm Tredinnick
On Sun, 2008-04-27 at 05:45 -0700, Julien wrote: > Thanks Malcolm, I turned the queryset into a list, and it worked: > sidebar["countries"] = [country for country in > Country.objects.exclude(id=1).order_by('name')] list(Country.objects.exclude(id=1).order_by('name') will be faster and less

Re: Django Performance Discoveries Part 1

2008-04-27 Thread Prairie Dogg
I'm still trying to wrap my head around what the advantages of worker MPM are, I've read a couple articles that have started me down this road - the consensus view seems to be worker MPM w/ mod_wsgi is the best way to go from a memory and separtion of concerns POV, the only potential drawback

Re: PicklingError with Queryset Refactor

2008-04-27 Thread Julien
Thanks Malcolm, I turned the queryset into a list, and it worked: sidebar["countries"] = [country for country in Country.objects.exclude(id=1).order_by('name')] Now, just out of curiosity, why didn't I get an error before using queryset refactor. I can't be sure that the caching actually

Re: PicklingError with Queryset Refactor

2008-04-27 Thread Malcolm Tredinnick
On Sun, 2008-04-27 at 22:27 +1000, Malcolm Tredinnick wrote: [...] > Querysets aren't picklable. It's really hard! I'll work on it at some > point, but... it's really hard! To be more specific: I know what has to be done and have something half-implemented. It's fairly deep internals stuff,

Re: PicklingError with Queryset Refactor

2008-04-27 Thread Malcolm Tredinnick
On Sun, 2008-04-27 at 05:16 -0700, Julien wrote: > Hi, > > I'm back again with an issue that I got since upgrading to queryset- > refactor. That issue appears at run time. Every page on my site caches > the sidebar, which contains some expensive randomly generated content. > Since I upgraded to

Re: Updating django forms makes me...

2008-04-27 Thread notfound
2008/4/27 Daniel Roseman <[EMAIL PROTECTED]>: > > On Apr 27, 11:11 am, notfound <[EMAIL PROTECTED]> wrote: > > ...I won't say it. :> > > > > (Previously posted to django-developers, but seems it was not the right > > group.) > > > > Anyway, I need to update a questionnaire on Django site.

Re: Updating django forms makes me...

2008-04-27 Thread Daniel Roseman
On Apr 27, 11:11 am, notfound <[EMAIL PROTECTED]> wrote: > ...I won't say it. :> > > (Previously posted to django-developers, but seems it was not the right > group.) > > Anyway, I need to update a questionnaire on Django site. Enough to say I > don't have anything in common neither with Django,

Re: Complex Django Hosting

2008-04-27 Thread imgrey
On Apr 25, 6:44 pm, Josh <[EMAIL PROTECTED]> wrote: > I'm working on what will end up being a large, high-traffic, multi- > site project. Currently we're just using a basic Webfaction account > for hosting during development and testing, but I'm trying to figure > out what would be the best

Re: Compilation error since Queryset Refactor upgrade

2008-04-27 Thread Julien
Wow, thanks for you super-fast help Malcolm!! I updated and it indeed fixed the issue. Thanks also for the tip on providing a more detail code example. Will try to do that next time. Cheers, Julien On Apr 27, 9:46 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Sun, 2008-04-27 at 04:37

Re: Compilation error since Queryset Refactor upgrade

2008-04-27 Thread Malcolm Tredinnick
On Sun, 2008-04-27 at 04:37 -0700, Julien wrote: > Hi, > > I've just tried to run an existing project work with the newly merged > queryset-refactor branch. > > The code does not even compile any more, and I haven't found any help > (or I missed it) on the wiki page [1]. The error I get is: >

Compilation error since Queryset Refactor upgrade

2008-04-27 Thread Julien
Hi, I've just tried to run an existing project work with the newly merged queryset-refactor branch. The code does not even compile any more, and I haven't found any help (or I missed it) on the wiki page [1]. The error I get is: AttributeError: 'Options' object has no attribute '_name_map' The

Re: Django Performance Discoveries Part 1

2008-04-27 Thread rich
Thanks for sharing! My setup is similar to yours except I don't use nginx at all - just another apache virtual host for media.mysite.com. Not sure which is best, but one less moving part from my point of view? I haven't done any load testing, but I really like the way mod_wsgi works; I use it

Re: Updating django forms makes me...

2008-04-27 Thread notfound
notfound wrote: > > Anyway, I need to update a questionnaire on Django site. Enough to say I > don't have anything in common neither with Django, nor with Python. Well, > saying the truth today I have seen Python code for the very first time. > (Usually I'm into PHP.) > > Having a quick look

Updating django forms makes me...

2008-04-27 Thread notfound
...I won't say it. :> (Previously posted to django-developers, but seems it was not the right group.) Anyway, I need to update a questionnaire on Django site. Enough to say I don't have anything in common neither with Django, nor with Python. Well, saying the truth today I have seen Python

Re: Queryset-refactor branch has been merged into trunk

2008-04-27 Thread Simon Willison
On Apr 27, 8:48 am, Thierry <[EMAIL PROTECTED]> wrote: > What's the current opinion about integrating sql alchemy into the > backend of django's ORM? There's an active project to do exactly that hosted here: http://gitorious.org/projects/django-sqlalchemy/ Some of the features in

Re: Queryset-refactor branch has been merged into trunk

2008-04-27 Thread Thierry
What's the current opinion about integrating sql alchemy into the backend of django's ORM? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Queryset-refactor branch has been merged into trunk

2008-04-27 Thread [EMAIL PROTECTED]
I was just thinking last night about how nice it will be to get this into trunk and there it is! :) Now I'm thinking how nice it would be for Malcolm to send me $10,000... will let you all know how it works out. Seriously - great work and congrats on what must be a relief to finally get to the

Re: edit inline in newforms

2008-04-27 Thread Russell Keith-Magee
On Sun, Apr 27, 2008 at 2:36 PM, Ramdas S <[EMAIL PROTECTED]> wrote: > Thanks, > > > Where do I find some stuff to read on formsets. Google does not throw up > anything except a few discussions on this topic. I'm looking for some sort > of documentation official/unofficial. Does it exist

Re: edit inline in newforms

2008-04-27 Thread Ramdas S
Thanks, Where do I find some stuff to read on formsets. Google does not throw up anything except a few discussions on this topic. I'm looking for some sort of documentation official/unofficial. Does it exist somewhere Ramdas On Sat, Apr 26, 2008 at 10:35 AM, Russell Keith-Magee < [EMAIL

Re: Disabling autoescaping when calling render_to_string

2008-04-27 Thread Darryl Ross
On Sat, Apr 26, 2008 at 9:38 PM, Darryl Ross <[EMAIL PROTECTED]> wrote: So my question is, is there an argument which will disable auto-escaping? Nevermind me, the version of code I was reading on my dev machine through was older than I thought, pre-autoescaping. I did an update and there

Re: Django Performance Discoveries Part 1

2008-04-27 Thread Almir Karic
On Sun, Apr 27, 2008 at 7:16 AM, Prairie Dogg <[EMAIL PROTECTED]> wrote: > Perhaps more on this to come. yes please :-) thanks for posting it -- error: one bad user found in front of screen --~--~-~--~~~---~--~~ You received this message because you are