On 03/07/12 05: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 because
> you develop and t
@googlegroups.com
Subject: I think adding a "first" method to the QuerySet be useful.
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 d
Hi all,
On Tue, 3 Jul 2012, Łukasz Rekucki wrote:
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 e
We shouldn't bloat the API. Obviously there are nice looking approaches and
not to mention the different behaviour in some of them.
-1 on this proposal from me.
On Tuesday, July 3, 2012 8:22:59 AM UTC+3, Łukasz Rekucki wrote:
>
> On 3 July 2012 06:27, Maxime Haineault wrote:
> > One of the co
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 because you
> develop and
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 in dev because you
> d
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.
de