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