Basic app, mainly copied from tmpl-flask
This commit is contained in:
parent
354a473f77
commit
bfea5eeb06
20 changed files with 446 additions and 49 deletions
11
templates/404.html
Normal file
11
templates/404.html
Normal file
|
@ -0,0 +1,11 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}404{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>404: Not Found</h1>
|
||||
<p>
|
||||
Go to the
|
||||
<a href="/">main page</a>
|
||||
</p>
|
||||
{% endblock %}
|
15
templates/500.html
Normal file
15
templates/500.html
Normal file
|
@ -0,0 +1,15 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}500{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>500: ISE</h1>
|
||||
<p>
|
||||
An error occured while
|
||||
processing your request.
|
||||
</p>
|
||||
<p>
|
||||
Please, try again later
|
||||
or contact web site admin.
|
||||
</p>
|
||||
{% endblock %}
|
21
templates/admin.html
Normal file
21
templates/admin.html
Normal file
|
@ -0,0 +1,21 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Admin{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Add a person to DB</h1>
|
||||
<form action="/add" method="post">
|
||||
{{ form.hidden_tag() }}
|
||||
{% for field in form %}
|
||||
{% if field.name != 'csrf_token' %}
|
||||
<div>
|
||||
{{ field.label }}
|
||||
{{ field }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<div>
|
||||
<input type="submit" value="Add">
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
18
templates/base.html
Normal file
18
templates/base.html
Normal file
|
@ -0,0 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="${REPO_DESCRIPTION}">
|
||||
<title>{% block title %}{% endblock %} | ${REPO_NAME}</title>
|
||||
<link rel="stylesheet" href="/static/css/style.css">
|
||||
<script src="/static/js/script.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<header>${REPO_NAME}</header>
|
||||
<article>
|
||||
{% block content %}{% endblock %}
|
||||
</article>
|
||||
<footer id="js"></footer>
|
||||
</body>
|
||||
</html>
|
12
templates/index.html
Normal file
12
templates/index.html
Normal file
|
@ -0,0 +1,12 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Main page{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>
|
||||
This is the default main page of
|
||||
<a href="https://git.dc09.ru/DarkCat09/tmpl-flask">
|
||||
Flask app template
|
||||
</a>
|
||||
</h1>
|
||||
{% endblock %}
|
18
templates/table.html
Normal file
18
templates/table.html
Normal file
|
@ -0,0 +1,18 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Database{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Sample database</h1>
|
||||
<table>
|
||||
<tbody>
|
||||
{% for row in rows %}
|
||||
<tr>
|
||||
{% for cell in row %}
|
||||
<td>{{ cell }}</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endblock %}
|
Loading…
Add table
Reference in a new issue