Skip to content
Snippets Groups Projects
Commit afb92a42 authored by Jiří Kalvoda's avatar Jiří Kalvoda
Browse files

Import pojmenovaní user -> contestant

parent 6fc27a8a
No related branches found
No related tags found
1 merge request!97Import orgů
...@@ -412,20 +412,20 @@ def org_contest(ct_id: int, site_id: Optional[int] = None): ...@@ -412,20 +412,20 @@ def org_contest(ct_id: int, site_id: Optional[int] = None):
) )
class UserImportForm(ImportForm): class ContestantImportForm(ImportForm):
pass pass
@app.route('/org/contest/c/<int:ct_id>/import-user', methods=('GET', 'POST')) @app.route('/org/contest/c/<int:ct_id>/import-contestant', methods=('GET', 'POST'))
@app.route('/org/contest/r/<int:round_id>/import-user', methods=('GET', 'POST')) @app.route('/org/contest/r/<int:round_id>/import-contestant', methods=('GET', 'POST'))
@app.route('/org/contest/r/<int:round_id>/h/<int:hier_id>/import-user', methods=('GET', 'POST')) @app.route('/org/contest/r/<int:round_id>/h/<int:hier_id>/import-contestant', methods=('GET', 'POST'))
def org_import_user(round_id: Optional[int] = None, hier_id: Optional[int] = None, ct_id: Optional[int] = None): def org_import_user(round_id: Optional[int] = None, hier_id: Optional[int] = None, ct_id: Optional[int] = None):
ctx = get_context(round_id=round_id, hier_id=hier_id, ct_id=ct_id, right_needed=Right.manage_contest) ctx = get_context(round_id=round_id, hier_id=hier_id, ct_id=ct_id, right_needed=Right.manage_contest)
round, contest = ctx.master_round, ctx.master_contest round, contest = ctx.master_round, ctx.master_contest
default_place = contest.place if contest else ctx.hier_place default_place = contest.place if contest else ctx.hier_place
form = UserImportForm() form = ContestantImportForm()
imp = None imp = None
if form.validate_on_submit(): if form.validate_on_submit():
imp = ContestImport( imp = ContestImport(
...@@ -437,7 +437,7 @@ def org_import_user(round_id: Optional[int] = None, hier_id: Optional[int] = Non ...@@ -437,7 +437,7 @@ def org_import_user(round_id: Optional[int] = None, hier_id: Optional[int] = Non
) )
return generic_import_page( return generic_import_page(
form, imp, ctx.url_home(), form, imp, ctx.url_home(),
template='org_users_import.html', template='org_contestants_import.html',
ctx=ctx, ctx=ctx,
contest=contest, contest=contest,
round=round, round=round,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment