📜  视图不返回 httpresponse - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:56.641000             🧑  作者: Mango

代码示例1
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/')