Removed admin support (no longer used or maintained).

This commit is contained in:
Chris Church
2014-03-28 22:04:26 -04:00
parent 7754f475ad
commit 352197c5d2
7 changed files with 5 additions and 843 deletions

View File

@@ -11,14 +11,11 @@ def handle_error(request, status=404, **kwargs):
# FIXME: Should attempt to check HTTP Accept request header and return
# plain JSON response instead of HTML (maybe only for /api/*).
context = kwargs
if 'django.contrib.admin' in settings.INSTALLED_APPS and request.path.startswith('/admin/'):
template_name = 'admin/error.html'
else:
# Return enough context to popuplate the base API template.
description = u'<pre class="err">%s</pre>' % context.get('content', '')
context['description'] = mark_safe(description)
context['content'] = ''
template_name = 'error.html'
# Return enough context to popuplate the base API template.
description = u'<pre class="err">%s</pre>' % context.get('content', '')
context['description'] = mark_safe(description)
context['content'] = ''
template_name = 'error.html'
return render(request, template_name, context, status=status)
def handle_403(request):