Opened 16 years ago
Closed 16 years ago
#7627 closed (invalid)
DateField raises errors from admin edit form
Reported by: | Paul Winkler | Owned by: | nobody |
---|---|---|---|
Component: | Uncategorized | Version: | newforms-admin |
Severity: | 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
In any model with a DateField, I can create them fine in the newforms admin UI, but after that I can't edit them
again because the value of the field is set incorrectly in the edit form.
To reproduce:
- Create a model with a required DateField (do not use auto_now).
- Give your model a basic admin UI.
- Fire up the dev server and use the admin UI to add an instance of your model. Use the "Today" button to set the date. It saves just fine.
- Click on your instance in the Changelist display to edit it.
- Click "Save". You get a validation error even though you have not changed anything.
- Notice that "00:00:00" was appended to your date. If you manually delete the "00:00:00" and click "Save and continue editing", it works.
- Click "Save" again and you get the error again. Repeat ad nauseum.
Tested as of newforms-admin r7815, using MySQL.
Note:
See TracTickets
for help on using tickets.
Disregard this report. I had changed a DateTimeField into a DateField, and I thought I had fully reset my database, but I hadn't.