[Answered ]-Django redirect to home page after logging out

2👍

The second argument should be name of the view or a function.

Try following (Using a lambda as a function):

from django.contrib.auth.views import logout_then_login

url(r'^accounts/logout/$', lambda request: logout_then_login(request, "/"), name='logout'),

Leave a comment