Skip to content

Commit

Permalink
完成模板的 ORM 使用转换
Browse files Browse the repository at this point in the history
  • Loading branch information
fanzeyi committed Apr 17, 2012
1 parent 654464d commit 3711bbf
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions problem.py
Expand Up @@ -2,7 +2,7 @@
# AUTHOR: Zeray Rice <fanzeyi1994@gmail.com>
# FILE: problem.py
# CREATED: 04:04:57 15/03/2012
# MODIFIED: 16:59:41 05/04/2012
# MODIFIED: 02:22:02 18/04/2012

import os
import time
Expand Down Expand Up @@ -185,7 +185,7 @@ def get(self, sid):
breadcrumb.append((self._('Home'), '/'))
breadcrumb.append((self._('Submit'), '/submit'))
breadcrumb.append(("# %d" % submit.id, '/submit/%d' % submit.id))
title = self._("Submit #%d - %s") % (submit.id, submit.title)
title = self._("Submit #%d - %s") % (submit.id, submit.problem.title)
testpoint = []
if submit.testpoint:
testpoint = zip(range(1, len(submit.testpoint) + 1), submit.testpoint, \
Expand Down
4 changes: 2 additions & 2 deletions tpl/home.html
Expand Up @@ -30,8 +30,8 @@
<tr>
<td style="text-align:center">{{ submit.id }}</td>
<td><a href="/submit/{{ submit.id }}" class="nounderline">{{ submit | get_submit_status }}</a></td>
<td><a href="/problem/{{ submit.problem_id }}">{{ submit.title }}</a></td>
<td><a href="/member/{{ submit.username }}">{{ submit.username }}</a></td>
<td><a href="/problem/{{ submit.problem_id }}">{{ submit.problem.title }}</a></td>
<td><a href="/member/{{ submit.member.username }}">{{ submit.member.username }}</a></td>
<td style="text-align:center">{{ submit.lang | lang2humantext }}</td>
</tr>
{% endfor %}
Expand Down
10 changes: 5 additions & 5 deletions tpl/submit.html
Expand Up @@ -11,11 +11,11 @@
</tr>
<tr>
<th>{{ _('Problem') }}</th>
<td><a href="/problem/{{ submit.problem_id }}">{{ submit.title }}</a></td>
<td><a href="/problem/{{ submit.problem_id }}">{{ submit.problem.title }}</a></td>
</tr>
<tr>
<th>{{ _('Member') }}</th>
<td><a href="/member/{{ submit.username }}">{{ submit.username }}</a></td>
<td><a href="/member/{{ submit.member.username }}">{{ submit.member.username }}</a></td>
</tr>
<tr>
<th>{{ _('Status') }}</th>
Expand All @@ -30,15 +30,15 @@
<td>{{ submit.score }}</td>
</tr>
<tr>
<th>{{ _('Cost Time') }}</th>
<th>{{ _('Time') }}</th>
<td>{{ submit.costtime }} ms</td>
</tr>
<tr>
<th>{{ _('Cost Memory') }}</th>
<th>{{ _('Memory') }}</th>
<td>{{ submit.costmemory }} KB</td>
</tr>
<tr>
<th>{{ _('Submit Time') }}</th>
<th>{{ _('Date') }}</th>
<td>{{ submit.create }}</td>
</tr>
{% if user.admin %}
Expand Down
4 changes: 2 additions & 2 deletions tpl/submit_list.html
Expand Up @@ -22,8 +22,8 @@
<tr>
<td style="text-align:center">{{ submit.id }}</td>
<td><a href="/submit/{{ submit.id }}" class="nounderline">{{ submit | get_submit_status }}</a></td>
<td><a href="/problem/{{ submit.problem_id }}">{{ submit.title }}</a></td>
<td><a href="/member/{{ submit.username }}">{{ submit.username }}</a></td>
<td><a href="/problem/{{ submit.problem_id }}">{{ submit.problem.title }}</a></td>
<td><a href="/member/{{ submit.member.username }}">{{ submit.member.username }}</a></td>
<td style="text-align:center">{{ submit.lang | lang2humantext }}</td>
<td>{{ submit.costtime }} ms</td>
<td>{{ submit.costmemory }} KB</td>
Expand Down

0 comments on commit 3711bbf

Please sign in to comment.