Opened 5 years ago
Closed 5 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 )
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)
Change History (3)
by , 5 years ago
comment:1 by , 5 years ago
| Description: | modified (diff) |
|---|
comment:2 by , 5 years ago
| Resolution: | → invalid |
|---|---|
| Status: | new → closed |
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.
Screenshot of the bug in browser after having clicked "Save" button with the same content