On 16/03/10 14:27, Gustavo Narea wrote:
Hello,

Even if there was a reliable way to reuse the same code base with
different settings on a per request basis, which I doubt, I believe
the safest and easiest way to extend a base configuration with
twod.wsgi:
http://packages.python.org/twod.wsgi/manual/paste-factory.html#multiple-configuration-files


.ini config is essentially a deliberate restriction to a configuration external DSL less general than python. That could be preferred by some, depending, don't get me wrong - However, a standard django project settings.py is in python - it has all of python available! A programmer can just do stuff like the below (not addressing the OP's desire as such, this just merges in common settings then settings from a ~/.myproj/settings.py - Useful if you, say, run projects' server processes under different dedicated unix users per project with wsgi or whatever)

# myproj's settings.py
from common_settings import *
import imp
import os.path
imp.load_source('local_settings', os.path.join(os.path.expanduser('~'), '.myproj', 'settings.py'))
from local_settings import *




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

Reply via email to