python - The included urlconf module does not appear to have any patterns in it -
i have code urls.py inside blog file, accessed urls.py in mysite folder.
from django.conf.urls import url, include blog import views django.views.generic import listview blog.models import post urlpatters = [ url(r'^(?p<year>\d{4})/(?p<month>\d{2})/(?p<day>\d{2})/(?p<post>[-\w]+)/$', views.post_detail, name='post_detail'), url(r'^$', listview.as_view(queryset=post.objects.all().order_by("date"),template_name="blog/base.html")), ]
when try access /blog/ file, should lead blog/base.html file, gives following error:
the included urlconf module 'blog.urls' '/mysite/blog/urls.py' not appear have patterns in it. if see valid patterns in file issue caused circular import.
any highly appreciated!
you have typo: urlpatters
should urlpatterns
.
Comments
Post a Comment