Opened 19 years ago

Closed 19 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

Description

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@… 19 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)

by al3x@…, 19 years ago

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 by aCC, 19 years ago

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 by Alex Payne <al3x@…>, 19 years ago

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