mirror of
https://github.com/ansible/awx.git
synced 2026-03-27 05:45:02 -02:30
Fix error views to use base REST framework template instead of admin, since admin is disabled.
This commit is contained in:
@@ -1,7 +0,0 @@
|
||||
{% extends "admin/403.html" %}
|
||||
|
||||
{% block branding_title %}AWX{% endblock %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
{% extends "admin/404.html" %}
|
||||
|
||||
{% block branding_title %}AWX{% endblock %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
{% endblock %}
|
||||
@@ -1,6 +0,0 @@
|
||||
{% extends "admin/500.html" %}
|
||||
|
||||
{% block branding_title %}AWX{% endblock %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
{% endblock %}
|
||||
@@ -1,20 +0,0 @@
|
||||
{% extends "admin/base_site.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{% trans "Forbidden" %}{% endblock %}
|
||||
|
||||
{% block nav-global %}{% endblock %}
|
||||
|
||||
{% block content_title %}{% endblock %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<div class="breadcrumbs">
|
||||
<a href="{% url "admin:index" %}">{% trans "Home" %}</a> ›
|
||||
{% trans "Forbidden" %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1 style="margin-bottom: 0.7em;">{% trans 'Forbidden' %}</h1>
|
||||
<p>{% trans "You don't have permission to access the requested page." %}</p>
|
||||
{% endblock %}
|
||||
@@ -1,18 +0,0 @@
|
||||
{% extends "admin/base_site.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{% trans "Not Found" %}{% endblock %}
|
||||
|
||||
{% block nav-global %}{% endblock %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<div class="breadcrumbs">
|
||||
<a href="{% url "admin:index" %}">{% trans "Home" %}</a> ›
|
||||
{% trans "Not Found" %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1 style="margin-bottom: 0.7em;">{% trans 'Not Found' %}</h1>
|
||||
<p>{% trans "We're sorry, but the requested page could not be found." %}</p>
|
||||
{% endblock %}
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends "admin/base_site.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{% trans "Server Error" %}{% endblock %}
|
||||
{% block title %}{{ name }}{% endblock %}
|
||||
|
||||
{% block nav-global %}{% endblock %}
|
||||
|
||||
@@ -10,11 +10,11 @@
|
||||
{% block breadcrumbs %}
|
||||
<div class="breadcrumbs">
|
||||
<a href="{% url "admin:index" %}">{% trans "Home" %}</a> ›
|
||||
{% trans "Server Error" %}
|
||||
{{ name }}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1 style="margin-bottom: 0.7em;">{% trans 'Server Error' %}</h1>
|
||||
<p>{% trans "A server error has occurred." %}</p>
|
||||
<h1 style="margin-bottom: 0.7em;">{{ name }}</h1>
|
||||
<p>{{ content }}</p>
|
||||
{% endblock %}
|
||||
28
awx/templates/error.html
Normal file
28
awx/templates/error.html
Normal file
@@ -0,0 +1,28 @@
|
||||
{% extends "rest_framework/api.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block style %}
|
||||
{{ block.super }}
|
||||
<style type="text/css">
|
||||
ul.breadcrumb {
|
||||
visibility: hidden;
|
||||
margin-top: 10px !important;
|
||||
}
|
||||
pre.err {
|
||||
margin-bottom: 2em;
|
||||
}
|
||||
div.request-info, div.response-info {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
{% block branding_title %}{% endblock %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<ul class="breadcrumb">
|
||||
<li>
|
||||
<a href="{{ request.get_full_path }}" class="active">{{ name }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endblock %}
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends 'rest_framework/base.html' %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{% trans 'AWX REST API' %}{% endblock %}
|
||||
{% block title %}{{ name }} · {% trans 'AWX REST API' %}{% endblock %}
|
||||
|
||||
{% block style %}
|
||||
{{ block.super }}
|
||||
@@ -101,6 +101,7 @@ html body .description {
|
||||
font-size: 0.8em;
|
||||
text-align: center;
|
||||
padding-bottom: 1em;
|
||||
line-height: 1.6em;
|
||||
}
|
||||
#footer a,
|
||||
#footer a:hover {
|
||||
@@ -125,7 +126,7 @@ html body #push {
|
||||
{% endblock %}
|
||||
|
||||
{% block branding %}
|
||||
<a class="brand" href="/api/"><img class="logo" src="{{ STATIC_URL }}img/logo.png">{% trans 'REST API' %}</a>
|
||||
<a class="brand" href="/api/"><img class="logo" src="{{ STATIC_URL }}img/logo.png">{% block branding_title %}{% trans 'REST API' %}{% endblock %}</a>
|
||||
{% endblock %}
|
||||
|
||||
{% block userlinks %}
|
||||
@@ -139,8 +140,9 @@ html body #push {
|
||||
{% block footer %}
|
||||
<div id="footer">
|
||||
<img class="awxlogo" src="{{ STATIC_URL }}img/AWX_logo.png" /><br/>
|
||||
Copyright © 2013 <a href="http://www.ansibleworks.com/">AnsibleWorks, Inc.</a> All rights reserved.<br />
|
||||
1482 East Valley Road, Suite 888 · Montecito, California, 93108 · <a href="tel:18008250212">+1-800-825-0212<a/></div>
|
||||
Copyright © 2013 AnsibleWorks, Inc. All rights reserved.<br />
|
||||
1482 East Valley Road, Suite 888 · Santa Barbara, California 93108 · +1-800-825-0212<br />
|
||||
<a href="http://www.ansibleworks.com" target="_blank">www.ansibleworks.com</a>
|
||||
{% endblock %}
|
||||
|
||||
{% block script %}
|
||||
|
||||
Reference in New Issue
Block a user