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 login(request):
defaults = {
'authentication_form': CustomAuthForm,
'template_name': 'accounts/login.html',
}
if request.user.is_anonymous():
return auth_login(request, **defaults)
elif request.user.is_owner():
return redirect('/asdasdasd')
return auth_login(request, **defaults)
def login(request):
defaults = {
'authentication_form': CustomAuthForm,
'template_name': 'accounts/login.html',
}
if not request.user.is_authenticated() and request.user.is_owner():
return redirect('/asdasdasd')
return auth_login(request, **defaults)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question