Skip to content
Snippets Groups Projects
Commit 9998b777 authored by Felix Chadwick-Smith's avatar Felix Chadwick-Smith
Browse files

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!5Master
......@@ -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 Experience page
# New route for the 'experience' 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 Portfolio page
# New route for the 'portfolio' 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)
......@@ -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)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment