diff --git a/.env.template b/.env.template index cb85fe7..106bc85 100644 --- a/.env.template +++ b/.env.template @@ -12,6 +12,9 @@ REDIS_HOST=redis # Source csv files for indexing CSV_FOLDER_IMPORT_PATH=./docker-emlo/csv_import_files +# Address of portal serving static pages (inc. final /) +PORTAL_URL="https://emlo-portal.bodleian.ox.ac.uk/" + # You can pass either "true" or "false" to run your application in debug mode. DEBUG="false" @@ -21,4 +24,4 @@ SMTP_SERVER=your_smpt_server SMTP_PORT=POST EMAIL_TO=to_emails EMAIL_TO_PASS="your_app_passoword[NOT_YOUR_ACTUAL_PASSWORD]" -SEND_A_COPY="IF_YOU_WISH_TO_SEND_A_COPY_TO_USER_VALUES_ARE[YES, NO]" \ No newline at end of file +SEND_A_COPY="IF_YOU_WISH_TO_SEND_A_COPY_TO_USER_VALUES_ARE[YES, NO]" diff --git a/views/about.py b/views/about.py index d783bf3..d3dd7ca 100644 --- a/views/about.py +++ b/views/about.py @@ -1,8 +1,14 @@ -from flask import Blueprint, render_template +from flask import Blueprint, render_template, redirect +import os +from dotenv import load_dotenv about_bp = Blueprint('about', __name__) +load_dotenv() + +PORTAL_URL = os.getenv("PORTAL_URL") @about_bp.route('/about') def about(): - return render_template('about.jinja2', title="About") + return redirect(PORTAL_URL + "collections/?page_id=907", code=302) + #return render_template('about.jinja2', title="About") diff --git a/views/contribute.py b/views/contribute.py index b8d2bbe..1f13b79 100644 --- a/views/contribute.py +++ b/views/contribute.py @@ -1,8 +1,14 @@ -from flask import Blueprint, render_template +from flask import Blueprint, render_template, redirect +import os +from dotenv import load_dotenv contribute_bp = Blueprint('contribute', __name__) +load_dotenv() + +PORTAL_URL = os.getenv("PORTAL_URL") @contribute_bp.route('/contribute') def contribute(): - return render_template('contribute.jinja2', title="Contribute") + return redirect(PORTAL_URL + "collections/?page_id=913", code=302) + #return render_template('contribute.jinja2', title="Contribute")