From f928449666036c3fa3bf4bbdabdec1e778abc7ee Mon Sep 17 00:00:00 2001 From: Ville Rantanen Date: Thu, 13 Dec 2018 21:14:13 +0200 Subject: [PATCH] title --- templates/layout.html | 2 +- utils.py | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/templates/layout.html b/templates/layout.html index 80c7407..9182972 100644 --- a/templates/layout.html +++ b/templates/layout.html @@ -1,6 +1,6 @@ -aBot +aBot // {{ g.title|safe }} diff --git a/utils.py b/utils.py index 4aca53d..432b6bd 100644 --- a/utils.py +++ b/utils.py @@ -161,7 +161,8 @@ def parse_form(key): 'draft': False, 'vote_style': "closed", 'show_results': False, - 'questions': [] + 'questions': [], + 'title': "" } key = secure_filename(key) try: @@ -173,6 +174,10 @@ def parse_form(key): rowsl = row.lower().rstrip() if row.startswith("#"): continue + if rowsl.startswith("title: "): + form['title'] = row[6:].strip() + g.title = row[6:].strip() + continue if rowsl.startswith("expires: "): form['expires'] = parse_row_date(row) continue