Two comments on code in the book


#1

In the section Adding a Registration Page:

In this section, the following URL pattern is added to the contents of the urls.py file:

url( r’ ^ accounts/’, 20 include(’ registration.backends.simple.urls’)),

Later in the section the URL pattern changes to the following (“simple” replaced by “default” in the file path):

url( r’ ^ accounts/’, include(’ registration.backends.default.urls’)),

But, the changed statement is not highlighted. Is the change in the URL pattern intended?

In the subsection, Updating Your Registration Flow, the following lines of code are added to the views.py file:

72 # create the slug from our name
73 slug = slugify( name)

It seems these two lines of code are extraneous and should be removed.

Thanks.


#2

Oh fun — pretty sure it should just be the simple URLs (though both should work, just the simple one has less extra stuff.) I simplified that chapter and maybe forgot to change that line. Fixing, thanks for catching!

As for your second part, can you let me know what version of the book you have? Bought from Leanpub or Gumroad or Amazon, or received from Kickstarter. I remember that area and it is changed already, this is what it says on my end now:

# set the additional details
thing.user = request.user
thing.slug = slugify(thing.name)

Sounds like you have an old edition, and I need to make sure that wherever you got the old edition isn’t still sending it out! Email me at [email protected] too and I can send you over a version with the typos fixed.