From 58cbbd488419008c8ea4167c7a75adaa71134d95 Mon Sep 17 00:00:00 2001 From: Hell13Cat <46496367+Hell13Cat@users.noreply.github.com> Date: Wed, 29 Dec 2021 00:23:24 +0300 Subject: [PATCH] build0005 --- server.py | 10 ++++++---- templates/index.html | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/server.py b/server.py index 475e996..d132fe8 100644 --- a/server.py +++ b/server.py @@ -1,4 +1,6 @@ -from flask import Flask, render_template +from flask import Flask, render_template, send_from_directory +import os +import main app = Flask(__name__) @@ -7,6 +9,6 @@ app = Flask(__name__) def hello(): return render_template('index.html') -@app.route('/static') -def hello(): - return 'Hello, World!' \ No newline at end of file +@app.route('/static/') +def static(file_name): + return send_from_directory(os.getcwd()+"/static/"+file_name, file_name) \ No newline at end of file diff --git a/templates/index.html b/templates/index.html index 8a4d17b..368da07 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,7 +1,7 @@ Nyako Page - +