Parameterized title
This commit is contained in:
parent
78ccd2b93d
commit
e56a73e0de
2 changed files with 8 additions and 6 deletions
|
@ -14,3 +14,5 @@ COMMUNITIES = '/path/to/list/of/communities'
|
||||||
LOG = 'snapindices.log'
|
LOG = 'snapindices.log'
|
||||||
MAXLOG = 1000000
|
MAXLOG = 1000000
|
||||||
BACKUPCOUNT = 10
|
BACKUPCOUNT = 10
|
||||||
|
TITLE = 'SNAPIndices'
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ def index():
|
||||||
return redirect('/')
|
return redirect('/')
|
||||||
else:
|
else:
|
||||||
return render_template("index.html",
|
return render_template("index.html",
|
||||||
title = "SNAPIndices",
|
title = application.config['TITLE'],
|
||||||
form = form,
|
form = form,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ def index():
|
||||||
session['des_indices'] = des_air_indices(indices)
|
session['des_indices'] = des_air_indices(indices)
|
||||||
|
|
||||||
return render_template("index.html",
|
return render_template("index.html",
|
||||||
title = "SNAPIndices",
|
title = application.config['TITLE'],
|
||||||
form = form
|
form = form
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ def delete():
|
||||||
@application.route('/datatypes')
|
@application.route('/datatypes')
|
||||||
def datatypes():
|
def datatypes():
|
||||||
return render_template("datatypes.html",
|
return render_template("datatypes.html",
|
||||||
title="SNAPIndices")
|
title=application.config['TITLE'])
|
||||||
|
|
||||||
@application.route('/details')
|
@application.route('/details')
|
||||||
def details():
|
def details():
|
||||||
|
@ -114,7 +114,7 @@ def details():
|
||||||
lon=request.args.get('lon', ''),
|
lon=request.args.get('lon', ''),
|
||||||
community_name=request.args.get('name', ''),
|
community_name=request.args.get('name', ''),
|
||||||
temps=temps,
|
temps=temps,
|
||||||
title="SNAPIndices")
|
title=application.config['TITLE'])
|
||||||
|
|
||||||
@application.teardown_appcontext
|
@application.teardown_appcontext
|
||||||
def shutdown_session(exception=None):
|
def shutdown_session(exception=None):
|
||||||
|
@ -151,9 +151,9 @@ def log_request():
|
||||||
@application.errorhandler(404)
|
@application.errorhandler(404)
|
||||||
def page_not_found(e):
|
def page_not_found(e):
|
||||||
return render_template('404.html',
|
return render_template('404.html',
|
||||||
title="SNAPIndices"), 404
|
title=application.config['TITLE']), 404
|
||||||
|
|
||||||
@application.errorhandler(500)
|
@application.errorhandler(500)
|
||||||
def internal_server_error(e):
|
def internal_server_error(e):
|
||||||
return render_template('500.html',
|
return render_template('500.html',
|
||||||
title="SNAPIndices"), 500
|
title=application.config['TITLE']), 500
|
||||||
|
|
Loading…
Add table
Reference in a new issue