mirror of
https://github.com/StefBuwalda/ProjectIOT.git
synced 2025-11-01 12:19:57 +00:00
frontend changes
This commit is contained in:
1
AT_frontend/.gitignore
vendored
1
AT_frontend/.gitignore
vendored
@@ -1 +1,2 @@
|
|||||||
venvs/
|
venvs/
|
||||||
|
.__pychache__/
|
||||||
@@ -9,27 +9,5 @@ app = Flask(__name__)
|
|||||||
|
|
||||||
app.config['SECRET_KEY'] = 'mijngeheimesleutel'
|
app.config['SECRET_KEY'] = 'mijngeheimesleutel'
|
||||||
|
|
||||||
class InfoForm(FlaskForm):
|
|
||||||
|
|
||||||
naam = StringField('Wat is je naam?',validators=[DataRequired()])
|
|
||||||
vrouw = BooleanField("Ben je een vrouw?")
|
|
||||||
instrument = RadioField('Welk instrument wil je leren bespelen?', choices=[('ins_een','Gitaar'),('ins_twee','Drums')])
|
|
||||||
plaats = SelectField(u'Welke locatie heeft de voorkeur?',
|
|
||||||
choices=[('as', 'Assen'), ('dr', 'Drachten'), ('gr', 'Groningen')])
|
|
||||||
feedback = TextAreaField()
|
|
||||||
submit = SubmitField('Verzend')
|
|
||||||
|
|
||||||
@app.route('/', methods=['GET', 'POST'])
|
|
||||||
def index():
|
|
||||||
|
|
||||||
form = InfoForm()
|
|
||||||
if form.validate_on_submit():
|
|
||||||
|
|
||||||
session['naam'] = form.username.data
|
|
||||||
session['password'] = form.password.data
|
|
||||||
|
|
||||||
return render_template('dashboard.html')
|
|
||||||
return render_template('login.html', form=form)
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
app.run(debug=True)
|
app.run(debug=True)
|
||||||
Reference in New Issue
Block a user