From 3ff4f1d82e97e9ecaccaa8d472dacce1c416841f Mon Sep 17 00:00:00 2001 From: Caio Viotti Date: Thu, 30 Jul 2015 19:58:12 -0300 Subject: [PATCH] Add context processors --- sapl/context_processors.py | 15 +++++++++++++++ sapl/settings.py | 1 + 2 files changed, 16 insertions(+) create mode 100644 sapl/context_processors.py diff --git a/sapl/context_processors.py b/sapl/context_processors.py new file mode 100644 index 000000000..a03159902 --- /dev/null +++ b/sapl/context_processors.py @@ -0,0 +1,15 @@ +from django.contrib import messages + +def parliament_info(request): + + return { + 'state': 'Estado', + 'state_abbr': 'UF', + 'city': 'Cidade', + 'parliament_type': 'Câmara Municipal', + 'address': 'Rua Lorem Ipsum de Amet, Casa X', + 'postal_code': '70000-000', + 'phone_number': '00 0000-0000', + 'url_portal': '#', + 'url_email': '#', + } diff --git a/sapl/settings.py b/sapl/settings.py index 60b9373c3..ea2628b4c 100644 --- a/sapl/settings.py +++ b/sapl/settings.py @@ -86,6 +86,7 @@ TEMPLATES = [ 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', + 'sapl.context_processors.parliament_info', ], 'debug': DEBUG },