Re: Database race conditions when using multiple processes

2006-10-17 Thread Thomas Steinacher
James Bennett wrote: > On 10/16/06, gabor <[EMAIL PROTECTED]> wrote: > > would you use something in the db? (from what i know about transactions > > (very little :), they "solve" the potential conflicts by simply > > reporting an error-condition to one of the "writers", so then he has to > > retry

Re: Why doesn't models.Manager implement __iter__?

2006-10-17 Thread orestis
Does this caching of QuerySets live beyond one request ? I assume each thread gets its own cache, right ? For us poor users of shared hosting, where we're using multiple processes that are killed and respawned many times, this isn't very helpful... Unless I haven't understood all this, in that c

Re: feature request: Bonjour support

2006-10-17 Thread Guillermo Fernandez Castellanos
Hi, There is a pyzeroconf module [1] and it seems pretty easy to use [2]. Just find in the code where it does assign the IP address, and insert the 15 lines you need to advert the service. Should be pretty easy. Now, the problemis, Django tries to use as little dependencies as possible, and this

Re: Why doesn't models.Manager implement __iter__?

2006-10-17 Thread Michael Radziej
orestis schrieb: > Does this caching of QuerySets live beyond one request ? I assume each > thread gets its own cache, right ? > > For us poor users of shared hosting, where we're using multiple > processes that are killed and respawned many times, this isn't very > helpful... > > Unless I haven

Re: Database race conditions when using multiple processes

2006-10-17 Thread Michael Radziej
Thomas Steinacher schrieb: > James Bennett wrote: >> On 10/16/06, gabor <[EMAIL PROTECTED]> wrote: >>> would you use something in the db? (from what i know about transactions >>> (very little :), they "solve" the potential conflicts by simply >>> reporting an error-condition to one of the "writers

Re: Why doesn't models.Manager implement __iter__?

2006-10-17 Thread orestis
Yep :) Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL

XHTML vs. HTML4 and csrf middleware in particular

2006-10-17 Thread Michael Radziej
Hi, I have to start with a little background. There's the still interesting issue of what media type you give to your pages and whether to use html4 or xhtml. Large part of Django seems to use xhtml, and I like it somehow better than html, so I use it and give to browsers that accept it appl

Re: XHTML vs. HTML4 and csrf middleware in particular

2006-10-17 Thread Antonio Cavedoni
Hi Michael, On 17 Oct 2006, at 12:00, Michael Radziej wrote: > Large part of Django seems to use xhtml, and I like it somehow > better than html, so I use it and give to browsers that accept it > application/xhtml+xml as media type (and to others I feed the same > input but call it text/htm

Re: XHTML vs. HTML4 and csrf middleware in particular

2006-10-17 Thread Michael Radziej
Antonio Cavedoni schrieb: > Hi Michael, > > On 17 Oct 2006, at 12:00, Michael Radziej wrote: >> Large part of Django seems to use xhtml, and I like it somehow >> better than html, so I use it and give to browsers that accept it >> application/xhtml+xml as media type (and to others I feed the

Re: XHTML vs. HTML4 and csrf middleware in particular

2006-10-17 Thread James Bennett
On 10/17/06, Michael Radziej <[EMAIL PROTECTED]> wrote: > What is the current policy? Should this output be xhtml conform > or not? Policy for Django? There isn't one, so far as I know. Policy for the web in general? Good luck with that :) > The point is, and that goes above the csrf message, I

Re: Database race conditions when using multiple processes

2006-10-17 Thread Thomas Steinacher
Michael Radziej wrote: > It seems you need to spend more thoughts on multi user issues > within your application. It's easy to fall for that in the > beginning, but you need to deal with concurrent access. You must > be aware for all transactions what impact other transactions can > have. There is

Re: Re: Database race conditions when using multiple processes

2006-10-17 Thread James Bennett
On 10/17/06, Thomas Steinacher <[EMAIL PROTECTED]> wrote: > Shouldn't there be a function built-in into Django that locks the table > (if the database supports it)? IMHO functions like get_or_create() > should try to lock and unlock the table automatically. No, no, a thousand times no :) Even th

Re: Database race conditions when using multiple processes

2006-10-17 Thread Michael Radziej
James Bennett schrieb: > On 10/17/06, Thomas Steinacher <[EMAIL PROTECTED]> wrote: >> Shouldn't there be a function built-in into Django that locks the table >> (if the database supports it)? IMHO functions like get_or_create() >> should try to lock and unlock the table automatically. > > No, no,

Re: Re: Database race conditions when using multiple processes

2006-10-17 Thread James Bennett
On 10/17/06, Michael Radziej <[EMAIL PROTECTED]> wrote: > I bet you mean that get_or_create shouldn't lock the table. > That's really not a good idea. I meant Django should never implicitly/automatically lock a table; if you decide you need to lock, you should have to explicitly call something. I

defining outer joins

2006-10-17 Thread Michael Radziej
Hi, I was looking for an easy way to define extra outer joins. It turned out that it's easy to extend the QuerySet.extra method with a 'joins' argument used like this: notes = Note.objects.select_related().extra( joins=['''left outer join %s rel1 on rel1.id=%s.release_beginn_id

Re: Database race conditions when using multiple processes

2006-10-17 Thread Hawkeye
Michael Radziej wrote: > > What about > SELECT ... FOR UPDATE > ) Michael, I know you're already aware of this (heck, you're CCed on the ticket), but for others... I created a patch in ticket http://code.djangoproject.com/ticket/2705 to allow a .for_update() modifier to be applied to a QuerySet

Re: XHTML vs. HTML4 and csrf middleware in particular

2006-10-17 Thread Antonio Cavedoni
On 17 Oct 2006, at 12:21, Michael Radziej wrote: > Antonio, you're probably suffering from a severe read-only-first- > paragraph syndrome here. Proposed cure is to read email again until > bottom hits ;-) Michael: you’re right, I’m a moron :-) Sorry for wasting everyone’s time. Cheers. -- A

Re: Proposal: Forms and BoundForms

2006-10-17 Thread Andrew Durdin
I'm sorry to say that I missed the thread "Proposal: Forms and BoundForms" last month. I'm very interested in the topic, largely because, having run out of patience with manipulators, I had written code to handle form definition, validation, and rendering that is similar to the proposals describe

Re: bump: give Gabor (or somebody else) a unicode branch in svn

2006-10-17 Thread JP
Malcolm Tredinnick wrote: > And my apologies to use, JP: I still haven't gotten around to reviewing > all the changes as I promised I would. It's not forgotten, more that > Life has gotten in the way of Fun Projects a lot lately and there aren't > enough hours in the day. No need to apologize. Th

Re: Call for testing: New setup.py

2006-10-17 Thread dummy
Hi, one diff for MANIFEST.in. The docs/*.txt of bdist_rpm are missing! Regards, Dirk -- GMX DSL-Flatrate 0,- Euro* - Überall, wo DSL verfügbar ist! NEU: Jetzt bis zu 16.000 kBit/s! http://www.gmx.net/de/go/dsl --~--~-~--~~~---~--~~ You received this message beca

Re: feature request: Bonjour support

2006-10-17 Thread Clint Ecker
Not to mention it's only going to satisfy an extremely small niche. How many people are actually developing Django apps in Safari on OS X? Most developers I know on OS X (myself and my office included) aren't using Safari in any capacity. Seems like adding complexity and dependencies for no good

Re: feature request: Bonjour support

2006-10-17 Thread Michael Twomey
Turbogears just uses the command line tools if they are available, no need to drag in any library dependencies. Another advantage of this approach is that it works on any platform with the bonjour command line tools, not just the mac. You can see it in action here: http://www.turbogears.org/svn/t

Re: feature request: Bonjour support

2006-10-17 Thread Cheng Zhang
On Oct 17, 2006, at 11:50 PM, Michael Twomey wrote: > Turbogears just uses the command line tools if they are available, no > need to drag in any library dependencies. Another advantage of this > approach is that it works on any platform with the bonjour command > line tools, not just the mac. >

Re: Call for testing: New setup.py

2006-10-17 Thread James Crasta
works here, python 2.5, linux x86_64 (gentoo) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from thi

Re: Call for testing: New setup.py

2006-10-17 Thread DavidA
Works on Windows 2003 Server SP1 + Python 2.4.2 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from

Re: Call for testing: New setup.py

2006-10-17 Thread DavidA
DavidA wrote: > Works on Windows 2003 Server SP1 + Python 2.4.2 I spoke too soon. I tried to run 'manage.py test' and it complained about an invalid action so I poked around and the management.py in C:\Python24\lib\site-packages\django\core was different than the one in the SVN checkout director

Re: Call for testing: New setup.py

2006-10-17 Thread DavidA
DavidA wrote: > I spoke too soon. I _really_ spoke too soon. I tried again as 'python setup.py install' rather than 'setup.py install' and it worked. For some reason my file type mapping on this particular Win box was mucked up. --~--~-~--~~~---~--~~ You receiv

Modification in the django.db.backends.postgresql.base

2006-10-17 Thread Rafael SDM Sierra
Hi, Trying to make Django to use really only ONE connection to ONE process (like 1000 Threads using 1 connection) I've altered postgresql backend at base.py. The beta (aka bugged) version is here: http://pastebin.com/808647 My question is if this alteration (turn the connection variable to be a C

Re: Data for globalization

2006-10-17 Thread GinTon
I see that it isn't interesting for django developers so "I go away with the music to another part". In the first I prefer to work with another community where there is more support. --~--~-~--~~~---~--~~ You received this message because you are subscribed to th

Re: Data for globalization

2006-10-17 Thread Russell Keith-Magee
On 10/18/06, GinTon <[EMAIL PROTECTED]> wrote: > > I see that it isn't interesting for django developers so "I go away > with the music to another part". > > In the first I prefer to work with another community where there is > more support. Don't read too much into the lack of response; the core

Re: Modification in the django.db.backends.postgresql.base

2006-10-17 Thread Mario Gonzalez ( mario__ )
On 17/10/06, Rafael SDM Sierra <[EMAIL PROTECTED]> wrote: > ps2.: I need this a lot becouse I'm using FreeBSD, and it start only 50 > connections simultaneously, but my system use but you can change that and default, postgres support 100 connections (2 for superuser) > -- http://www.advogato

Re: defining outer joins

2006-10-17 Thread Russell Keith-Magee
On 10/17/06, Michael Radziej <[EMAIL PROTECTED]> wrote: > > I guess this is currently under a freeze. I just wanted to bring > it up for discussion. If there's serious interest, I can flesh it > out (docs, testcases) later when the winter^H^H^H^H^H^H^H freeze > is over. You can already specify th

Re: Modification in the django.db.backends.postgresql.base

2006-10-17 Thread Rafael SDM Sierra
On 10/17/06, Mario Gonzalez ( mario__ ) <[EMAIL PROTECTED]> wrote: On 17/10/06, Rafael SDM Sierra <[EMAIL PROTECTED]> wrote:> ps2.: I need this a lot becouse I'm using FreeBSD, and it start only 50> connections simultaneously, but my system use   but you can change that and default, postgres suppor

Re: Call for testing: New setup.py

2006-10-17 Thread sbain
I missed the previous discussion, but I'm not pleased with this change. The developer version of Django is made available only via Subversion, so the requirement for internet access at install is hardly a disadvantage. Django is, after all, a web framework! The best way to install development Dj

Re: Re: Call for testing: New setup.py

2006-10-17 Thread James Bennett
On 10/17/06, sbain <[EMAIL PROTECTED]> wrote: > The developer version of Django is made available only via Subversion, > so the requirement for internet access at install is hardly a > disadvantage. Django is, after all, a web framework! It is, but the setuptools requirement of an active internet

Re: Call for testing: New setup.py

2006-10-17 Thread sbain
Is there any reason to use either setuptools or distutils if one is doing an automated install of Django? Isn't it just copy or link the django directory to the Python path, copy django-admin.py to an executable path, and you are pretty much done? How would one now recommend that a new Windows de