I have it defined in blog/urls.py
from django.conf.urls.defaults import *
urlpatterns = patterns('',
(r'^$', list),
(r'^archive/(?P\d{1,2}/$', list),
(r'^\d{4}/d{1,2}/(?P.*)/$', detail),
(r'^(?P\d{4})/(?P\d{1,2})/$', month),
(r'^(?P\d{4})/$', year),
(r'^category/$', category),
(r'^category/(?P.*)/$', one_category),
(r'^tag/$', tag),
(r'^tag/(?P.*)/$', one_tag), )
this is in the main urls.py which should import these
(r'^', include('republika.blog.urls')),
What is the problem?
~
Next time, it’d help us to help you if you put the entire error into the question.
NameErrormeans you are referencing a variable that has not been declared yet. In this case, it isdetail.I’m assuming
detailis a function within your views? If that’s the case, then you need to import your views. Put the following at the top of the file: