自己現在已知在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
類
繼續運行 ?* 回憶上次內容 上次使用shell環境中的命令 命令 作用 c