Django 2.1 changes?


I appreciate the books are written for a specific point in time/version of Django but I’m wondering if there will be any updates for Django 2.1?

I’ve tried the upgrade and am hitting some issues around the “Adding a Registration Page” section of the book. Specifically around the deprecation of django.contrib.auth.views: password_reset, password_reset_done… etc.



Right now I don’t have the time to make all the updates for Django 2,1 officially – I usually wait a bit longer in between updates. Officially, Hello Web App should be used with Django 2.0 only at the moment.

Looks like those views were moved to django.contrib.auth (rather than django.contrib.auth.views). Have you tried importing from there instead?

(This is where I got that info, if that helps:


I get import errors, as far as I can tell those views were removed or renamed.

per release notes here:

Features removed in 2.1¶

These features have reached the end of their deprecation cycle and are removed in Django 2.1. See >Features deprecated in 1.11 for details, including how to remove usage of these features.

contrib.auth.views.login(), logout(), password_change(), password_change_done(), password_reset(), >password_reset_done(), password_reset_confirm(), and password_reset_complete() are removed.


Resetting password (new views model/syntax for Django 2.1) problem solved (location 1333 of e-book in Kindle Reader):

importing the new views must be as follows:

from django.contrib.auth.views import (

(old) password_reset -> (new) PasswordResetView
password_reset_done -> PasswordResetDoneView
password_reset_confirm -> PasswordConfirmView
password_reset_complete -> PasswordResetCompleteView

the urlpatterns also change a bit, new syntax is as follows (just giving the one example as you’ll get the gist):

path(‘accounts/password/reset/’, PasswordResetView.as_view(template_name=‘registration/password_reset_form.html’), name=‘password_reset’),


Yay, thank you so much for this info, it’s super helpful! 👍


PasswordConfirmView is not working!Has any one been able to solve this?
I’m seeing an error like this: path(‘reset-password/confirm’, PasswordConfirmView.as_view(),
NameError: name ‘PasswordConfirmView’ is not defined


Sounds like you’re missing the import statement? What does your look like? You can use pastebin to share the code. :)

ImportError: cannot import name 'password_reset'

Hate to necro, but some might find useful.

from django.contrib.auth.views import(

path('accounts/', include('registration.backends.simple.urls')),


Thank you!