Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Make documents optional (activate/deactivate in settings)

  • Loading branch information...
commit 95605f4691286e25b94f93502819e287111387d7 1 parent cf61af9
Simone Dalmasso simod authored
3  geonode/context_processors.py
View
@@ -35,5 +35,6 @@ def resource_urls(request):
REGISTRATION_OPEN=settings.REGISTRATION_OPEN,
VERSION=get_version(),
SITE_NAME=site.name,
- SITE_DOMAIN=site.domain
+ SITE_DOMAIN=site.domain,
+ DOCUMENTS_APP = settings.DOCUMENTS_APP,
)
8 geonode/settings.py
View
@@ -118,6 +118,9 @@
LOGIN_URL = '/account/login/'
LOGOUT_URL = '/account/logout/'
+# Activate the Documents application
+DOCUMENTS_APP = True
+
INSTALLED_APPS = (
# Apps bundled with Django
@@ -166,8 +169,11 @@
'geonode.security',
'geonode.search',
'geonode.catalogue',
- 'geonode.documents',
)
+
+if DOCUMENTS_APP:
+ INSTALLED_APPS += ('geonode.documents',)
+
LOGGING = {
'version': 1,
'disable_existing_loggers': True,
2  geonode/templates/base.html
View
@@ -121,9 +121,11 @@
<li id="nav_maps">
<a href="{% url maps_browse %}">{% trans "Maps" %}</a>
</li>
+ {% if DOCUMENTS_APP %}
<li id="nav_documents">
<a href="{% url documents_browse %}">{% trans "Documents" %}</a>
</li>
+ {% endif %}
<li id="nav_profiles">
<a href="{% url profile_browse %}">{% trans "People" %}</a>
</li>
9 geonode/urls.py
View
@@ -57,9 +57,6 @@
# Map views
(r'^maps/', include('geonode.maps.urls')),
- #Documents views
- (r'^documents/', include('geonode.documents.urls')),
-
# Catalogue views
(r'^catalogue/', include('geonode.catalogue.urls')),
@@ -96,6 +93,12 @@
)
+#Documents views
+if settings.DOCUMENTS_APP:
+ urlpatterns += patterns('',
+ (r'^documents/', include('geonode.documents.urls')),
+ )
+
urlpatterns += geonode.proxy.urls.urlpatterns
# Serve static files
Please sign in to comment.
Something went wrong with that request. Please try again.