better error pages

This commit is contained in:
Philip Sargent 2021-04-17 21:24:37 +01:00
parent 25b8fc2e1d
commit d4317b5fd3
2 changed files with 68 additions and 1 deletions

View File

@ -1,11 +1,39 @@
{% extends 'base.html' %} {% extends 'base.html' %}
{% block extrahead %}
<style>
div#editLinks {
Zposition:absolute;
background: #999;
bottom:0px;
right:0px;
font-family: "Courier New", Courier, monospace;
filter:alpha(opacity=75);
-moz-opacity:.75;
opacity:.75;
text-align:right;
}
div#editLinks a{
color:#FFF;
}
</style>
{% endblock %}
{% block title %}Website Error - {% endblock %} {% block title %}Website Error - {% endblock %}
{% block content %} {% block content %}
<div class='middle'> <div class='middle'>
<h2>Website Error</h2> <h2>Website Error</h2>
</div> </div>
<div id="editLinks"> {% block loginInfo %}
<a href="/">Home</a> |
<a id="cuccLink" href="http://camcaving.uk/">CUCC</a> |
<a id="expoWebsiteLink" href="http://expo.survex.com">expo.survex</a> |
{% if user.username %}User:{{ user.username }}
{% if user.person %}(<a href="{{ user.person.get_absolute_url }}">{{ user.person }}</a>){% endif %}
| <a <a href='/accounts/logout/'>Log out</a> {% else %} <a href='/accounts/login/'>Log in</a> {% endif %}
</div>
{% endblock%}
<div style='width: 300px;' class='middle3 login'> <div style='width: 300px;' class='middle3 login'>
<div class='align-center'> <div class='align-center'>
<div class='space'></div> <div class='space'></div>

View File

@ -1,11 +1,50 @@
<!-- pagenotfound.html - this text visible because this template has been included --> <!-- pagenotfound.html - this text visible because this template has been included -->
{% extends "expobase.html" %} {% extends "expobase.html" %}
{% block extrahead %}
<style>
div#editLinks {
Zposition:absolute;
background: #999;
bottom:0px;
right:0px;
font-family: "Courier New", Courier, monospace;
filter:alpha(opacity=75);
-moz-opacity:.75;
opacity:.75;
text-align:right;
}
div#editLinks a{
color:#FFF;
}
</style>
{% endblock %}
{% block title %}Page not found {{ path }}{% endblock %} {% block title %}Page not found {{ path }}{% endblock %}
{% block body %} {% block body %}
<h1>Page not found {{ path }}</h1> <h1>Page not found {{ path }}</h1>
<div id="editLinks"> {% block loginInfo %}
<a href="/">Home</a> |
<a id="cuccLink" href="http://camcaving.uk/">CUCC</a> |
<a id="expoWebsiteLink" href="http://expo.survex.com">expo.survex</a> |
{% if user.username %}User:{{ user.username }}
{% if user.person %}(<a href="{{ user.person.get_absolute_url }}">{{ user.person }}</a>){% endif %}
| <a <a href='/accounts/logout/'>Log out</a> {% else %} <a href='/accounts/login/'>Log in</a> {% endif %}
</div>
{% endblock%}
<p>Probably a mistake. But you can use <a href="{%url "editexpopage" path %}">this link</a> <p>Probably a mistake. But you can use <a href="{%url "editexpopage" path %}">this link</a>
<p> <p>
or 'Edit this page' in the menu on the left to create this page if you are logged in. or 'Edit this page' in the menu on the left to create this page if you are logged in.
<p>If you can't see that option in the menu, then you are not logged in and you can't create anything. <ul>
<li>If you can't see that option in the menu, then you are not logged in and you can't create anything.
<li>You can log on or log off using the gray menu bar above.
</ul>
<p>Did you get lost ?
<img align=center src="/handbook/i/204-area.png">
{% include "menu.html" %} {% include "menu.html" %}
{% endblock %} {% endblock %}