Browse Source

Add context processors

pull/6/head
Caio Viotti 10 years ago
parent
commit
3ff4f1d82e
  1. 15
      sapl/context_processors.py
  2. 1
      sapl/settings.py

15
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': '#',
}

1
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
},

Loading…
Cancel
Save