views:

48

answers:

2

I want to keep some global settings for my project in Django. I need to have access to these settings from the code. For example, I need to set a current theme for my site that I can set using admin console or from the code. Or I need to set a tagline that will show in the header of all pages. I suppose I should use models for keeping the settings but I can't realize how I should better do it.

A: 

If you are okay with changing these setting programmatically via settings.py you should do that. However, if you want to change these settings via the Admin Console, you should use models.

Rahul
+1  A: 

There are quite some packages that store settings in models, pick the one that works best for you:

http://pypi.python.org/pypi?:action=search&term=django+settings&submit=search

iElectric