Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
def logout_view(request):
logout(request)
return HttpResponseRedirect('your path')
url(r'^accounts/logout/$', 'django.contrib.auth.views.logout',
{'next_page': '/successfully_logged_out/'})
if user.is_active:
login(request, user)
return redirect('/')
else:
return redirect('/куда-надо')
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question