add the ability to disable the web display of some apps
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
"""Site processors to add additional template tags and whatnot."""
|
||||
|
||||
from django.conf import settings
|
||||
from django.contrib.sites.shortcuts import get_current_site
|
||||
from django.utils.functional import SimpleLazyObject
|
||||
|
||||
@@ -11,4 +11,5 @@ def site(request):
|
||||
return {
|
||||
'site': site,
|
||||
'site_root': SimpleLazyObject(lambda: "{0}://{1}".format(protocol, site.domain)),
|
||||
'WEB_ENABLED_APPS': settings.WEB_ENABLED_APPS,
|
||||
}
|
||||
|
||||
@@ -145,6 +145,16 @@ BOOTSTRAP3 = {
|
||||
'javascript_in_head': True,
|
||||
}
|
||||
|
||||
###############
|
||||
# web options #
|
||||
###############
|
||||
|
||||
# choose which apps to display in the web UI, for those that support this config
|
||||
WEB_ENABLED_APPS = [
|
||||
'karma',
|
||||
'races',
|
||||
]
|
||||
|
||||
|
||||
# IRC module stuff
|
||||
|
||||
|
||||
@@ -30,9 +30,9 @@
|
||||
{% block navbar_menu %}
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a href="{% url 'facts_index' %}">Item Sets</a></li>
|
||||
<li><a href="{% url 'karma_index' %}">Karma</a></li>
|
||||
{% if "karma" in WEB_ENABLED_APPS %}<li><a href="{% url 'karma_index' %}">Karma</a></li>{% endif %}
|
||||
<li><a href="{% url 'markov_index' %}">Markov</a></li>
|
||||
<li><a href="{% url 'races_index' %}">Races</a></li>
|
||||
{% if "races" in WEB_ENABLED_APPS %}<li><a href="{% url 'races_index' %}">Races</a></li>{% endif %}
|
||||
</ul>
|
||||
{% endblock %}
|
||||
<div class="navbar-right">
|
||||
|
||||
Reference in New Issue
Block a user