Skip to content

Commit

Permalink
fix INSTALLED_APPS in base
Browse files Browse the repository at this point in the history
  • Loading branch information
yomguy committed Dec 22, 2014
1 parent e2e1ee2 commit ba8ba02
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
17 changes: 9 additions & 8 deletions telemeta/templates/telemeta/base.html
Expand Up @@ -2,7 +2,8 @@
{% load i18n %}
{% load telemeta_utils %}
{% load bootstrap3 %}
{% if get_googletools %}
{% settings_value 'INSTALLED_APPS' as INSTALLED_APPS %}
{% if 'googletools' in INSTALLED_APPS %}
{% load googletools %}
{% endif %}

Expand All @@ -15,6 +16,13 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />

{% block analytics %}
{% if 'googletools' in INSTALLED_APPS %}
{% site_verification_code %}
{% analytics_code %}
{% endif %}
{% endblock analytics %}

<link rel="alternate" href="/rss" title="RSS 2.0" type="application/rss+xml" />

<title>{%block head_title %}{% description %} - Telemeta{% endblock %}</title>
Expand Down Expand Up @@ -187,12 +195,5 @@
</div>
{% endblock layout %}

{% block analytics %}
{% if get_googletools %}
{% site_verification_code %}
{% analytics_code %}
{% endif %}
{% endblock analytics %}

</body>
</html>
4 changes: 4 additions & 0 deletions telemeta/templatetags/telemeta_utils.py
Expand Up @@ -464,3 +464,7 @@ def logo_url():
def get_googletools():
return 'googletools' in settings.INSTALLED_APPS

@register.assignment_tag
def settings_value(name):
return getattr(settings, name, "")

0 comments on commit ba8ba02

Please sign in to comment.