Re: Custom model field and Django-admin -- error

2009-08-10 Thread BenW
Excellent that it was reported, but bad that it's not considered a 'bug' -- Any suggestions on how to use date_hierarchy (and probably others) with my field? On Aug 10, 8:04 am, Alex Gaynor wrote: > On Mon, Aug 10, 2009 at 8:45 AM, BenW wrote: > > > Hello, > > > I'm working with a legacy databas

Re: Custom model field and Django-admin -- error

2009-08-10 Thread Jean Stebens
Alex Gaynor wrote: > On Mon, Aug 10, 2009 at 8:45 AM, BenW wrote: > >> Hello, >> >> I'm working with a legacy database that stores datetimes as unsigned >> ints. Rather than do the conversion with properties on the model I've >> written a custom Field 'UnixDateTimeField': >> >> class UnixDateT

Re: Custom model field and Django-admin -- error

2009-08-10 Thread Alex Gaynor
On Mon, Aug 10, 2009 at 8:45 AM, BenW wrote: > > Hello, > > I'm working with a legacy database that stores datetimes as unsigned > ints.  Rather than do the conversion with properties on the model I've > written a custom Field 'UnixDateTimeField': > > class UnixDateTimeField(models.DateTimeField):

Custom model field and Django-admin -- error

2009-08-10 Thread BenW
Hello, I'm working with a legacy database that stores datetimes as unsigned ints. Rather than do the conversion with properties on the model I've written a custom Field 'UnixDateTimeField': class UnixDateTimeField(models.DateTimeField): __metaclass__ = models.SubfieldBase def get_inte