diff --git a/app.py b/app.py index d3dca17..f4416ec 100644 --- a/app.py +++ b/app.py @@ -51,6 +51,9 @@ def create_app(): from route_forms import blueprint as forms_blueprint app.register_blueprint(forms_blueprint) + from static_routes import blueprint as static_blueprint + app.register_blueprint(static_blueprint) + @app.errorhandler(404) def page_not_found(e): # note that we set the 404 status explicitly diff --git a/routes.py b/routes.py index 852ad88..b66af4d 100644 --- a/routes.py +++ b/routes.py @@ -19,11 +19,6 @@ def index(): # put application's code here return render_template('layouts/index.html', new_users=users, stats=stats) -@blueprint.route('/about') -def about(): - return render_template('pages/about.html') - - @blueprint.route('/users') def browse(): users = User.query.all() @@ -87,20 +82,6 @@ def edit_user(username: str): form.process(obj=user) return render_template('pages/user_edit.html', form=form) - -@blueprint.route('/terms_of_service') -def tos(): - return render_template('static/tos.html') - - -@blueprint.route('/privacy') -def privacy(): - return render_template('static/privacy.html') - - -@blueprint.route('/license') -def license(): - return render_template('static/license.html') # @blueprint.route('/blogs') # def blogs(): # return render_template('pages/blogs.html') diff --git a/static_routes.py b/static_routes.py new file mode 100644 index 0000000..5f00b01 --- /dev/null +++ b/static_routes.py @@ -0,0 +1,23 @@ +from flask import Blueprint, redirect, render_template, url_for, request + +blueprint = Blueprint('static', __name__) + + +@blueprint.route('/about') +def about(): + return render_template('pages/about.html') + + +@blueprint.route('/terms_of_service') +def tos(): + return render_template('static/tos.html') + + +@blueprint.route('/privacy') +def privacy(): + return render_template('static/privacy.html') + + +@blueprint.route('/license') +def license(): + return render_template('static/license.html') diff --git a/templates/layouts/footer.html b/templates/layouts/footer.html index c5e100f..e7b3bf9 100644 --- a/templates/layouts/footer.html +++ b/templates/layouts/footer.html @@ -3,10 +3,10 @@ created by Ryan Walters and Zachary Seligman
©2022 Runnerspace.live All Rights Reserved. diff --git a/templates/layouts/header.html b/templates/layouts/header.html index 1698940..3679961 100644 --- a/templates/layouts/header.html +++ b/templates/layouts/header.html @@ -24,7 +24,7 @@ {#