Skip to content
Snippets Groups Projects
Commit 15ddb140 authored by Jiří Setnička's avatar Jiří Setnička
Browse files

UsersFilterForm: Inicializace kategorií a kol až v momentě vytváření objektu

Jinak by přidání nové kategorie/kola nebylo za běhu aplikace detekováno.
parent a9a042d9
No related branches found
No related tags found
2 merge requests!10Nastavení kol a úloh,!9WIP: Zárodek uživatelské části webu a submitování
......@@ -24,13 +24,18 @@ class UsersFilterForm(PagerForm):
# rounds->participations
round_year = wtforms.IntegerField("Ročník")
round_category = wtforms.SelectField("Kategorie", choices=['*'] + sorted(db.get_categories()))
round_seq = wtforms.SelectField("Kolo", choices=['*'] + sorted(db.get_seqs()))
round_category = wtforms.SelectField("Kategorie")
round_seq = wtforms.SelectField("Kolo")
contest_site_code = wtforms.StringField("Soutěžní místo")
participation_state = wtforms.SelectField('Účast', choices=[('*', '*')] + list(db.PartState.choices()))
submit = wtforms.SubmitField("Filtrovat")
def __init__(self, formdata, **kwargs):
super().__init__(formdata=formdata, **kwargs)
self.round_category.choices = ['*'] + sorted(db.get_categories())
self.round_seq.choices = ['*'] + sorted(db.get_seqs())
@app.route('/org/user/')
def org_users():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment