Adding a URL to


I cannot seem to get past the steps in chapter 4. I get the following error, but nothing seems to be incorrect. Here is the error, and here is the code.



from django.conf.urls import patterns, url
from django.contrib import admin
from collection import views

urlpatterns = [
url(r’^$’, views.index, name=‘home’),
url(r’^admin/’, include(,


@limedaring Any thoughts or suggestions?


For anyone with the same problem, I have fixed it with this line of code.

from django.conf.urls import include

however that line of code is not mentioned in the book. Not sure why. :(


:( Might be a typo. When did you get your book and where? Sorry for the trouble, glad you figured out the problem!

(Sorry for not answering quickly enough, I have a full-time job now in addition to my HWA and another side project so my time available just dropped drastically. 😰)


Hey @limedaring I got the book from Gumroad, it is version 1.1. Is there an updated version with corrections I can download? Thanks for the help!


add this in top: from django.conf.urls import include


I’m going to do a new release of the files and make sure that’s in it. There are so many versions of the books on Gumroad now because of the different packages that I’m just going to refresh them all. @Kitty can you email me [email protected] and I’ll send you the files directly?