Download:
child 116:fe38aeec943b
parent 114:7314f0b864b8
115:2311bfce57b4
Anton Shestakov <av6@dwimlabs.net>, Wed, 06 Jul 2016 16:49:16 +0800
viewer: remove Check.get_url() method for not being very useful

4 файлов изменено, 3 вставок(+), 6 удалений(-) [+]
candolint/models.py file | annotate | diff | comparison | revisions
templates/check.html file | annotate | diff | comparison | revisions
templates/index.html file | annotate | diff | comparison | revisions
templates/project.html file | annotate | diff | comparison | revisions
--- a/candolint/models.py Wed Jul 06 16:43:51 2016 +0800
+++ b/candolint/models.py Wed Jul 06 16:49:16 2016 +0800
@@ -95,9 +95,6 @@
(('ordinal', 'project'), True),
)
- def get_url(self, request=None):
- return '{}/{}'.format(self.project.get_url(request), self.ordinal)
-
def get_duration(self):
d = self.finished - self.started
minutes, seconds = divmod(int(d.total_seconds()), 60)
--- a/templates/check.html Wed Jul 06 16:43:51 2016 +0800
+++ b/templates/check.html Wed Jul 06 16:49:16 2016 +0800
@@ -26,7 +26,7 @@
<dt>Duration:</dt>
<dd>{{ check.get_duration() }}</dd>
<dt>Other formats:</dt>
- <dd><a href="{{ check.get_url() }}/raw">raw</a></dd>
+ <dd><a href="{{ project.get_url() }}/{{ check.ordinal }}/raw">raw</a></dd>
</dl>
</div>
<div class="uk-width-medium-2-3">
--- a/templates/index.html Wed Jul 06 16:43:51 2016 +0800
+++ b/templates/index.html Wed Jul 06 16:49:16 2016 +0800
@@ -13,7 +13,7 @@
{% set adapter = project.get_adapter() %}
<tr>
<td>{% module Badges(check) %}</td>
- <td><a href="{{ check.get_url() }}">check #{{ check.ordinal }}</a></td>
+ <td><a href="{{ project.get_url() }}/{{ check.ordinal }}">check #{{ check.ordinal }}</a></td>
<td class="uk-width-1-1 uk-text-break"><a href="{{ project.get_url() }}">{{ project.get_title() }}</a></td>
<td><a href="{{ adapter.get_branch_url(change) }}">{{ change.branch }}</a></td>
<td><a href="{{ adapter.get_commit_url(change) }}">{{ change.rev }}:{{ change.node[:12] }}</a></td>
--- a/templates/project.html Wed Jul 06 16:43:51 2016 +0800
+++ b/templates/project.html Wed Jul 06 16:49:16 2016 +0800
@@ -22,7 +22,7 @@
{% set adapter = project.get_adapter() %}
<tr>
<td>{% module Badges(check) %}</td>
- <td><a href="{{ check.get_url() }}">check #{{ check.ordinal }}</a></td>
+ <td><a href="{{ project.get_url() }}/{{ check.ordinal }}">check #{{ check.ordinal }}</a></td>
<td><a href="{{ adapter.get_branch_url(change) }}">{{ change.branch }}</a></td>
<td><a href="{{ adapter.get_commit_url(change) }}">{{ change.rev }}:{{ change.node[:12] }}</a></td>
<td class="uk-width-1-1 uk-text-break">