Friday, February 10, 2012

Re: Custom times in admin time selector

On Wed, Feb 8, 2012 at 2:15 PM, Sebastian Goll <sebastian.goll@gmx.de> wrote:
> Hi all,
>
> For DateTimeFields, the admin presents selector widgets for both the
> date and time form fields. The default choices for the time selector
> are: Now, Midnight, 6 a.m., Noon.
>
> I'd like to replace those default choices with something different,
> depending on the ModelAdmin instance in question.
>
> Can this be done easily? How would I do this?
>
> Best wishes,
> Sebastian.
>

This is added by javascript, and so not that easy to change. The file
in question is django/contrib/admin/media/js/DateTimeShortcuts.js,
around line 85.

Cheers

Tom

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate