def hoddashboard(request):
if request.method=='POST':
# do stuff
if user is not None:
# do stuff
return redirect('/some/url')
else:
return redirect('/some/url2/')
else:
return redirect('/somewhere/else/')