]> git.parisson.com Git - mezzo.git/commitdiff
Newsletter : url link
authorEmilie <zawadzki@ircam.fr>
Mon, 7 Nov 2016 16:33:12 +0000 (17:33 +0100)
committerEmilie <zawadzki@ircam.fr>
Mon, 7 Nov 2016 16:33:35 +0000 (17:33 +0100)
app/organization/pages/context_processors.py [new file with mode: 0644]
app/settings.py

diff --git a/app/organization/pages/context_processors.py b/app/organization/pages/context_processors.py
new file mode 100644 (file)
index 0000000..30e41fa
--- /dev/null
@@ -0,0 +1,6 @@
+from django.conf import settings # import the settings file
+from organization.pages.models import Page
+
+def page_static(request):
+    NEWSLETTER_SUBSCRIBING_URL = Page.objects.filter(slug="newsletter").first().get_absolute_url()
+    return {'NEWSLETTER_SUBSCRIBING_URL': NEWSLETTER_SUBSCRIBING_URL,}
index ab50677011c8df50d62b0d53d9e375ce8da61394..baedfb9332ff700a43654ddedddcbc79a7cf16a0 100644 (file)
@@ -272,7 +272,8 @@ TEMPLATES = [{'APP_DIRS': True,
                                                   'django.core.context_processors.tz',
                                                   'mezzanine.conf.context_processors.settings',
                                                   'mezzanine.pages.context_processors.page',
-                                                  'organization.core.context_processors.static')}}]
+                                                  'organization.core.context_processors.static',
+                                                  'organization.pages.context_processors.page_static')}}]
 
 # List of middleware classes to use. Order is important; in the request phase,
 # these middleware classes will be applied in the order given, and in the