Skip to content

Instantly share code, notes, and snippets.

@mmalone
Created July 27, 2009 17:31
Show Gist options
  • Save mmalone/156638 to your computer and use it in GitHub Desktop.
Save mmalone/156638 to your computer and use it in GitHub Desktop.
from django.views import debug
view_settings = dict(((k.lower(), v) for (k, v) in
debug.get_safe_settings().iteritems()))
def settings(request):
"""
Provides a 'settings' context variable that is a subset of the
Django settings module (the 'safe' settings).
"""
return {
'settings': view_settings,
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment