Commit 503ca7040495c48e14a815eb6e3c266be8227f24
1 parent
a5af9f38
Exists in
master
and in
39 other branches
Allowing to disable feedzilla
Showing
3 changed files
with
21 additions
and
5 deletions
Show diff stats
colab/settings.py
| ... | ... | @@ -51,6 +51,7 @@ INSTALLED_APPS = ( |
| 51 | 51 | 'i18n_model', |
| 52 | 52 | 'mptt', |
| 53 | 53 | 'dpaste', |
| 54 | + 'taggit', | |
| 54 | 55 | |
| 55 | 56 | # Own apps |
| 56 | 57 | 'colab.home', |
| ... | ... | @@ -61,11 +62,6 @@ INSTALLED_APPS = ( |
| 61 | 62 | 'colab.search', |
| 62 | 63 | 'colab.badger', |
| 63 | 64 | 'colab.tz', |
| 64 | - | |
| 65 | - # Feedzilla and deps | |
| 66 | - 'feedzilla', | |
| 67 | - 'taggit', | |
| 68 | - 'common', | |
| 69 | 65 | ) |
| 70 | 66 | |
| 71 | 67 | ROOT_URLCONF = 'colab.urls' |
| ... | ... | @@ -202,6 +198,7 @@ TEMPLATE_CONTEXT_PROCESSORS = ( |
| 202 | 198 | 'colab.proxy.context_processors.proxied_apps', |
| 203 | 199 | 'colab.home.context_processors.robots', |
| 204 | 200 | 'colab.home.context_processors.ribbon', |
| 201 | + 'colab.planet.context_processors.feedzilla', | |
| 205 | 202 | ) |
| 206 | 203 | |
| 207 | 204 | MIDDLEWARE_CLASSES = ( |
| ... | ... | @@ -252,6 +249,8 @@ FEEDZILLA_PAGE_SIZE = 5 |
| 252 | 249 | FEEDZILLA_SITE_TITLE = _(u'Planet Colab') |
| 253 | 250 | FEEDZILLA_SITE_DESCRIPTION = _(u'Colab blog aggregator') |
| 254 | 251 | |
| 252 | +FEEDZILLA_ENABLED = True | |
| 253 | + | |
| 255 | 254 | # Mailman API settings |
| 256 | 255 | MAILMAN_API_URL = 'http://localhost:9000' |
| 257 | 256 | |
| ... | ... | @@ -301,6 +300,13 @@ if locals().get('RAVEN_DSN', False): |
| 301 | 300 | } |
| 302 | 301 | INSTALLED_APPS += ('raven.contrib.django.raven_compat',) |
| 303 | 302 | |
| 303 | +if FEEDZILLA_ENABLED: | |
| 304 | + INSTALLED_APPS += ( | |
| 305 | + # Feedzilla and deps | |
| 306 | + 'feedzilla', | |
| 307 | + 'common', | |
| 308 | + ) | |
| 309 | + | |
| 304 | 310 | proxied_apps = locals().get('PROXIED_APPS') or {} |
| 305 | 311 | for app_label in proxied_apps.keys(): |
| 306 | 312 | INSTALLED_APPS += ('colab.proxy.{}'.format(app_label),) | ... | ... |
colab/templates/base.html
| ... | ... | @@ -91,9 +91,13 @@ |
| 91 | 91 | <li> |
| 92 | 92 | <a href="{% url 'thread_list' %}">{% trans "Groups" %}</a> |
| 93 | 93 | </li> |
| 94 | + | |
| 95 | + {% if feedzilla %} | |
| 94 | 96 | <li> |
| 95 | 97 | <a href="{% url "feedzilla_index" %}">{% trans "Blogs" %}</a> |
| 96 | 98 | </li> |
| 99 | + {% endif %} | |
| 100 | + | |
| 97 | 101 | {% if proxy.gitlab %} |
| 98 | 102 | <li class="dropdown"> |
| 99 | 103 | <a href="#" class="dropdown-toggle" data-toggle="dropdown">{% trans "Repository" %} <b class="caret"></b></a> | ... | ... |