Runtime error when trying to logout django
Your view logout
is overriding the namespace of built-in logout
function. Define an alias for django.contrib.auth.login
function using as
keyword.
from django.contrib.auth import logout as django_logout
@login_required
def logout(request):
django_logout(request)
return HttpResponseRedirect('/deck')