Commit e1cfb56d by Kálmán Viktor

dashboard: fix view not returning anything

parent 7f04eeaa
...@@ -25,9 +25,9 @@ def handler500(request): ...@@ -25,9 +25,9 @@ def handler500(request):
ctx['error'] = exception.get_admin_text() ctx['error'] = exception.get_admin_text()
except: except:
pass pass
try: try:
resp = render_to_response("500.html", ctx, RequestContext(request)) resp = render_to_response("500.html", ctx, RequestContext(request))
except: except:
resp = render_to_response("500.html", ctx) resp = render_to_response("500.html", ctx)
resp.status_code = 500 resp.status_code = 500
return resp return resp
...@@ -6,11 +6,18 @@ ...@@ -6,11 +6,18 @@
{% block page_title %}{% trans ":(" %}{% endblock page_title %} {% block page_title %}{% trans ":(" %}{% endblock page_title %}
{% block content %} {% block content %}
<div style="margin-top: 4em;"> <div class="alert alert-danger" style="font-size: 22px; margin-top: 2em;">
{% if error %} <div class="row">
<p>{{ error }}</p> <div class="col-md-2" style="text-align: center;">
{% else %} HTTP 500
<p>{% trans "Internal Server Error... Please leave the server alone..." %}</p> </div>
{% endif %} <div class="col-md-10" style="text-align: center;">
{% if error %}
{{ error }}
{% else %}
{% trans "Internal Server Error... Please leave the server alone..." %}
{% endif %}
</div>
</div>
</div> </div>
{% endblock content %} {% endblock content %}
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 sign in to comment