title
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<!doctype html>
|
<!doctype html>
|
||||||
<head>
|
<head>
|
||||||
<title>aBot</title>
|
<title>aBot // {{ g.title|safe }}</title>
|
||||||
<meta name="viewport" content="width=440" />
|
<meta name="viewport" content="width=440" />
|
||||||
<link rel=stylesheet type=text/css href="{{ url_for('static', filename='style.css') }}">
|
<link rel=stylesheet type=text/css href="{{ url_for('static', filename='style.css') }}">
|
||||||
<script src="{{ url_for('static', filename='script.js') }}" type="text/javascript"></script>
|
<script src="{{ url_for('static', filename='script.js') }}" type="text/javascript"></script>
|
||||||
|
|||||||
7
utils.py
7
utils.py
@@ -161,7 +161,8 @@ def parse_form(key):
|
|||||||
'draft': False,
|
'draft': False,
|
||||||
'vote_style': "closed",
|
'vote_style': "closed",
|
||||||
'show_results': False,
|
'show_results': False,
|
||||||
'questions': []
|
'questions': [],
|
||||||
|
'title': ""
|
||||||
}
|
}
|
||||||
key = secure_filename(key)
|
key = secure_filename(key)
|
||||||
try:
|
try:
|
||||||
@@ -173,6 +174,10 @@ def parse_form(key):
|
|||||||
rowsl = row.lower().rstrip()
|
rowsl = row.lower().rstrip()
|
||||||
if row.startswith("#"):
|
if row.startswith("#"):
|
||||||
continue
|
continue
|
||||||
|
if rowsl.startswith("title: "):
|
||||||
|
form['title'] = row[6:].strip()
|
||||||
|
g.title = row[6:].strip()
|
||||||
|
continue
|
||||||
if rowsl.startswith("expires: "):
|
if rowsl.startswith("expires: "):
|
||||||
form['expires'] = parse_row_date(row)
|
form['expires'] = parse_row_date(row)
|
||||||
continue
|
continue
|
||||||
|
|||||||
Reference in New Issue
Block a user