增加访问首页的参数
This commit is contained in:
@@ -62,10 +62,9 @@ def index_page(request):
|
|||||||
if not request.user.is_authenticated():
|
if not request.user.is_authenticated():
|
||||||
return render(request, "oj/index.html")
|
return render(request, "oj/index.html")
|
||||||
|
|
||||||
try:
|
if request.META.get('HTTP_REFERER') or request.GET.get("index"):
|
||||||
if request.META['HTTP_REFERER']:
|
|
||||||
return render(request, "oj/index.html")
|
return render(request, "oj/index.html")
|
||||||
except KeyError:
|
else:
|
||||||
return http.HttpResponseRedirect('/problems/')
|
return http.HttpResponseRedirect('/problems/')
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user