#27304: Django 1.10 onwards broke previous behaviour for models.DateTimeField() 
in
Admin
-------------------------------------+-------------------------------------
     Reporter:  Kegan Gan            |                    Owner:  nobody
         Type:  Bug                  |                   Status:  closed
    Component:  contrib.admin        |                  Version:  1.10
     Severity:  Normal               |               Resolution:  invalid
     Keywords:  model admin          |             Triage Stage:
  datetime formfield_overrides       |  Unreviewed
  AdminDateWidget widget             |
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Kegan Gan):

 Thanks Tim! It worked.

 For reference, to override admin widget, use the following:

 {{{
     formfield_overrides = {
         models.DateTimeField: {'form_class': forms.DateTimeField,
 'widget': widgets.AdminDateWidget},
     }
 }}}

 Also refer to #26449.

--
Ticket URL: <https://code.djangoproject.com/ticket/27304#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.094d2469a590eff97fb34c2e7efff2ab%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to