What we use is a settings.cfg, which is an ini file for global 
configurations. Database settings, etc. We need to share these settings 
across different languages and parts of our application.

You can set up your ini file as such:

[secret]
key=abcdefghijklmnopqrstuvwxyz0123456789


ini files are easy to parse with the ConfigParser in Python. You can simply 
parse it in your settings.py:

import ConfigParser
config = ConfigParser.ConfigParser()
config.readfp(open('../settings.cfg'))

SECRET_KEY = config.get('secret', 'key')


-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to