Re: I think adding a "first" method to the QuerySet be useful.

2012-07-02 Thread Łukasz Rekucki
On 3 July 2012 06:27, Maxime Haineault wrote: > One of the common pitfall I come across way to often with novices is > something like this: > > def getFirstUser(): > return User.objects.all()[0] > > It looks innocuous and often wont raise any exceptions in dev

Re: I think adding a "first" method to the QuerySet be useful.

2012-07-02 Thread Alex Gaynor
On Mon, Jul 2, 2012 at 9:27 PM, Maxime Haineault wrote: > One of the common pitfall I come across way to often with novices is > something like this: > > def getFirstUser(): > return User.objects.all()[0] > > It looks innocuous and often wont raise any exceptions

I think adding a "first" method to the QuerySet be useful.

2012-07-02 Thread Maxime Haineault
One of the common pitfall I come across way to often with novices is something like this: def getFirstUser(): return User.objects.all()[0] It looks innocuous and often wont raise any exceptions in dev because you develop and test with data, so they slip easily in production.

Re: Proposal: use SQLAlchemy Core for query generation

2012-07-02 Thread zzzeek
On Jul 2, 5:57 am, Anssi Kääriäinen wrote: > In step 1 Django constantly keeps the correct join information and > filtering conditions available. These are ready to be converted into > SQL on the spot. In addition, some information is kept available, but > it isn't

Re: Proposal: use SQLAlchemy Core for query generation

2012-07-02 Thread zzzeek
On Jul 1, 12:53 pm, Andrew Godwin wrote: > > Ah, interesting. Alembic doesn't appear to support fully mutating SQLite > databases, which is the really gnarly part of the South code I'd love to > outsource. Looks like there's still plenty of work to be done no matter > what

Re: horizontal alignment of forms in a formset without ajax

2012-07-02 Thread Karen Tracey
Please ask questions about using Django on django-users. The topic of this list is the development of Django itself. Karen -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to

horizontal alignment of forms in a formset without ajax

2012-07-02 Thread Abhishek Sharma
hi, I am novice on django, so does anyone know how to align forms in a formset (which i have defined in a view) horizontally overriding the default vertical alignment without using ajax on the formset. -- You received this message because you are subscribed to the Google Groups "Django

Re: Proposal: use SQLAlchemy Core for query generation

2012-07-02 Thread Anssi Kääriäinen
On 1 heinä, 00:11, Luke Plant wrote: > On 30/06/12 20:23, Anssi Kääriäinen wrote: > > > TL;DR ;) But I intend to do so shortly. > > > For now I have to comment on the "clear up sql/query.py" part. I am > > doubtful if moving to SQLAlchemy will solve the sql/query.py and

Re: Proposal: use SQLAlchemy Core for query generation

2012-07-02 Thread Harro
Ehhm, version numbers aren't decimal numers. 2.0 doesn't have to wait for 1.9. Maybe even drop python 2 for django 2.0? Harro On Saturday, 30 June 2012 21:25:07 UTC+2, Jacob Kaplan-Moss wrote: > > Wow. There's really a lot to think about here, and I'm only just > starting. Thanks for putting