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

Prefetch translations just once

parent a230447d
...@@ -240,6 +240,8 @@ def show_subproject(request, project, subproject): ...@@ -240,6 +240,8 @@ def show_subproject(request, project, subproject):
return render_to_response('subproject.html', RequestContext(request, { return render_to_response('subproject.html', RequestContext(request, {
'object': obj, 'object': obj,
'translations': obj.translation_set.enabled(),
'show_language': 1,
'last_changes': last_changes, 'last_changes': last_changes,
'last_changes_rss': reverse( 'last_changes_rss': reverse(
'rss-subproject', 'rss-subproject',
......
...@@ -18,9 +18,7 @@ ...@@ -18,9 +18,7 @@
<h2>{% trans "Translations" %}</h2> <h2>{% trans "Translations" %}</h2>
{% with object.translation_set.enabled as translations and 1 as show_language %}
{% include "list-translations.html" %} {% include "list-translations.html" %}
{% endwith %}
{% url 'contact' as contact_url %} {% url 'contact' as contact_url %}
......
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