使用url()来构建url

This commit is contained in:
masnn committed 2020-06-12 13:37:19 +08:00
1 parent 0efac48bde
commit 86f67a0ec3
61 files changed
+262 -275

No files matched your search

+2 -2
View File
@@ -19,7 +19,7 @@
</select>
</span>
{% if handler.hasPerm(perm.PERM_CREATE_HOMEWORK) %}
<a class="compact button" href="/homework/create">{{ _('Create Homework') }}</a>
<a class="compact button" href="{{ url('homework_create') }}">{{ _('Create Homework') }}</a>
{% endif %}
</div>
</div>
@@ -38,7 +38,7 @@
</div>
</div>
<div class="media__body medium">
<h1 class="homework__title"><a href="/homework/{{ tdoc.docId }}" data-emoji-enabled>{{ tdoc.title }}</a></h1>
<h1 class="homework__title"><a href="{{ url('homework_detail', tid=tdoc.docId) }}" data-emoji-enabled>{{ tdoc.title }}</a></h1>
<ul class="supplementary list">
<li>
{{ _('Status') }}: <span class="homework-status--text {{ model.contest.getStatus(tdoc) }}">{{ _(model.contest.statusText(tdoc)) }}</span>