I’m building project with Django, I can make two setting files for Django: production_setting.py and development_setting.py, however, I need some configure file for my project and I’m using ConfigParser to parse that files. e.g.
[Section] name = "development" version = "1.0"
how to split this configure file to production and development?
What we usually do in our Django projects is create versions of all configuration files for each platform (dev, prod, etc…) and use symlinks to select the correct one. Now that Windows supports links properly, this solution fits everybody.
If you insist on another configuration file, try making it a Python file that just imports the proper configuration file, so instead of
name="development"you’ll have something likeexecfile('development_settings.py')