Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
newforms-admin AdminDateWidget superclass and DEFAULT_DATE_INPUT_FORMATS
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Expand all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
James Beard  
View profile  
 More options Feb 12 2008, 8:25 pm
From: James Beard <james.be...@gmail.com>
Date: Tue, 12 Feb 2008 17:25:07 -0800 (PST)
Local: Tues, Feb 12 2008 8:25 pm
Subject: newforms-admin AdminDateWidget superclass and DEFAULT_DATE_INPUT_FORMATS
Hi all.

I've been having a fun time trying to get the dates in the newforms-
admin app to display dd/mm/YYYY instead of the default YYYY-mm-dd. I
don't want to write custom forms and widgets as the default admin
interface is perfect apart from the way the dates are displayed.

Setting django.newforms.fields.DEFAULT_DATE_INPUT_FORMATS did half the
trick - the object could only be saved with dates in my preferred
format. However, upon refreshing the form they were still rendered
with the default format.

A bit of digging shows contrib.admin.widgets.AdminDateWidget
subclasses forms.TextInput, which doesn't pay any attention to
DEFAULT_DATE_INPUT_FORMATS.

Is there any reason why AdminDateWidget shouldn't subclass
forms.DateTimeInput instead?

Thanks
James


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »