Re: Re: Bug in tests/modeltests/basic doctests?

2006-12-18 Thread Russell Keith-Magee
On 12/19/06, ogghead <[EMAIL PROTECTED]> wrote: > > Thanks for the guidance, Russ. Adding ordering = ('pub_date',) fixes > the issue and also seems to match the intent of the doctests. I > submitted a bug and a patch at > http://code.djangoproject.com/ticket/3164 . Fixed in [4228]. There was a

Re: proposal: get_or_none QuerySet method

2006-12-18 Thread Waylan Limberg
Nice job Honza. I was about to suggest just about the same, but hesitated because of the *args and **kwargs. I just wasn't sure why that made me hesitate. On 12/18/06, SmileyChris <[EMAIL PROTECTED]> wrote: > > On Dec 19, 11:08 am, "Waylan Limberg" <[EMAIL PROTECTED]> wrote: > > something like th

Re: proposal: get_or_none QuerySet method

2006-12-18 Thread SmileyChris
On Dec 19, 11:08 am, "Waylan Limberg" <[EMAIL PROTECTED]> wrote: > something like this: > > user = User.objects.get(pk=user_id, default=None) Except this would break (or at least limit the functionality of) objects which use "default" as a field name. --~--~-~--~~~--

Re: Oracle: call for testing

2006-12-18 Thread Matt Boersma
Here is the current status of Oracle support: - Some of the backend files are already in subversion trunk, but not enough to make it functional. Don't bother testing (or patching) Oracle support in the trunk--the branch is where the action is. - Some Colorado developers, along with Jacob Kaplan-

Re: proposal: get_or_none QuerySet method

2006-12-18 Thread Honza Král
On 12/18/06, Waylan Limberg <[EMAIL PROTECTED]> wrote: > > On 12/18/06, Gary Wilson <[EMAIL PROTECTED]> wrote: > > > > I often find myself writing code like: > > > > try: > > user = User.objects.get(pk=user_id) > > except User.DoesNotExist: > > user = None > > > > What do you think about ad

Re: proposal: get_or_none QuerySet method

2006-12-18 Thread Waylan Limberg
On 12/18/06, Gary Wilson <[EMAIL PROTECTED]> wrote: > > I often find myself writing code like: > > try: > user = User.objects.get(pk=user_id) > except User.DoesNotExist: > user = None > > What do you think about adding a get_or_none QuerySet method? > > def get_or_none(self, **kwargs): >

proposal: get_or_none QuerySet method

2006-12-18 Thread Gary Wilson
I often find myself writing code like: try: user = User.objects.get(pk=user_id) except User.DoesNotExist: user = None What do you think about adding a get_or_none QuerySet method? def get_or_none(self, **kwargs): try: return self.get(**kwargs) except self.model.DoesNotEx

Re: Oracle: call for testing

2006-12-18 Thread McA
Hi ogghead, I'm just new to django and would like to give it a try. I need Oracle support and therefore searched around. Could you explain, what the current status of Oracle support is? How can the tests you mentioned be done. I don't know how to do them in my environment. Are changes from trunk

Re: File Uploads Problem

2006-12-18 Thread [EMAIL PROTECTED]
Anyone got any ideas on this one --~--~-~--~~~---~--~~ 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

Re: Contributing to Oracle database backend code

2006-12-18 Thread ogghead
The introspection methods get_relations() and get_indexes() are implemented for Oracle in the boulder-oracle-sprint branch. The SQL was tricky and may still be incorrect--we haven't had time to test "python manage.py inspectdb" much as we are still working on more basic functionality. I'll paste

Re: Bug in tests/modeltests/basic doctests?

2006-12-18 Thread ogghead
Thanks for the guidance, Russ. Adding ordering = ('pub_date',) fixes the issue and also seems to match the intent of the doctests. I submitted a bug and a patch at http://code.djangoproject.com/ticket/3164 . --~--~-~--~~~---~--~~ You received this message becau

Re: [Proposal]newforms render can use subtemplate

2006-12-18 Thread Rob Hudson
limodou wrote: > I saw that newforms has meny output methods, just like: as_table, > as_p, as_ul, etc, and someone also want to add as_dl. And I also saw > that the output is hardcoded in the source code. In my personal > woodlog project, I made an easyform app, and I can render a form with > a su

Re: DateFormat should use MONTHS_3 ?

