Hi all,
I kept getting DateTimeField received a naive datetime (2013-01-10 00:00:00) while time zone support is active. but I can't figure out where it's receiving a naive datetime. I have USE_TZ set to True in my setting file(stores timezone aware object in mysql?). My url is as below:
urlpatterns = patterns('django.views.generic.date_based', #add the repetitive pattern here
url(r'^$', 'archive_index', entry_info_dict, name='coltrane_entry_archive_index'),
url(r'^(?P<year>\d{4})/$','archive_year', entry_info_dict, name='coltrane_entry_archive_year'),
url(r'^(?P<year>\d{4})/(?P<month>\w{3})/$','archive_month', entry_info_dict,
name='coltrane_entry_archive_month'),
url(r'^(?P<year>\d{4})/(?P<month>\w{3})/(?P<day>\d{2})/$','archive_day', entry_info_dict,
name='coltrane_entry_archive_day'),
url(r'^(?P<year>\d{4})/(?P<month>\w{3})/(?P<day>\d{2})/(?P<slug>[-\w]+)/$',
'object_detail', entry_info_dict, name='coltrane_entry_detail'), #the forth arg will this patter a name
#[-\w] will match letter, number or a hyphen
)
Every time I access a detail page from the archive index page, the error will pop out. I'm using generic view to do my detail page, and I can figure out what's wrong. Can anybody give me some direction?
Thank you,
Jeff
-- You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/q3z2y6RI3x4J.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment