summaryrefslogtreecommitdiff
path: root/main.py
diff options
context:
space:
mode:
authorxengineering <mail2xengineering@protonmail.com>2020-09-03 10:51:58 +0200
committerxengineering <mail2xengineering@protonmail.com>2020-09-03 10:51:58 +0200
commit531f9bf63d34a9e54837c8a0bf69da9a08a82525 (patch)
tree16785ac459619fab79ea4a5e6c8656d184e08e6c /main.py
parent9991f2fc1d648a7dd738ff8ded7a39b4a6e71c5d (diff)
downloadweb-template-531f9bf63d34a9e54837c8a0bf69da9a08a82525.tar
web-template-531f9bf63d34a9e54837c8a0bf69da9a08a82525.tar.zst
web-template-531f9bf63d34a9e54837c8a0bf69da9a08a82525.zip
Restructure Files and Directories
Diffstat (limited to 'main.py')
-rwxr-xr-xmain.py15
1 files changed, 5 insertions, 10 deletions
diff --git a/main.py b/main.py
index 3203bf5..670c7af 100755
--- a/main.py
+++ b/main.py
@@ -30,19 +30,14 @@ app = Flask(__name__)
@app.route('/')
def index():
- return current_app.send_static_file('index.html')
+ return render_template('index.html')
-@app.route('/style.css')
-def style():
- return current_app.send_static_file('style.css')
-
-
-@app.route('/favicon.ico')
-def favicon():
- return current_app.send_static_file('favicon.ico')
+@app.route('/static/css/<css_file>')
+def css(css_file):
+ return current_app.send_static_file("css/{}".format(css_file))
if __name__ == '__main__':
serve(app, listen='*:8080') # production server
- #app.run() # test server
+ #app.run() # debug server - NOT FOR PRODUCTION!