forked from bton/matekasse
favicon
This commit is contained in:
parent
489c0a6f0f
commit
4b699c2210
1 changed files with 7 additions and 2 deletions
9
main.py
9
main.py
|
@ -1,5 +1,5 @@
|
||||||
import queue, sqlite3, time, atexit, sys, uuid, json, urllib.parse, logging, datetime
|
import queue, sqlite3, time, atexit, sys, uuid, json, urllib.parse, logging, datetime, os
|
||||||
from flask import Flask, render_template, request, make_response, session
|
from flask import Flask, render_template, request, make_response, session, send_from_directory
|
||||||
from flask_socketio import SocketIO, join_room, leave_room
|
from flask_socketio import SocketIO, join_room, leave_room
|
||||||
from flask_session import Session
|
from flask_session import Session
|
||||||
from markupsafe import escape
|
from markupsafe import escape
|
||||||
|
@ -36,6 +36,10 @@ def exit_handler():
|
||||||
sys.exit("Program sucsesfully exited")
|
sys.exit("Program sucsesfully exited")
|
||||||
|
|
||||||
#website
|
#website
|
||||||
|
@app.route('/favicon.ico')
|
||||||
|
def favicon():
|
||||||
|
return send_from_directory(os.path.join(app.root_path, 'static'),'favicon.ico',mimetype='Logo_CCC.icon')
|
||||||
|
|
||||||
@app.route("/")
|
@app.route("/")
|
||||||
def index():
|
def index():
|
||||||
return '<a href="/list">user and tag list</a> <p>The creator of this website accepts no liability for any linguistic or technical errors!</p><br style="line-height: 500%;"></br><a href="/documentation">Doumentation</a>'
|
return '<a href="/list">user and tag list</a> <p>The creator of this website accepts no liability for any linguistic or technical errors!</p><br style="line-height: 500%;"></br><a href="/documentation">Doumentation</a>'
|
||||||
|
@ -50,6 +54,7 @@ def list():
|
||||||
text = text + f'<p><a href="list/user?user={username}">{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>'
|
text = text + f'<p><a href="list/user?user={username}">{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>
|
return '''<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
<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">
|
<script type="text/javascript" charset="utf-8">
|
||||||
var socket = io();
|
var socket = io();
|
||||||
socket.on("update", function(){
|
socket.on("update", function(){
|
||||||
|
|
Loading…
Reference in a new issue