November 2015
Beginner to intermediate
840 pages
26h 30m
English
If you log in to the website, you’ll discover that Django tries to redirect us to the /accounts/profile/ URL path segment, a webpage that doesn’t exist. That’s rather silly.
We can change this behavior by overriding the LOGIN_REDIRECT_URL. In Example 19.45, we also define the LOGIN_URL and LOGOUT_URL settings, which will be useful in Chapter 20.
Example 19.45: Project Code
suorganizer/settings.py in a4c0b0aec0
166 from django.core.urlresolvers import reverse_lazy 167 168 LOGIN_REDIRECT_URL = reverse_lazy('blog_post_list') 169 LOGIN_URL = reverse_lazy('dj-auth:login') 170 LOGOUT_URL = reverse_lazy('dj-auth:logout')
This is a great start, but we can do much better. Users ...
Read now
Unlock full access