diff --git a/app/__init__.py b/app/__init__.py index 8b60638ce0b01b2e12041db657c6f5b421644790..d6526d6fa9b25bc757f0e0b75f32f958f01faba3 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -4,10 +4,15 @@ from flask import Flask from config import Config +from flask_cookies import Cookies + + def create_app(config_class=Config): app = Flask(__name__) app.config.from_object(config_class) - + #Cookies, can add optional Google Tag Manager ID below + cookies = Cookies() + cookies.init_app(app) # Initialize Flask extensions here # Register blueprints here @@ -17,7 +22,7 @@ def create_app(config_class=Config): from app.bookings import bp as bookings_bp app.register_blueprint(bookings_bp, url_prefix='/bookings') - @app.route('/test/') + @app.route('/test') def test_page(): return '<h1>Testing the Flask Application Factory Pattern</h1>' diff --git a/app/__pycache__/__init__.cpython-38.pyc b/app/__pycache__/__init__.cpython-38.pyc index ba6e4f839384b94fe5e798434c441f1f5eda512f..a442c802f1d5525948c0f498ae48da9b052c7402 100644 Binary files a/app/__pycache__/__init__.cpython-38.pyc and b/app/__pycache__/__init__.cpython-38.pyc differ diff --git a/app/bookings/routes.py b/app/bookings/routes.py index e68d45fb936ba61d33e51d967862190876d5ab31..20bb99707c5ec2a64aa5c5b0c728defe0d40be47 100644 --- a/app/bookings/routes.py +++ b/app/bookings/routes.py @@ -1,6 +1,10 @@ -from flask import render_template +from flask import render_template, redirect, url_for from app.bookings import bp -@bp.route('/') +@bp.route('/home') def index(): return render_template('bookings/index.html') + +@bp.route('/') +def redirect_index(): + return redirect(url_for('bookings.index'), code=301) \ No newline at end of file diff --git a/app/main/__pycache__/routes.cpython-38.pyc b/app/main/__pycache__/routes.cpython-38.pyc index 0c13488dc05aa40a79b2d12379a20a916b702b7b..9b36710729d79139face7d8615b7d382d8d65b88 100644 Binary files a/app/main/__pycache__/routes.cpython-38.pyc and b/app/main/__pycache__/routes.cpython-38.pyc differ diff --git a/app/static/base.css b/app/static/base.css index 5d8707bdc9e571fe37d09a8be32563636ae510e1..dfa6489286d4b2f6e57ea8777ba3cffce5912887 100644 --- a/app/static/base.css +++ b/app/static/base.css @@ -79,6 +79,10 @@ flex: 1; /* Allows content to expand */ } +.wrapper { + flex: 1; +} + /* Remove default padding which occurs around the nav bar on some browsers such as Edge and setup default font. This should be changed where required on inherited elements diff --git a/app/templates/base.html b/app/templates/base.html index 015645e9dcbde2b193e6e3e2e610a13a6e252689..f2ea15dadb0267a29c06aed37e981352876e3989 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -1,5 +1,4 @@ <!-- Core HTML page which includes navigation bar and footer and determines the order in which items are loaded, all other templates should extend this base template --> - <!DOCTYPE html> <html> <head> @@ -16,8 +15,8 @@ <img src="{{ url_for('static', filename='images/nav_icon.jpeg')}}"> <nav class="navbar"> <ul> - <li class="nav_list_item"><a href="#">Home</a></li> - <li class="nav_list_item"><a href="#">About</a></li> + <li class="nav_list_item"><a href="{{ url_for('main.index') }}">Home</a></li> + <li class="nav_list_item"><a href="{{ url_for('bookings.index') }}">Bookings</a></li> <li class="nav_list_item"><a href="#">Pricing</a></li> <li class="nav_list_item"><a href="#">Terms of use</a></li> <li class="nav_list_item"><a href="#">Contact</a></li> @@ -34,7 +33,10 @@ <footer> <div class="footer"> <div class="row"> - <div class="footer_column">About Us</div> + <div class="footer_column"> + <div><a >About Us</div> + <div>About Us</div> + </div> <div class="footer_column">Contact</div> <div class="footer_column">Login</div> </div>