You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django-res...@googlegroups.com
I would like to change how dates are displayed in my JSON output. Instead of "2012-12-25" I'd like show "12-25-2012". I've seen some old posts referring to subclass "Resource" or override ".serialize()" but I can't find any references to these in the django rest framework source or documentation. Are these references out of date and if so, is there a preferred way to go about this?
Tom Christie
unread,
Feb 26, 2013, 4:00:50 AM2/26/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django-res...@googlegroups.com
At the moment, the right way to do this would be a custom field.
I'd suggest you take a look at the current implementation of DateField, and subclass that.
There's is currently work towards customizing date/time formats, but it's not yet complete...