Why Isn't Django Returning A Datetime Field From The Database?
For my first Django app, I'm trying to write a simple quote collection site (think bash.org), with really simple functionality, just to get my feet wet. I'm using sqlite as my dat
Solution 1:
As Adam Bernier mentioned, you're misspelling quote
Solution 2:
I'm not sure what you're doing with that date:
filter -- what happens if you replace it with something simple, such as date:"D d M Y
?
Solution 3:
I believe that django.views.generic.list_detail.object_detail uses a variable named object_id, not id.
urlpatterns = patterns('',
(r'^$', 'django.views.generic.list_detail.object_list', info_dict),
(r'^(?P<object_id>\d+)/$', 'django.views.generic.list_detail.object_detail', info_dict),
url(r'^(?P<object_id>\d+)/results/$', 'django.views.generic.list_detail.object_detail', dict(info_dict, template_name='polls/results.html'), 'poll_results'),
(r'^(?P<poll_id>\d+)/vote/$', 'mysite.polls.views.vote'),
)
When you change to using the detail template, your url pattern will be wrong.
Post a Comment for "Why Isn't Django Returning A Datetime Field From The Database?"