mirror of
https://github.com/ansible/awx.git
synced 2026-05-05 08:27:39 -02:30
Removed admin support (no longer used or maintained).
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user