November 2015
Beginner to intermediate
840 pages
26h 30m
English
Now that we understand the User model, we turn our attention to creating a login and logout webpage. We know that the auth app supplies a full URL configuration, and we could start by trying to use these URLs for our own site, as shown in Example 19.24.
Example 19.24: Project Code
suorganizer/urls.py in 8c2972bf62
18 from django.contrib.auth import urls as auth_urls . ... 27 urlpatterns = [ . ... 41 url(r'^user/', include(auth_urls)), 42 ]
You might imagine that we now create a template for when the user logs out. By default, the logout() view displays this logout-success page at registration/logged_out.html, as shown in Example 19.25.
Example 19.25: Project ...
Read now
Unlock full access