from django.conf.urls import include
from django.conf.urls import url
from django.contrib import admin

from voteswap.views import index


urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url('', include('social.apps.django_app.urls', namespace='social')),
    url('^$', index, name='index'),
]

from django.conf.urls import include
from django.conf.urls import url
from django.contrib import admin

from voteswap.views import index


urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url('', include('social.apps.django_app.urls', namespace='social')),
    url('^$', index, name='index'),
    url('^logout/$', 'django.contrib.auth.views.logout', name='logout'),
]

Add logout url, but it redirects to /admin
Add logout url, but it redirects to /admin

  from django.conf.urls import include
  from django.conf.urls import url
  from django.contrib import admin
  
  from voteswap.views import index
  
  
  urlpatterns = [
      url(r'^admin/', admin.site.urls),
      url('', include('social.apps.django_app.urls', namespace='social')),
      url('^$', index, name='index'),
+     url('^logout/$', 'django.contrib.auth.views.logout', name='logout'),
  ]
  
Add logout url, but it redirects to /admin
## Code Before:
from django.conf.urls import include
from django.conf.urls import url
from django.contrib import admin

from voteswap.views import index


urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url('', include('social.apps.django_app.urls', namespace='social')),
    url('^$', index, name='index'),
]

## Instruction:
Add logout url, but it redirects to /admin
## Code After:
from django.conf.urls import include
from django.conf.urls import url
from django.contrib import admin

from voteswap.views import index


urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url('', include('social.apps.django_app.urls', namespace='social')),
    url('^$', index, name='index'),
    url('^logout/$', 'django.contrib.auth.views.logout', name='logout'),
]
