Commit 6fc765e6 authored by David Haynes's avatar David Haynes

Move 404/500 to templates/admin

parent d6a213c8
......@@ -56,7 +56,7 @@ def index(request):
random_short = URL.generate_valid_short()
if random_short is None:
return HttpResponseServerError(
render(request, '500.html', {})
render(request, 'admin/500.html', {})
)
else:
url.short = random_short
......@@ -229,7 +229,7 @@ def redirection(request, short):
domain = "%s://%s" % (request.scheme, request.META.get('HTTP_HOST')) + "/"
if url.target == domain + short:
return redirect('404.html')
return redirect('admin/404.html')
if 'qr' in request.GET:
url.qrclicks += 1
......
......@@ -10,8 +10,8 @@ import go.views
admin.autodiscover()
handle404 = TemplateView.as_view(template_name="404.html")
handle500 = TemplateView.as_view(template_name="500.html")
handle404 = TemplateView.as_view(template_name="admin/404.html")
handle500 = TemplateView.as_view(template_name="admin/500.html")
urlpatterns = [
# / - Homepage url.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment