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'),
Source:stackexchange.com