I am currently converting my site from PHP to Django, but since I'm new to Python, I'm struggling to figure out a few things.
Sometimes I have incomplete dates in my database (i.e. I may not know the day or month), so currently there are three integer fields: date_year , date_month and date_day .
I noticed that MySQL accepted the “partially null” date fields (for example, 2004-04-00, 1994-00-00), but Django just treats them as “completely” null.
I will need to display these dates in the following formats:
16 March 2009 (fully known)March 2009 (unknown day)2009 (unknown day and month)
I assume that I will not be able to use the correct date fields in MySQL and that I will need to create a faux date in the model and then use a custom template filter; can anyone help?
source share