Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Odevzdávací Systém MO
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Martin Mareš
Odevzdávací Systém MO
Commits
afb92a42
Commit
afb92a42
authored
3 years ago
by
Jiří Kalvoda
Browse files
Options
Downloads
Patches
Plain Diff
Import pojmenovaní user -> contestant
parent
6fc27a8a
No related branches found
No related tags found
1 merge request
!97
Import orgů
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
mo/web/org_contest.py
+6
-6
6 additions, 6 deletions
mo/web/org_contest.py
mo/web/templates/org_contestants_import.html
+0
-0
0 additions, 0 deletions
mo/web/templates/org_contestants_import.html
with
6 additions
and
6 deletions
mo/web/org_contest.py
+
6
−
6
View file @
afb92a42
...
...
@@ -412,20 +412,20 @@ def org_contest(ct_id: int, site_id: Optional[int] = None):
)
class
User
ImportForm
(
ImportForm
):
class
Contestant
ImportForm
(
ImportForm
):
pass
@app.route
(
'
/org/contest/c/<int:ct_id>/import-
user
'
,
methods
=
(
'
GET
'
,
'
POST
'
))
@app.route
(
'
/org/contest/r/<int:round_id>/import-
user
'
,
methods
=
(
'
GET
'
,
'
POST
'
))
@app.route
(
'
/org/contest/r/<int:round_id>/h/<int:hier_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-
contestant
'
,
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
):
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
default_place
=
contest
.
place
if
contest
else
ctx
.
hier_place
form
=
User
ImportForm
()
form
=
Contestant
ImportForm
()
imp
=
None
if
form
.
validate_on_submit
():
imp
=
ContestImport
(
...
...
@@ -437,7 +437,7 @@ def org_import_user(round_id: Optional[int] = None, hier_id: Optional[int] = Non
)
return
generic_import_page
(
form
,
imp
,
ctx
.
url_home
(),
template
=
'
org_
user
s_import.html
'
,
template
=
'
org_
contestant
s_import.html
'
,
ctx
=
ctx
,
contest
=
contest
,
round
=
round
,
...
...
This diff is collapsed.
Click to expand it.
mo/web/templates/org_
user
s_import.html
→
mo/web/templates/org_
contestant
s_import.html
+
0
−
0
View file @
afb92a42
File moved
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment