[chronojump-server] Added club section in chronojump configuration - Now the name of the club can be defined in the conf
- From: Marcos Venteo Garcia <mventeo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump-server] Added club section in chronojump configuration - Now the name of the club can be defined in the conf
- Date: Tue, 23 May 2017 16:29:53 +0000 (UTC)
commit 656307b24d46a72425adecb49e7e1c33372ff7dd
Author: Marcos Venteo GarcĂa <mventeo gmail com>
Date: Tue May 23 18:29:42 2017 +0200
Added club section in chronojump configuration
- Now the name of the club can be defined in the configuration file, by default CLUB NAME
chronojump-flask/chronojump_server.py | 4 +++-
chronojump-flask/templates/index.html | 2 +-
chronojump.conf.example | 3 +++
3 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/chronojump-flask/chronojump_server.py b/chronojump-flask/chronojump_server.py
index 3ec2d37..6630347 100644
--- a/chronojump-flask/chronojump_server.py
+++ b/chronojump-flask/chronojump_server.py
@@ -14,6 +14,7 @@ app.config['MYSQL_DATABASE_USER'] = config.get("db","user")
app.config['MYSQL_DATABASE_PASSWORD'] = config.get("db","password")
app.config['MYSQL_DATABASE_DB'] = config.get("db","name")
app.config['MYSQL_DATABASE_HOST'] = config.get("db","server")
+app.config['CLUB_NAME'] = config.get("club", "name")
mysql.init_app(app)
@@ -25,7 +26,8 @@ def getHeader(pageTitle):
@app.route('/')
def main():
- return render_template('index.html')
+ return render_template('index.html',
+ club_name=app.config['CLUB_NAME'])
#call:
diff --git a/chronojump-flask/templates/index.html b/chronojump-flask/templates/index.html
index cca7ff1..eb7227e 100644
--- a/chronojump-flask/templates/index.html
+++ b/chronojump-flask/templates/index.html
@@ -10,7 +10,7 @@
</div>
<div class="col-md-6" style="margin-top:60px">
<h1 class="text-center text-uppercase">Chronojump encoder</h1>
- <h3 class="text-center text-uppercase">CLUB NAME</h3>
+ <h3 class="text-center text-uppercase">{{club_name}}</h3>
</div>
</div>
</div>
diff --git a/chronojump.conf.example b/chronojump.conf.example
index 83cece4..0c92f57 100644
--- a/chronojump.conf.example
+++ b/chronojump.conf.example
@@ -10,3 +10,6 @@ server=db
name=chronojump
user=chronojump
password=chronojump
+
+[club]
+name=CLUB NAME
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]