2006-12-18 Thread Gael Chardon
Adrian Holovaty a écrit : > On 12/18/06, Gael Chardon <[EMAIL PROTECTED]> wrote: > > There is an unicode problem with DateFormat and the 3 letters month > > format, especially for the french translation and its august month. > > Since Hugo has committed a dedicated list for this case, it would be

Re: Getters and setters on fields

2006-12-18 Thread Jeremy Bowers
I got burned this weekend with authentication users, setting passwords on them directly during construction. (I knew I had to call set_password to change the password but I had gotten the idea I could pass 'password' into the constructor and get it handled correctly.) If my getters/setters pat

Re: New firebird backend using the boulder-oracle-sprint branch

2006-12-18 Thread David Elias
Make sure you are using the boulder-oracle-sprint branch and your PYTHONPATH is pointing to that. Fabio Gomes wrote: > I tried it and i m getting this error: > > > File "/usr/lib/python2.4/site-packages/django/db/backends/firebird/base.py", > line 100, in quote_name > name = '"%s"' % util.t

Re: DateFormat should use MONTHS_3 ?

2006-12-18 Thread Gael Chardon
Adrian Holovaty a écrit : > On 12/18/06, Gael Chardon <[EMAIL PROTECTED]> wrote: > > There is an unicode problem with DateFormat and the 3 letters month > > format, especially for the french translation and its august month. > > Since Hugo has committed a dedicated list for this case, it would be

Client.raw_post

2006-12-18 Thread Afternoon
A little while ago there was a discussion[1] about test cases that post raw data such as XML or JSON to a view. Russ suggested adding a raw_post method to the test Client to facilitate such tests. I've created a ticket and uploaded a patch that does just this. http://code.djangoproject.com/ticket

Re: New firebird backend using the boulder-oracle-sprint branch

2006-12-18 Thread Fabio Gomes
I tried it and i m getting this error: File "/usr/lib/python2.4/site-packages/django/db/backends/firebird/base.py", line 100, in quote_name name = '"%s"' % util.truncate_name(name.upper(), get_max_name_length()) AttributeError: 'module' object has no attribute 'truncate_name' Any ideas?

Re: DateFormat should use MONTHS_3 ?

2006-12-18 Thread Adrian Holovaty
On 12/18/06, Gael Chardon <[EMAIL PROTECTED]> wrote: > There is an unicode problem with DateFormat and the 3 letters month > format, especially for the french translation and its august month. > Since Hugo has committed a dedicated list for this case, it would be > very helpful to commit its use i

Handling exceptions raised while processing requests from django.test.client.Client

2006-12-18 Thread Afternoon
Currently any exception raised by a view or other request machinery while handling a request from the test client is hidden from the requesting test case by Django's exception views (500, error debug). I have created a patch and a ticket for an enhancement which reraises exceptions with the origin

Re: New firebird backend using the boulder-oracle-sprint branch

2006-12-18 Thread Fabio Gomes
Thanx man, i ll test it right away. I was trying to hack your old one, but i didnt figure out why some generators weren´t created, so i was having some problems. -- Forwarded message -- From: David Elias <[EMAIL PROTECTED]> Date: Dec 18, 2006 1:14 PM Subject: New firebird backend

New firebird backend using the boulder-oracle-sprint branch

2006-12-18 Thread David Elias
Please check http://code.djangoproject.com/ticket/1261 David Elias --~--~-~--~~~---~--~~ 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

Re: Regarding the copy of forms -> oldforms

2006-12-18 Thread Waylan Limberg
On 12/18/06, Michael Radziej <[EMAIL PROTECTED]> wrote: > > Hi, > > in changeset 4208 all the code from django/forms was copied to > django/oldforms. Isn't that a little bit twisted? Now there's the > same code twice, and any future patch for forms needs to address > both trees. > But only for th

Regarding the copy of forms -> oldforms

2006-12-18 Thread Michael Radziej
Hi, in changeset 4208 all the code from django/forms was copied to django/oldforms. Isn't that a little bit twisted? Now there's the same code twice, and any future patch for forms needs to address both trees. This may not be a big problem for the core development of django, but I guess ther

DateFormat should use MONTHS_3 ?

2006-12-18 Thread Gael Chardon
Hello, As mentionned in some threads http://groups.google.fr/group/django-users/browser_thread/thread/fd04c7662e535c99/354f80e82cc5a98 and http://groups.google.fr/group/django-developers/browse_frm/thread/ad769db3e291a0c/ce82f0d44ce01ae4 There is an unicode problem with DateFormat and the 3 lette