Show download link
This commit is contained in:
parent
9985629271
commit
84fa45910b
|
@ -22,6 +22,10 @@
|
|||
{% endif %}
|
||||
{% endwith %}
|
||||
|
||||
<h2>{% trans "Download and upload" %}</h2>
|
||||
|
||||
<a href="{{ object.get_download_url }}">{% trans "Download" %}</a>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
|
|
@ -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', (), {
|
||||
|
|
Loading…
Reference in New Issue
Block a user