Skip to content

Commit

Permalink
Respect user language when caching homepage (#4585)
Browse files Browse the repository at this point in the history
* Respect user language when caching homepage

Previously it was using the first language that hit the page to cache.

* Stop it travis!
  • Loading branch information
agjohnson authored Aug 29, 2018
1 parent dcb4270 commit fd4cc67
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion readthedocs/templates/homepage.html
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ <h3>Multiple versions</h3>
</section>

{% if featured_list %}
{% cache 600 homepage_featured_list %}
{% get_current_language as language %}
{% cache 600 homepage_featured_list language %}
<!-- BEGIN projects list -->
<section>
<h3>{% trans "Featured Projects" %}</h3>
Expand Down

0 comments on commit fd4cc67

Please sign in to comment.