base.html
This commit is contained in:
parent
8f8983b0f9
commit
ac1cb4aab4
2 changed files with 13 additions and 4 deletions
8
main.py
8
main.py
|
@ -61,8 +61,9 @@ def list():
|
|||
text = ""
|
||||
for i in users:
|
||||
text = text + f'<p><a href="list/user?id={i[0]}">{escape(i[1])}</a>: {i[2]} <form action="/change" method="get"><input name="id" type="hidden" value="{i[0]}"> Change balance: <input name="change"><input type="submit"></form></p> <br style="line-height: 50%;"></br>'
|
||||
return '''<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
return '''
|
||||
{% extends 'base.html' %}
|
||||
{% block content %}
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.0.1/socket.io.js" integrity="sha512-q/dWJ3kcmjBLU4Qc47E4A9kTB4m3wuTY7vkFJDTZKjTs8jhyGQnaUrxa0Ytd0ssMZhbNua9hE+E7Qv1j+DyZwA==" crossorigin="anonymous"></script>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
var socket = io();
|
||||
|
@ -70,12 +71,11 @@ def list():
|
|||
window.location="http://matekasse.server.c3h/list"
|
||||
});
|
||||
</script>
|
||||
{{ extends 'base.html' }}
|
||||
<p>1 Credit = 1,50 Euro</p>
|
||||
<form action="/list/user" method="get"> Search for User: <input name="user"><input type="submit"></form>
|
||||
<form action="/adduser" method="get"><button type="submit">Add User</button></form>
|
||||
<br></br>
|
||||
''' + text + '<a href="/documentation">Doumentation</a></html>'
|
||||
''' + text + '<a href="/documentation">Doumentation</a> {% block content %}'
|
||||
|
||||
@app.route("/list/user", methods=['GET'])
|
||||
def user_info():
|
||||
|
|
|
@ -1,8 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>
|
||||
{% block title %} {% endblock %} - FlaskApp
|
||||
</title>
|
||||
</head>
|
||||
<body>
|
||||
<nav>
|
||||
<p><a href="/list">user and tag list</a> | <a href="/documentation">Documentation</a></p>
|
||||
</nav>
|
||||
<hr>
|
||||
<div class="conntent">
|
||||
{% block content %} {% endblock %}
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in a new issue