0
I am migrating a project done in Django 1.7 to Django 1.10, when I try to run the project I get the error:
The view core.config.views.home didn’t Return an Httpresponse Object. It returned None Instead.
by which I could understand this and on account of the Verse that was discontinued, the view that the error refers to and the following:
@login_required
def home(request):
dados={}
if request.user.has_perm('admin'):
return render(request, 'Template_Error.html',{'mensagem':"Você não possui permissão para Logar no sistema",'titulo':'Aviso!'})
if request.user.has_perm('ava.view_professor'):
return redirect(reverse(viewname='home_professor'))
elif request.user.has_perm('ava.view_aluno'):
return redirect(reverse(viewname='home_aluno'))
what is the right way to do this today ?
Thank you, I believe this will solve my problem
– user53006