portfolio-website/project/__init__.py
Alexander Hosking c53e72b9af Framework for Site
Add Portfolio module
Add Logo
2022-07-07 01:19:28 -04:00

18 lines
428 B
Python

from flask import Flask, render_template
def create_app():
app = Flask(__name__)
register_blueprints(app)
register_error_pages(app)
return app
def register_blueprints(app):
from project.portfolio import portfolio_blueprint
app.register_blueprint(portfolio_blueprint)
def register_error_pages(app):
@app.errorhandler(404)
def page_not_found(e):
return render_template('404.html'), 404