Opened 14 years ago

Closed 14 years ago

#387 closed defect (worksforme)

Date field does not render, saving object fails with invisible error

Reported by: al3x@… Owned by: Adrian Holovaty
Component: contrib.admin Version:
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


I'm creating a sample application with a model very similar to the "blog" app powering the Django site. When I go to create a new Entry I do not see the javascript helpers for the pub_date field. I've tried this in Safari and Firefox, checked out the DOM trees and Javascript debuggers in both, and the problem does not seem to be on the client side.

When I go to save an Entry I see "Please correct the error below," but no error below. I'm guessing it's failing on the lack of values for the DateTimeField, although I do have auto_now_add=True.

Attachments (1)

Broken date field.png (29.8 KB) - added by al3x@… 14 years ago.
Screenshot of the broken DateTimeField in Safari 2.0 (412.2.2), generated by Django svn rev 544

Download all attachments as: .zip

Change History (3)

Changed 14 years ago by al3x@…

Attachment: Broken date field.png added

Screenshot of the broken DateTimeField in Safari 2.0 (412.2.2), generated by Django svn rev 544

comment:1 Changed 14 years ago by aCC

Usage changed, but was only documented in IRC. Instead of "auto_now_add=True" you should use "default=meta.LazyDate()".

Doesn't add the Javascript, but at least it fills the fields properly.

comment:2 Changed 14 years ago by Alex Payne <al3x@…>

Resolution: worksforme
Status: newclosed

Using "default=meta.LazyDate()" works, and actually does get the Javascript calendar stuff going for me. It'd be great if this stuff got documented!

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