Page 26 - Unresolved reference with urlpatterns = patterns


#1

When I make the changes to URLS.PY from page 26, I get an unresolved reference. Curious if (more like what) I did wrong. If I remove ‘patterns’ and use [] everything works.

This worked:

urlpatterns = [
url(r’^$’, ‘collection.views.index’, name=‘home’),
url(r’^about/$’,
TemplateView.as_view(template_name=‘about.html’),
name = ‘about’),
url(r’^contact/$’,
TemplateView.as_view(template_name=‘contact.html’),
name = ‘contact’),
url(r’^admin/’, include(admin.site.urls)),
]


#2

Hey there! What version of Django do you have installed? You can see that by running pip freeze in your command-line. :)