Re: DateTimeField auto_now / auto_now_add and UTC

2007-10-25 Thread Joe Holloway
On 10/24/07, SmileyChris <[EMAIL PROTECTED]> wrote: > > > Is there a way to get the > > auto_now/auto_now_add feature of DateTimeField to use UTC? > > Those methods suck and hopefully will be removed. Use a callable > default instead of auto_now_add (or overridden save instead of > auto_now, like

DateTimeField auto_now / auto_now_add and UTC

2007-10-24 Thread Joe Holloway
I'm looking to store UTC date/times so I don't have to worry about time zones until I localize the display. From looking at the code in DateTimeField I think I've answered my own question, but I just want to ask here for the sake of conversation. Is there a way to get the auto_now/auto_now_add fe

bypassing reverse relation (related_name)

2007-10-17 Thread Joe Holloway
I'm finding that I have quite a few many-to-one relations that don't really need the reverse relation to be expressed in the object model. For example, class Route(models.Model): start = models.ForeignKey (Location) destination = models.ForeignKey (Location) The default related_name clas

Re: TypeError: str() takes at most 1 argument (4 given)

2007-09-19 Thread Joe Holloway
On 9/19/07, Joe Holloway <[EMAIL PROTECTED]> wrote: > On 9/19/07, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote: > > > > On 9/19/07, Joe Holloway <[EMAIL PROTECTED]> wrote: > > > Anyone give me a nudge in the right direction? > > > > Posting t

Re: TypeError: str() takes at most 1 argument (4 given)

2007-09-19 Thread Joe Holloway
On 9/19/07, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote: > > On 9/19/07, Joe Holloway <[EMAIL PROTECTED]> wrote: > > Anyone give me a nudge in the right direction? > > Posting the model you're working with is gonna help quite a bit. > Chances are you'v

TypeError: str() takes at most 1 argument (4 given)

2007-09-19 Thread Joe Holloway
I'm a little stumped on this one, though admittedly I'm still learning to read python stacktraces so it could be something obvious to the trained eye. This happens with the latest development version of Django and also with 0.96. I have an existing MySQL database and I used 'inspectdb' to rever