Module psdi_data_conversion.gui.get

get.py

This module defines the various webpages (the "GET" methods) provided by the website, connecting them to relevant functions to return rendered templates.

Functions

def database()
Expand source code
def database():
    """Return the raw database JSON file
    """
    return open(get_database_path(), "r").read()

Return the raw database JSON file

def documentation()
Expand source code
def documentation():
    """Return the documentation page
    """
    return render_template("documentation.htm",
                           **get_env_kwargs())

Return the documentation page

def index()
Expand source code
def index():
    """Return the web page along with relevant data
    """
    return render_template("index.htm",
                           **get_env_kwargs())

Return the web page along with relevant data

def init_get(app: flask.app.Flask)
Expand source code
def init_get(app: Flask):
    """Connect the provided Flask app to each of the pages on the site
    """

    app.route('/')(index)
    app.route('/index.htm')(index)

    app.route('/documentation.htm')(documentation)

    app.route('/report.htm')(report)

    app.route('/database/')(database)

Connect the provided Flask app to each of the pages on the site

def report()
Expand source code
def report():
    """Return the report page
    """
    return render_template("report.htm",
                           **get_env_kwargs())

Return the report page