Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
|Failed to load latest commit information.|
USAGE ----- - Check out the appsconfig/ directory in the root of your Django tree. - Create a "conf/" directory in the root of your Django tree. - Under "conf/", create one directory per environment. The default environment is "local". - For each application, create a "(app).conf" configuration file. - Default values for applications go in "conf/default/(app).conf" - Each environment can create a settings.py file that will execute after the root settings.py - You can load a different environment by running: ENV=production python manage.py runserver - Variables that can be used in the configuration files: - environment: the directory of the environment being loaded - In the root settings.py, load the config with: # load configuration from config import config if config.settings(): execfile(config.settings()) CONFIG = config.load() - In an application, access the config with: from settings import CONFIG CONFIG.get('myapp', 'myvar')