1 def hoddashboard(request):
2 if request.method=='POST':
3 # do stuff
4 if user is not None:
5 # do stuff
6 return redirect('/some/url')
7 else:
8 return redirect('/some/url2/')
9 else:
10 return redirect('/somewhere/else/')
11