diff --git a/__init__.py b/__init__.py deleted file mode 100644 index 8b13789..0000000 --- a/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/app.py b/app.py index dbb4030..d056e47 100644 --- a/app.py +++ b/app.py @@ -1,4 +1,16 @@ from flask import Flask, render_template +from web import blueprint +''' + Main entrypoint for Flask application. + Initialises any components that are needed at runtime such as the + Database manager... +''' +def main(): + app = Flask(__name__) + # Register a blueprint + app.register_blueprint(blueprint) + app.run(debug=True) + if __name__ == "__main__": - print("Hello, World!") + main() diff --git a/static/assets/img/WMGZON.png b/templates/assets/img/WMGZON.png similarity index 100% rename from static/assets/img/WMGZON.png rename to templates/assets/img/WMGZON.png diff --git a/static/assets/img/products/brake-disks.png b/templates/assets/img/products/brake-disks.png similarity index 100% rename from static/assets/img/products/brake-disks.png rename to templates/assets/img/products/brake-disks.png diff --git a/static/css/style.css b/templates/css/style.css similarity index 100% rename from static/css/style.css rename to templates/css/style.css diff --git a/static/index.html b/templates/index.html similarity index 100% rename from static/index.html rename to templates/index.html diff --git a/web/__init__.py b/web/__init__.py new file mode 100644 index 0000000..a842805 --- /dev/null +++ b/web/__init__.py @@ -0,0 +1,5 @@ +from flask import Blueprint + +blueprint = Blueprint('endpoints', __name__) + +from . import endpoints \ No newline at end of file diff --git a/web/endpoints.py b/web/endpoints.py new file mode 100644 index 0000000..57f6c6f --- /dev/null +++ b/web/endpoints.py @@ -0,0 +1,9 @@ +from . import blueprint +from flask import render_template + +''' + Function responsible for displaying the main landing page of the site +''' +@blueprint.route('/') +def welcome_page(): + return render_template('index.html')