from django.conf.urls import url
import views
urlpatterns = [
url(r'^redirect/', views.redirct)
]
from django.shortcuts import redirect
def redirct(request):
return redirect("http://google.com/")
请求方法:GET
请求网址:http://localhost/redirect/
Django版本:1.11.1
异常类型:TypeError
异常值:reversed()的参数必须是序列