我正在尝试重定向到完整网址
当前网址是absolute_uri
currenturl = request.GET.get('currenturl') #lets say this resolves to http://www.google.com/
return redirect(currenturl)
由于它试图解析以下网址,这使我进入404错误页面
http://localhost:8000/accounts/profile/calendar/delete/15/'http://www.google.com/'
答案 0 :(得分:0)
我正在将模板中的绝对uri传递到带有单个引号的currenturl中。我必须删除单引号。