Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cmt120-2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Felix Chadwick-Smith
cmt120-2
Commits
9998b777
Commit
9998b777
authored
Jan 10, 2024
by
Felix Chadwick-Smith
Browse files
Options
Downloads
Patches
Plain Diff
removed if_name from app.py and kept it soley on wsgi.py on advice of Matthew
parent
69e10076
No related branches found
No related tags found
1 merge request
!5
Master
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
app.py
+5
-12
5 additions, 12 deletions
app.py
wsgi.py
+1
-2
1 addition, 2 deletions
wsgi.py
with
6 additions
and
14 deletions
app.py
+
5
−
12
View file @
9998b777
...
...
@@ -32,23 +32,24 @@ def home():
print
(
f
"
Error fetching projects:
{
str
(
e
)
}
"
)
return
render_template
(
'
error.html
'
)
# New route for the 'about' page
@app.route
(
'
/about
'
)
def
about
():
return
render_template
(
'
about.html
'
)
# New route for the
E
xperience page
# New route for the
'e
xperience
'
page
@app.route
(
'
/experience
'
)
def
experience
():
# Add logic to fetch data related to the Experience section if needed
return
render_template
(
'
experience.html
'
)
# New route for the
P
ortfolio page
# New route for the
'p
ortfolio
'
page
@app.route
(
'
/portfolio
'
)
def
portfolio
():
# Add logic to fetch data related to the Portfolio section if needed
return
render_template
(
'
portfolio.html
'
)
# New route for the contact page
# New route for the
'
contact
'
page
@app.route
(
'
/contact
'
)
def
contact
():
return
render_template
(
'
contact.html
'
)
...
...
@@ -69,8 +70,7 @@ def add_project():
return
render_template
(
'
add_project.html
'
,
form
=
form
)
# Updated route for serving the my-cv.docx file
# Updated route for serving the 'my-cv.docx' file
@app.route
(
'
/download_cv
'
)
def
download_cv
():
file_path
=
'
static/my-cv.docx
'
...
...
@@ -91,10 +91,3 @@ def download_assessment(filename):
print
(
f
"
Error serving assessment file:
{
str
(
e
)
}
"
)
app
.
logger
.
exception
(
f
"
Error serving assessment file:
{
str
(
e
)
}
"
)
abort
(
500
)
if
__name__
==
'
__main__
'
:
with
app
.
app_context
():
db
.
create_all
()
# Use the application instance provided by OpenShift
app
.
run
(
debug
=
True
)
This diff is collapsed.
Click to expand it.
wsgi.py
+
1
−
2
View file @
9998b777
...
...
@@ -3,6 +3,5 @@ import logging
logging
.
basicConfig
(
stream
=
sys
.
stderr
)
from
app
import
app
as
application
if
__name__
==
'
__main__
'
:
app
=
application
application
.
run
(
host
=
'
0.0.0.0
'
,
port
=
8080
)
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