Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
Estonia_TUIT
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
2022 Competition
Estonia_TUIT
Commits
44cf0734
Commit
44cf0734
authored
2 years ago
by
Aleksandrs Rebriks
Browse files
Options
Downloads
Patches
Plain Diff
fixing routes not working with slashes on windows
parent
e63c8e7a
No related branches found
No related tags found
1 merge request
!1
fixing routes not working with slashes on windows
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app.py
+7
-2
7 additions, 2 deletions
app.py
with
7 additions
and
2 deletions
app.py
+
7
−
2
View file @
44cf0734
...
...
@@ -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
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment