自己現在已知在django中封裝好的就只有兩種方法
1、 導入類from django.http import HttpResponseRedirect
用法:return HttpResponseRedirect('/index')
2、 導入函數from django.shortcuts import redirect
用法:return redirect('/index')
這個redirect
函數實質是封裝了HttpResponseRedirect
類
自己現在已知在django中封裝好的就只有兩種方法
1、 導入類from django.http import HttpResponseRedirect
用法:return HttpResponseRedirect('/index')
2、 導入函數from django.shortcuts import redirect
用法:return redirect('/index')
這個redirect
函數實質是封裝了HttpResponseRedirect
類
一、幾個基本概念 登錄用戶(login user):通過登錄方式進入系統的用戶,強調登錄身份。 當前用戶(current user):執行一個進程或者命令時所使用的用戶身份,強調執行身份。 舉