mirror of
https://github.com/sartography/protocol-builder-mock.git
synced 2025-02-14 16:47:30 +00:00
Sets base href from environment variable
This commit is contained in:
parent
0fa80ea5fb
commit
4a03fb1ede
2
app.py
2
app.py
@ -107,7 +107,7 @@ def index():
|
|||||||
# display results
|
# display results
|
||||||
studies = db.session.query(Study).order_by(Study.DATE_MODIFIED.desc()).all()
|
studies = db.session.query(Study).order_by(Study.DATE_MODIFIED.desc()).all()
|
||||||
table = StudyTable(studies)
|
table = StudyTable(studies)
|
||||||
return render_template('index.html', table=table)
|
return render_template('index.html', table=table, BASE_HREF=app.config['BASE_HREF'])
|
||||||
|
|
||||||
|
|
||||||
@app.route('/new_study', methods=['GET', 'POST'])
|
@app.route('/new_study', methods=['GET', 'POST'])
|
||||||
|
@ -8,6 +8,7 @@ FLASK_PORT = environ.get('PORT0') or environ.get('FLASK_PORT', default="5001")
|
|||||||
CORS_ENABLED = False
|
CORS_ENABLED = False
|
||||||
DEVELOPMENT = environ.get('DEVELOPMENT', default="true") == "true"
|
DEVELOPMENT = environ.get('DEVELOPMENT', default="true") == "true"
|
||||||
TESTING = environ.get('TESTING', default="false") == "true"
|
TESTING = environ.get('TESTING', default="false") == "true"
|
||||||
|
BASE_HREF = environ.get('BASE_HREF', default="/")
|
||||||
|
|
||||||
DB_HOST = environ.get('DB_HOST', default="localhost")
|
DB_HOST = environ.get('DB_HOST', default="localhost")
|
||||||
DB_PORT = environ.get('DB_PORT', default="5432")
|
DB_PORT = environ.get('DB_PORT', default="5432")
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<title>Protocol Builder Mock</title>
|
<title>Protocol Builder Mock</title>
|
||||||
|
<base href="{{ BASE_HREF }}">
|
||||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
||||||
<link rel="stylesheet" href="https://use.typekit.net/kwp6dli.css">
|
<link rel="stylesheet" href="https://use.typekit.net/kwp6dli.css">
|
||||||
{% assets 'app_scss' %}
|
{% assets 'app_scss' %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user