Skip to content
Snippets Groups Projects
Commit 44cf0734 authored by Aleksandrs Rebriks's avatar Aleksandrs Rebriks
Browse files

fixing routes not working with slashes on windows

parent e63c8e7a
No related branches found
No related tags found
1 merge request!1fixing routes not working with slashes on windows
......@@ -28,8 +28,13 @@ def index():
@app.route('/<page>')
def pages(page):
return render_template(str(Path('pages') / (page.lower() + '.html')))
return render_template(f"{Path('pages')}/{page.lower()}.html")
# This poebenj ne robit na Windows )))
# (not funny)
# return render_template(str(Path('pages') / (page.lower() + '.html')))
# Main Function, Runs at http://0.0.0.0:8080
if __name__ == "__main__":
app.run(port=8080)
# DEBUG = TRUE ONLY LOCAL
# In prod remove it nahuj
app.run(port=8080, debug = True)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment