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
MO-P
Odevzdávací Systém MO
Commits
f28266e2
Project 'mj/mo-submit' was moved to 'mo-p/osmo'. Please update any links and bookmarks that may still have the old path.
Commit
f28266e2
authored
7 months ago
by
Martin Mareš
Browse files
Options
Downloads
Patches
Plain Diff
Diplomy: Možnost stažení standardního pozadí
parent
ae315d27
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
mo/web/org_certs.py
+10
-0
10 additions, 0 deletions
mo/web/org_certs.py
mo/web/templates/org_certificates.html
+2
-1
2 additions, 1 deletion
mo/web/templates/org_certificates.html
with
12 additions
and
1 deletion
mo/web/org_certs.py
+
10
−
0
View file @
f28266e2
...
@@ -269,6 +269,16 @@ def org_cert_file(ct_id: int, cert_type: str, filename: str, user_id: Optional[i
...
@@ -269,6 +269,16 @@ def org_cert_file(ct_id: int, cert_type: str, filename: str, user_id: Optional[i
return
send_certificate
(
ct_id
,
cert_type
,
filename
,
user_id
)
return
send_certificate
(
ct_id
,
cert_type
,
filename
,
user_id
)
@app.route
(
'
/org/contest/c/<int:ct_id>/certificates/standard-bg.pdf
'
)
def
org_certificates_standard_bg
(
ct_id
:
int
):
ctx
=
get_context
(
ct_id
=
ct_id
)
bg
=
BackgroundType
.
standard
.
find_default_background
(
ctx
.
round
)
if
bg
is
not
None
:
return
send_file
(
bg
,
mimetype
=
'
application/pdf
'
)
else
:
raise
werkzeug
.
exceptions
.
NotFound
()
@app.route
(
'
/org/contest/school-results/<int:school_id>/c/<int:ct_id>/certificates/<cert_type>/<filename>
'
)
@app.route
(
'
/org/contest/school-results/<int:school_id>/c/<int:ct_id>/certificates/<cert_type>/<filename>
'
)
def
org_school_results_certs
(
school_id
:
int
,
ct_id
:
int
,
cert_type
:
str
,
filename
:
str
):
def
org_school_results_certs
(
school_id
:
int
,
ct_id
:
int
,
cert_type
:
str
,
filename
:
str
):
sess
=
db
.
get_session
()
sess
=
db
.
get_session
()
...
...
This diff is collapsed.
Click to expand it.
mo/web/templates/org_certificates.html
+
2
−
1
View file @
f28266e2
...
@@ -177,7 +177,8 @@ Pokud je schválíte, po uzavření kola budou dostupné soutěžícím a jejich
...
@@ -177,7 +177,8 @@ Pokud je schválíte, po uzavření kola budou dostupné soutěžícím a jejich
{% else %}
{% else %}
<p
class=
"help-block"
>
<p
class=
"help-block"
>
Zde můžete nahrát obrázek velikosti A4 ve formátu PDF, který se použije jako pozadí diplomu.
Zde můžete nahrát obrázek velikosti A4 ve formátu PDF, který se použije jako pozadí diplomu.
K výrobě pozadí se Vám může hodit
<a
href=
'https://www.matematickaolympiada.cz/dokumenty-mo'
>
logo MO nebo JČMF
</a>
.
K výrobě pozadí se Vám může hodit
<a
href=
'https://www.matematickaolympiada.cz/dokumenty-mo'
>
logo MO nebo JČMF
</a>
a grafika
<a
href=
'{{ ctx.url_for("org_certificates_standard_bg") }}'
>
standardního pozadí
</a>
.
</p>
</p>
{% endif %}
{% endif %}
{% if cset.background_file %}
{% if cset.background_file %}
...
...
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
sign in
to comment