Show download link

This commit is contained in:
Michal Čihař 2012-03-01 17:11:19 +01:00
parent 9985629271
commit 84fa45910b
2 changed files with 12 additions and 0 deletions

View File

@ -22,6 +22,10 @@
{% endif %}
{% endwith %}
<h2>{% trans "Download and upload" %}</h2>
<a href="{{ object.get_download_url }}">{% trans "Download" %}</a>
{% endblock %}

View File

@ -208,6 +208,14 @@ class Translation(models.Model):
'lang': self.language.code
})
@models.permalink
def get_download_url(self):
return ('trans.views.download_translation', (), {
'project': self.subproject.project.slug,
'subproject': self.subproject.slug,
'lang': self.language.code
})
@models.permalink
def get_translate_url(self):
return ('trans.views.translate', (), {