Re: Only Email + Password ( without username )

2010-01-14 Thread Alexander Dutton
On 14/01/10 09:51, nameless wrote: > I am asking whether is a good solution to having 2 fields with the > same value ( username and email ) because both are required. > Or is there another solution ? > This depends on whether you don't want distinct usernames hanging around, or you simply want

Re: unicode encoding problem

2010-01-04 Thread Alexander Dutton
Hi Bill, Simon, On 04/01/10 16:05, Bill Freeman wrote: > I find the error slightly confusing because the mentioned character, > \xc2, which is capital A with circumflex, doesn't occur in the quoted > part of the text. \xc2 is the first byte of a character encoded in UTF-8 as two bytes. The

Re: return a dynamically generated image to the user?

2009-12-10 Thread Alexander Dutton
Hi Mark On 10/12/09 16:45, Mark Freeman wrote: > I have recently created a python module which parses an input string > and invokes the program lilypond to generate a music score image. All > of this works fine as a standalone python app. I'm now looking to add > this to my django site so users

psycopg2 and "idle in transaction" messages

2009-12-10 Thread Alexander Dutton
Hi all, As of last Thursday we've been seeing ~100% CPU usage from Apache, which we believe was caused by Debian Bug #528529[0], whereby psycopg2 was attempting to double free pointers, resulting in segfaults. This was then (we think) leaving database connections open, resulting in postgres

Class-based views, metaclasses and view validation

2009-11-25 Thread Alexander Dutton
principle. My only concern is that with such levels of indirection and 'advanced features', it may be a little daunting for any new developers -- I didn't know anything about metaclasses or how method binding actually works until yesterday. Yours, Alex [0] Simon Willison seems to talk about them

Re: with statements

2009-08-16 Thread Alexander Dutton
On 16/08/09 09:50, GuyBowden wrote: > Hi All, > > Just wondering what the best way to do this sort of thing is: > > {% with last_tweet_sent this_user as sent_at %} > {{ sent_at|naturalday:_("MONTH_DAY_FORMAT")|capfirst}} > {% endwith %} > > I've got a function "last_tweet_sent" in a

Re: How to get DATABASE_NAME

2009-08-16 Thread Alexander Dutton
On 16/08/09 09:38, Maksymus007 wrote: > On Sun, Aug 16, 2009 at 10:30 AM, adelaide_mike > wrote: >> In my reporting function I need to have: >> >> If DATABASE_NAME = x: >>#do this >> Else: >>#do the other >> >> How can I obtain that name, which is established

Re: Simple filter query throwing up an error

2008-02-10 Thread Alexander Dutton
Hi Darthmahon, You probably want "from datetime import datetime" at the top, as now() is buried a bit deeper into the module tree than you'd expected. That said, isn't your query going to return everything that's happening at the very instant the query is run? You probably want something