Re: select_related() changes

2007-01-09 Thread [EMAIL PROTECTED]
Updated paste: http://dpaste.com/hold/4539/ Should be no problems now :) On Jan 10, 8:22 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Code Source:http://dpaste.com/hold/4538/ > > This replaces django/db/query.py and adds two arguments for > select_related(): > > depth=N, the recursion de

select_related() changes

2007-01-09 Thread [EMAIL PROTECTED]
Code Source: http://dpaste.com/hold/4538/ This replaces django/db/query.py and adds two arguments for select_related(): depth=N, the recursion depth, by default, infinite, follows any key where blank isn't True fields=[], a list of fields, right now only supports fields from the base table. I'd

neforms - shouldn't IntegerField return None on empty?

2007-01-09 Thread Honza Král
Hi all, if integer field is not required and left empty, clean_data contains '' (an empty string), which will fail when you try to insert it into DB via model as: m = Model( ** clean-data ) m.save() patch: Index: django/newforms/fields.py ==

Re: newforms widget idea

2007-01-09 Thread dummy
Hi Adrian, > This would be a nice addition indeed, but I agree with Honza that the > following syntax would be better: > >choices =( >( 'Group name 1', [(1, 'one'), (2,'two')]), >( 'Group name 2', [(3, 'three'), (2,'four')]), >) > > Would you be willing to rework your patc

Re: Have a look at django.newforms

2007-01-09 Thread Nicola Larosa (tekNico)
Adrian Holovaty wrote: > The try/except in this case is meant to handle the case in which > somebody is using newforms without the rest of Django, which was an > early goal of mine. Since then, I've sort of resigned myself to > requiring Django, due to ties into the internationalization hooks and

Re: Have a look at django.newforms

2007-01-09 Thread Adrian Holovaty
On 1/9/07, serbaut <[EMAIL PROTECTED]> wrote: > fields.py tries to get settings.URL_VALIDATOR_USER_AGENT with: > > try: > from django.conf import settings > URL_VALIDATOR_USER_AGENT = settings.URL_VALIDATOR_USER_AGENT > except ImportError: > # It's OK if Django settings aren't configur

Re: Have a look at django.newforms

2007-01-09 Thread serbaut
fields.py tries to get settings.URL_VALIDATOR_USER_AGENT with: try: from django.conf import settings URL_VALIDATOR_USER_AGENT = settings.URL_VALIDATOR_USER_AGENT except ImportError: # It's OK if Django settings aren't configured. URL_VALIDATOR_USER_AGENT = 'Django (http://www.djan

Re: newforms: Choices don't accept unicode values

2007-01-09 Thread jfroehlich
Adrian Holovaty wrote: > Hi Johannes, > > Could you update your code to at least revision 4296? I believe I've > fixed the problem. Thanks again for reporting it. Hi Adrian Thanks for this quick response and fix. I keep up to date on trunk since I'm really interested in the development there. T