Opened 3 years ago

Closed 3 years ago

#32607 closed Bug (invalid)

DateTimeField in django administration bug

Reported by: mypseudo Owned by: nobody
Component: contrib.admin Version: 3.1
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by mypseudo)

In django administration when wanting to save a DateTimeField, it raises a ValidationError "This field is mandatory" if we only provide a date and no time.

Create a Model with a DateTimeField, register it on django.contrib.admin, makemigrations and migrate, then go to django administration in browser and try saving it without providing in the time : it raises a Validation error.

Attachments (1)

toto.png (7.9 KB ) - added by mypseudo 3 years ago.
Screenshot of the bug in browser after having clicked "Save" button with the same content

Download all attachments as: .zip

Change History (3)

by mypseudo, 3 years ago

Attachment: toto.png added

Screenshot of the bug in browser after having clicked "Save" button with the same content

comment:1 by mypseudo, 3 years ago

Description: modified (diff)

comment:2 by Tim Graham, 3 years ago

Resolution: invalid
Status: newclosed

This is working as intended. If you want to make the time optional, you can customize the field.

Note: See TracTickets for help on using tickets.
Back to Top