| from .interventions import interventions as interventions_blueprint | from .interventions import interventions as interventions_blueprint | ||||
| app.register_blueprint(interventions_blueprint) | app.register_blueprint(interventions_blueprint) | ||||
| # blueprint for hidden parts of app (Section 3: Hidden in plain sight) | |||||
| from .hidden import hidden as hidden_blueprint | |||||
| app.register_blueprint(hidden_blueprint) | |||||
| # blueprint for offrecord parts of app (Section 4: Off the record) | |||||
| from .offrecord import offrecord as offrecord_blueprint | |||||
| app.register_blueprint(offrecord_blueprint) | |||||
| # blueprint for making parts of app (Section 5: Making of) | |||||
| from .making import making as making_blueprint | |||||
| app.register_blueprint(making_blueprint) | |||||
| # blueprint for data parts of app | # blueprint for data parts of app | ||||
| from .data import data as data_blueprint | from .data import data as data_blueprint | ||||
| app.register_blueprint(data_blueprint) | app.register_blueprint(data_blueprint) |
| # @name: hidden.py | |||||
| # @creation_date: 2022-10-27 | |||||
| # @license: The MIT License <https://opensource.org/licenses/MIT> | |||||
| # @author: Simon Bowie <ad7588@coventry.ac.uk> | |||||
| # @purpose: hidden route for Section 3: Hidden in plain sight | |||||
| # @acknowledgements: | |||||
| from flask import Blueprint, render_template | |||||
| import markdown | |||||
| hidden = Blueprint('hidden', __name__) | |||||
| # route for hidden page | |||||
| @hidden.route('/hidden/') | |||||
| def index(): | |||||
| return render_template('index.html') | |||||
| # route for active theme page | |||||
| @hidden.route('/hidden/active/') | |||||
| def active(): | |||||
| return render_template('index.html') |
| # @creation_date: 2022-09-09 | # @creation_date: 2022-09-09 | ||||
| # @license: The MIT License <https://opensource.org/licenses/MIT> | # @license: The MIT License <https://opensource.org/licenses/MIT> | ||||
| # @author: Simon Bowie <ad7588@coventry.ac.uk> | # @author: Simon Bowie <ad7588@coventry.ac.uk> | ||||
| # @purpose: inteventions route for Section 2: Search Interventions | |||||
| # @purpose: interventions route for Section 2: Search Interventions | |||||
| # @acknowledgements: | # @acknowledgements: | ||||
| from flask import Blueprint, render_template, request | from flask import Blueprint, render_template, request | ||||
| interventions = Blueprint('interventions', __name__) | interventions = Blueprint('interventions', __name__) | ||||
| # route for interventions page | |||||
| @interventions.route('/interventions/') | |||||
| def index(): | |||||
| return render_template('index.html') | |||||
| # route for random entry page ('A random entry') | # route for random entry page ('A random entry') | ||||
| @interventions.route('/interventions/random/') | @interventions.route('/interventions/random/') | ||||
| def random_record(): | def random_record(): |
| # @creation_date: 2022-09-07 | # @creation_date: 2022-09-07 | ||||
| # @license: The MIT License <https://opensource.org/licenses/MIT> | # @license: The MIT License <https://opensource.org/licenses/MIT> | ||||
| # @author: Simon Bowie <ad7588@coventry.ac.uk> | # @author: Simon Bowie <ad7588@coventry.ac.uk> | ||||
| # @purpose: Main route for index and other miscellaneous pages | |||||
| # @purpose: Main route for index page, contents, frontmatter, and other miscellaneous pages | |||||
| # @acknowledgements: | # @acknowledgements: | ||||
| # https://www.digitalocean.com/community/tutorials/how-to-add-authentication-to-your-app-with-flask-login | # https://www.digitalocean.com/community/tutorials/how-to-add-authentication-to-your-app-with-flask-login | ||||
| # @name: making.py | |||||
| # @creation_date: 2022-10-27 | |||||
| # @license: The MIT License <https://opensource.org/licenses/MIT> | |||||
| # @author: Simon Bowie <ad7588@coventry.ac.uk> | |||||
| # @purpose: making route for Section 5: Making of | |||||
| # @acknowledgements: | |||||
| from flask import Blueprint, render_template | |||||
| import markdown | |||||
| making = Blueprint('making', __name__) | |||||
| # route for making of page | |||||
| @making.route('/making/') | |||||
| def index(): | |||||
| return render_template('index.html') |
| # @name: offrecord.py | |||||
| # @creation_date: 2022-10-27 | |||||
| # @license: The MIT License <https://opensource.org/licenses/MIT> | |||||
| # @author: Simon Bowie <ad7588@coventry.ac.uk> | |||||
| # @purpose: offrecord route for Section 4: Off the record | |||||
| # @acknowledgements: | |||||
| from flask import Blueprint, render_template | |||||
| import markdown | |||||
| offrecord = Blueprint('offrecord', __name__) | |||||
| # route for off the record page | |||||
| @offrecord.route('/offrecord/') | |||||
| def index(): | |||||
| return render_template('index.html') |