djangosnippets.org: Latest snippets tagged with 'today'https://djangosnippets.org/tags/today/2008-04-20T23:22:32.991961-05:00TodayDateTimeField
2008-04-20T23:22:32.991961-05:00leotrhttps://djangosnippets.org/snippets/711/<p>Automatically sets date to today if only time part was entered.
If today is 01/01/2008, then both DateTimeField and TodayDateTimeField clean '2008-01-01 15:05' to datetime(2008,01,01,15,5,0), while '15:05' is cleaned as datetime(1900,01,01,15,5,0) for DateTimeField but datetime(2008,01,01,15,5,0) for TodayDateTimeField.</p>
Freely redistributable