Django - Custom Model Method - How to specify datatype so Admin formats it properly? -
example: class mymodel(models.model): field1=models.charfield(..) field2=models.datetimefield() def today(self): return self.field2 when @ in admin site, field2 formatted differently today field. how can tell admin site treat today it's treating field2? i.e., tell django admin 'today' models.datetimefield? here it's showing: field2 today april 5, 2011, 9:10 a.m. 2011-04-11 08:47:27 that's really weird behaviour. @ total guess , may have django settings; datetime_format (and related) settings. framework introspection on fields, , if of datetime type, rendered according aforementioned settings. introspection on methods wouldn't make sense in majority of cases, understand behaviour if case. try modifying settings accordingly (provide different datetime formats), , see if fields change , method remains same. edit: looking @ django.contrib.databrowse.datastructures, there section of code like: i...