Created
February 27, 2013 11:20
-
-
Save b1/5047223 to your computer and use it in GitHub Desktop.
My first context processor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# coding: utf-8 | |
""" send dict to templates. Don't forget set """ | |
from django.conf import settings | |
def sett_to_tpl(): | |
""" send dict to templates """ | |
# todo: is it needhas to be settings.get('SETT_TO_TPL', '') | |
return {'SETT_TO_TPL': } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#... | |
TEMPLATE_CONTEXT_PROCESSORS = ( | |
"project_name.context_processors.sett_to_tpl", | |
) | |
#... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment