Opened 7 years ago

Closed 7 years ago

#11075 closed (invalid)

DateField on ManyToMany intermediary won't accept input

Reported by: singingwolfboy 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: UI/UX:


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:
As a reference, the relevant models are attached, and also here:

Help? Is any more information needed?

Attachments (2)

error_traceback.txt (3.2 KB) - added by singingwolfboy 7 years ago.
Traceback of error occurance (1.3 KB) - added by singingwolfboy 7 years ago.
database models used when running traceback

Download all attachments as: .zip

Change History (4)

Changed 7 years ago by singingwolfboy

Traceback of error occurance

Changed 7 years ago by singingwolfboy

database models used when running traceback

comment:1 Changed 7 years ago by singingwolfboy

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

Proper syntax highlighting for is at

Also, forgot to mention: running Django 1.0.2, installed via easy_install.

comment:2 Changed 7 years ago by ramiro

  • Resolution set to invalid
  • Status changed from new to 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 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.

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