diff options
Diffstat (limited to 'tbc_error_page')
-rw-r--r-- | tbc_error_page/views.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/tbc_error_page/views.py b/tbc_error_page/views.py index 099f996..3d87454 100644 --- a/tbc_error_page/views.py +++ b/tbc_error_page/views.py @@ -1,14 +1,12 @@ from django.shortcuts import render_to_response from .models import Error, Broken, get_json_from_file -from django.contrib.auth.decorators import user_passes_test +from django.contrib.auth.decorators import login_required from django.template import RequestContext from django.http import Http404 -import json -import os from tbc.views import is_reviewer -@user_passes_test(lambda u:u.is_superuser, login_url="/admin/login") +@login_required(login_url="/login/") def error(request): ci = RequestContext(request) curr_user = request.user @@ -38,7 +36,7 @@ def error(request): context = {"context": error_details, "user": curr_user} return render_to_response ("error.html", context, ci) -@user_passes_test(lambda u:u.is_superuser, login_url="/admin/login") +@login_required(login_url="/login/") def broken(request): ci = RequestContext(request) curr_user = request.user |