Embellish the form
This commit is contained in:
parent
39b97cb97f
commit
a9c02410e6
@ -29,9 +29,6 @@ class QuestionForm(Form):
|
|||||||
check = BooleanField('Bitte nicht ankreuzen')
|
check = BooleanField('Bitte nicht ankreuzen')
|
||||||
email = EmailField('Email-Adresse')
|
email = EmailField('Email-Adresse')
|
||||||
|
|
||||||
class User():
|
|
||||||
name = ''
|
|
||||||
|
|
||||||
@app.route('/')
|
@app.route('/')
|
||||||
def index():
|
def index():
|
||||||
return render_template('index.html', title='Test', text='Hallo, Fooboar')
|
return render_template('index.html', title='Test', text='Hallo, Fooboar')
|
||||||
@ -55,10 +52,10 @@ def questions():
|
|||||||
return redirect(url_for('result'))
|
return redirect(url_for('result'))
|
||||||
return render_template('questions.html', form=form)
|
return render_template('questions.html', form=form)
|
||||||
|
|
||||||
@app.route('/form')
|
# @app.route('/form')
|
||||||
def form():
|
# def form():
|
||||||
id = generate_id()
|
# id = generate_id()
|
||||||
return render_template('form.html', title='Test', text='Hallo, Fooboar', your_id=id)
|
# return render_template('form.html', title='Test', text='Hallo, Fooboar', your_id=id)
|
||||||
|
|
||||||
@app.route('/result')
|
@app.route('/result')
|
||||||
def result():
|
def result():
|
||||||
|
|||||||
@ -14,7 +14,7 @@
|
|||||||
<nav>
|
<nav>
|
||||||
<ul>
|
<ul>
|
||||||
<li {% if request.path == url_for('index') %} class="active" {% endif %}><a href="{{ url_for('index') }}">Home</a></li>
|
<li {% if request.path == url_for('index') %} class="active" {% endif %}><a href="{{ url_for('index') }}">Home</a></li>
|
||||||
<li {% if request.path == url_for('form') %} class="active" {% endif %}><a href="{{ url_for('form') }}">Formular</a></li>
|
<li {% if request.path == url_for('questions') %} class="active" {% endif %}><a href="{{ url_for('questions') }}">Formular</a></li>
|
||||||
<li {% if request.path == url_for('answers') %} class="active" {% endif %}><a href="{{ url_for('answers') }}">Meine Antworten</a></li>
|
<li {% if request.path == url_for('answers') %} class="active" {% endif %}><a href="{{ url_for('answers') }}">Meine Antworten</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
Kein Alkohol mehr.
|
Kein Alkohol mehr.
|
||||||
</div>
|
</div>
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<a href="{{ url_for('form') }}"><button>Jetzt mitspielen</button></a>
|
<a href="{{ url_for('questions') }}"><button>Jetzt mitspielen</button></a>
|
||||||
<a href="{{ url_for('answers') }}"><button>Hier geht's zu deinen Antworten</button></a>
|
<a href="{{ url_for('answers') }}"><button>Hier geht's zu deinen Antworten</button></a>
|
||||||
<a href="{{ url_for('solution') }}"><button>Lösung einreichen</button></a>
|
<a href="{{ url_for('solution') }}"><button>Lösung einreichen</button></a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -4,13 +4,21 @@
|
|||||||
<form method=post>
|
<form method=post>
|
||||||
<dl>
|
<dl>
|
||||||
{{ render_field(form.computer) }}
|
{{ render_field(form.computer) }}
|
||||||
|
<br>
|
||||||
{{ render_field(form.status) }}
|
{{ render_field(form.status) }}
|
||||||
|
<br>
|
||||||
{{ render_field(form.vegetable) }}
|
{{ render_field(form.vegetable) }}
|
||||||
|
<br>
|
||||||
{{ render_field(form.spirit_animal) }}
|
{{ render_field(form.spirit_animal) }}
|
||||||
|
<br>
|
||||||
{{ render_field(form.operating_system) }}
|
{{ render_field(form.operating_system) }}
|
||||||
|
<br>
|
||||||
{{ form.check }} {{ form.check.label }}
|
{{ form.check }} {{ form.check.label }}
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
{{ render_field(form.email) }}
|
{{ render_field(form.email) }}
|
||||||
</dl>
|
</dl>
|
||||||
|
<p></p>
|
||||||
<p><input type=submit value=Abschicken>
|
<p><input type=submit value=Abschicken>
|
||||||
</form>
|
</form>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user