Changes between Version 14 and Version 15 of SplitSettings


Ignore:
Timestamp:
10/01/2010 11:07:07 PM (5 years ago)
Author:
akaihola
Comment:

Fixed init.py file name formatting

Legend:

Unmodified
Added
Removed
Modified
  • SplitSettings

    v14 v15  
    310310I ([http://djangopeople.net/akaihola Antti Kaihola]) use the following solution for defining local settings. It provides access to the original settings while defining local settings. Note: this only works if you import from the base {{{settings.py}}} or {{{settings/__init__.py}}}.
    311311
    312 settings/__init__.py:
     312{{{settings/__init__.py}}}:
    313313{{{
    314314INSTALLED_APPS = ('whatever',)
     
    319319}}}
    320320
    321 settings/local.py:
     321{{{settings/local.py}}}:
    322322{{{
    323323import sys
     
    329329Older, clumsier methods I've used:
    330330
    331 settings.py:
     331{{{settings.py}}}:
    332332{{{
    333333INSTALLED_APPS = ('whatever',)
     
    336336}}}
    337337
    338 more_settings.py:
     338{{{more_settings.py}}}:
    339339{{{
    340340def modify(settings):
     
    357357I ([http://djangopeople.net/cordis  Sergey Yushckeyev]) have extended proposed solution:
    358358
    359 env
     359{{{env}}}
    360360{{{
    361361export APP_SETTINGS = 'development.cordis'
    362362}}}
    363363
    364 settings/__init__.py
     364{{{settings/__init__.py}}}
    365365{{{
    366366#!python
     
    390390}}}
    391391
    392 settings/development/cordis.py
     392{{{settings/development/cordis.py}}}
    393393{{{
    394394#!python
     
    397397}}}
    398398
    399 app/models.py
     399{{{app/models.py}}}
    400400{{{
    401401#!python
Back to Top