Commit d8ac9779 authored by Michal Čihař's avatar Michal Čihař

Drop not needed methods

They were used just once, it's better to replace them with {% url %}
tags.
parent 18b1ae85
......@@ -346,14 +346,6 @@ class Translation(models.Model, URLMixin):
def is_git_lockable(self):
return False
@models.permalink
def get_download_url(self):
return ('download_translation', (), {
'project': self.subproject.project.slug,
'subproject': self.subproject.slug,
'lang': self.language.code
})
@models.permalink
def get_translate_url(self):
return ('translate', (), {
......@@ -362,13 +354,6 @@ class Translation(models.Model, URLMixin):
'lang': self.language.code
})
@models.permalink
def get_source_review_url(self):
return ('review_source', (), {
'project': self.subproject.project.slug,
'subproject': self.subproject.slug,
})
def __unicode__(self):
return '%s - %s' % (
self.subproject.__unicode__(),
......
......@@ -14,12 +14,13 @@
{% include "subproject_info.html" %}
{% url 'review_source' project=source.subproject.project.slug subproject=source.subproject.slug as review_url %}
{% with source.get_source_checks as checks %}
{% if checks %}
<h2>{% trans "Strings to check" %}</h2>
<ul>
{% for c in checks %}
<li><a href="{{ source.get_source_review_url }}?type={{ c.0 }}">{{ c.1 }}</a></li>
<li><a href="{{ review_url }}?type={{ c.0 }}">{{ c.1 }}</a></li>
{% endfor %}
</ul>
{% endif %}
......
......@@ -56,9 +56,8 @@
<div id="files">
<h3>{% trans "Download" %}</h3>
{% with object.get_download_url as download_url %}
{% url 'download_translation' project=object.subproject.project.slug subproject=object.subproject.slug lang=object.language.code as download_url %}
<p>{% blocktrans %}You can <a href="{{ download_url }}">download</a> file for offline translation.{% endblocktrans %}</p>
{% endwith %}
{% if perms.trans.upload_translation %}
<h3>{% trans "Upload" %}</h3>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment