Opened 16 years ago
Closed 16 years ago
#11075 closed (invalid)
DateField on ManyToMany intermediary won't accept input
Reported by: | David Baumgold | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | 1.0 |
Severity: | Keywords: | manytomanyfield m2m datefield | |
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 cannot save() my m2m intermediary model, because it is throwing an error on a date validation. However, the date is correct -- it does not accept either a Python date object, or a properly formatted datestring. The object can be created and referenced successfully, but cannot be saved.
Full traceback demonstrating error is attached, and also here: http://dpaste.com/hold/43152/
As a reference, the relevant models are attached, and also here: http://dpaste.com/hold/43153/
Help? Is any more information needed?
Attachments (2)
Change History (4)
by , 16 years ago
Attachment: | error_traceback.txt added |
---|
comment:1 by , 16 years ago
Proper syntax highlighting for models.py is at http://dpaste.com/hold/43158/
Also, forgot to mention: running Django 1.0.2, installed via easy_install.
comment:2 by , 16 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
Your problem is your date_left = models.DateField(blank=True, default='')
PerformanceGroupMembership
field. Try with models.DateField(blank=True, null=True[, default=None])
instead, ''
isn't a valid datetime.date
value.
The tests/modeltests/m2m_through
successfully running tests has an almost identical model setup (modulo the date_left
field that is).
Also, next time please use the django user support channels (send a message to the django-users mailing list or visit the #django IRC channel) before opening a ticket here.
Traceback of error occurance