Implemented template inheritance and brought back errors

This commit is contained in:
Simon Willison 2017-10-23 19:56:27 -07:00
commit b20d7119e4
5 changed files with 40 additions and 15 deletions

14
templates/base.html Normal file
View file

@ -0,0 +1,14 @@
<!DOCTYPE html>
<html>
<head>
<title>{% block title %}{% endblock %}</title>
{% block extra_head %}{% endblock %}
</head>
<body>
{% if error %}
<div style="padding: 1em; margin: 1em; border: 3px solid red;">{{ error }}</div>
{% endif %}
{% block content %}
{% endblock %}
</body>
</html>