> +1 for the first syntax. The others are duplicating functionality > that is already present via more aptly named methods. The first > syntax is also more consistent with other ORMs.
Seconded. Seems much more obvious, simple and explicit than the other options to me. On Thursday, 28 February 2013 00:37:53 UTC, Ian wrote: > > On Wed, Feb 27, 2013 at 3:34 PM, Wim Feijen <[email protected]<javascript:>> > wrote: > > Which style do you prefer? > > > > .filter(last_name__startswith='b').order_by('last_name').first() # > clear > > and long > > .first(last_name__startswith='b').order_by('last_name') # first > method > > has filter syntax. > > .filter(last_name__startswith='b').first('last_name') # first method > has > > order_by syntax. > > +1 for the first syntax. The others are duplicating functionality > that is already present via more aptly named methods. The first > syntax is also more consistent with other ORMs. > -- You received this message because you are subscribed to the Google Groups "Django developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/django-developers?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
