Hi,
I wanted to have a functionality to be able to edit the comments posted
using the comments app (not from the admin, from the site and only for
logged in users). As much as I know Django, to render an edit form we need
to pass an instance of the object to the form which has to be edited lik
On Tuesday, July 3, 2012 9:42:28 AM UTC-4, Luke Granger-Brown wrote:
>
> In new versions of virtualenv the default has changed to
> --no-site-packages, at least on Linux. Is this not also the case for
> Windows?
>
> Luke
>
> Unfortunately, it is the same for windows. Every python project that
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
Shouldn’t it make sense to make it:
User.objects.first() ?
I assume first() is just a custom method on the objects manager, which would
mean you could chain them, and so have objects.all().first(); this also makes
the code more readable in a template:
{{ users.first }} as opposed to {{ users.a
On Jul 3, 2012 1:59 PM, "Chris Wilson" wrote:
>
> Hi Reinout,
>
>
> On Tue, 3 Jul 2012, Reinout van Rees wrote:
>
>> On 30-06-12 16:22, Luke Plant wrote:
>>>
>>> Also, in Django to date we've eschewed external dependencies. That has
>>> been partly due to the poor and confusing state of Python pac
Hi Reinout,
On Tue, 3 Jul 2012, Reinout van Rees wrote:
On 30-06-12 16:22, Luke Plant wrote:
Also, in Django to date we've eschewed external dependencies. That has
been partly due to the poor and confusing state of Python packaging,
which is hopefully improving.
[snip]
Our current recommende
On 30-06-12 16:22, Luke Plant wrote:
Also, in Django to date we've eschewed external dependencies. That has
been partly due to the poor and confusing state of Python packaging,
which is hopefully improving.
[snip]
Our current recommended installation method is via pip [2], and we would
be doing
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