from django.conf.urls import patterns, include, url

urlpatterns = patterns('django.contrib.auth.views',

    url(r'^login/$', 'login', {'template_name': 'authentication/login.html'}),
    url(r'^logout/$', 'logout_then_login'))
from django.conf.urls import patterns, include, url

urlpatterns = patterns('django.contrib.auth.views',

    url(r'^login/$', 'login', {'template_name': 'authentication/login.html'}),
    url(r'^logout/$', 'logout_then_login',name='logout'))
Add name to logout url regex
Add name to logout url regex

  from django.conf.urls import patterns, include, url
  
  urlpatterns = patterns('django.contrib.auth.views',
  
      url(r'^login/$', 'login', {'template_name': 'authentication/login.html'}),
-     url(r'^logout/$', 'logout_then_login'))
+     url(r'^logout/$', 'logout_then_login',name='logout'))
Add name to logout url regex
## Code Before:
from django.conf.urls import patterns, include, url

urlpatterns = patterns('django.contrib.auth.views',

    url(r'^login/$', 'login', {'template_name': 'authentication/login.html'}),
    url(r'^logout/$', 'logout_then_login'))
## Instruction:
Add name to logout url regex
## Code After:
from django.conf.urls import patterns, include, url

urlpatterns = patterns('django.contrib.auth.views',

    url(r'^login/$', 'login', {'template_name': 'authentication/login.html'}),
    url(r'^logout/$', 'logout_then_login',name='logout'))