From dc0cf1a2789293bb3459ea8fe1f611edda075eba Mon Sep 17 00:00:00 2001 From: François Schmidts Date: Sun, 12 Apr 2015 21:44:20 +0200 Subject: redoing conf gathering and using it in templates --- pyaggr3g470r/templates/home.html | 4 ++-- pyaggr3g470r/templates/layout.html | 4 ++-- pyaggr3g470r/views/feed.py | 5 ++--- pyaggr3g470r/views/views.py | 7 +++---- 4 files changed, 9 insertions(+), 11 deletions(-) (limited to 'pyaggr3g470r') diff --git a/pyaggr3g470r/templates/home.html b/pyaggr3g470r/templates/home.html index 98b12e25..461b6928 100644 --- a/pyaggr3g470r/templates/home.html +++ b/pyaggr3g470r/templates/home.html @@ -17,7 +17,7 @@
  • {% if feed_id == fid %}{% endif %} {% if in_error.get(fid, 0) > 0 %} - default_max_error -1 else "orange" }} ;" class="badge pull-right" title="Some errors occured while trying to retrieve that feed.">{{ in_error[fid] }} {{ _("error") }}{% if in_error[fid] > 1 %}s{% endif %} + conf.DEFAULT_MAX_ERROR -1 else "orange" }} ;" class="badge pull-right" title="Some errors occured while trying to retrieve that feed.">{{ in_error[fid] }} {{ _("error") }}{% if in_error[fid] > 1 %}s{% endif %} {% endif %} {{ nbunread }} {{ feeds[fid]|safe }} @@ -35,7 +35,7 @@ {% for fid, ftitle in feeds|dictsort(case_sensitive=False, by='value') if not fid in unread %}
  • {% if in_error.get(fid, 0) > 0 %} - default_max_error - 1 else "orange" }} ;" class="badge pull-right" title="Some errors occured while trying to retrieve that feed.">{{ in_error[fid] }} {{ _("error") }}{% if in_error[fid] > 1 %}s{% endif %} + conf.DEFAULT_MAX_ERROR - 1 else "orange" }} ;" class="badge pull-right" title="Some errors occured while trying to retrieve that feed.">{{ in_error[fid] }} {{ _("error") }}{% if in_error[fid] > 1 %}s{% endif %} {% endif %} {% if feed_id == fid %}{% endif %} {{ ftitle|safe }} diff --git a/pyaggr3g470r/templates/layout.html b/pyaggr3g470r/templates/layout.html index e3d3be38..484bbdc7 100644 --- a/pyaggr3g470r/templates/layout.html +++ b/pyaggr3g470r/templates/layout.html @@ -65,7 +65,7 @@ {% else %}
  • {{ _('Favorites') }}
  • {% endif %} - {% if not on_heroku or g.user.is_admin() %} + {% if conf.CRAWLING_METHOD == "classic" and (not conf.ON_HEROKU or g.user.is_admin()) %}
  • {{ _('Fetch') }}
  • {% endif %} - {% if not on_heroku %} + {% if not conf.ON_HEROKU %}