Re: Using models inside settings.py

2009-08-22 Thread Alessandro
2009/8/22 Jan Hülsbergen : > > The root directory of your Django project should be in sys.path > anyway, so a simple 'import local_cms_settings' should just work. Even > if not, putting the directory into sys.path is much less evil/hacky > than using exec/eval. my project is on sys.path, but if I

Re: Using models inside settings.py

2009-08-21 Thread Jan Hülsbergen
On Fri, Aug 21, 2009 at 16:35, Alessandro Ronchi wrote: > > 2009/8/21 Alessandro Ronchi : >> >> one thing like that : >> from PROJECT_ROOT.local_settings import * >> >> Thanks in advance > > I correct myself: > > I need PROJECT_NAME to import, not the project root. > > I can then import it with >

Re: Using models inside settings.py

2009-08-21 Thread Alessandro Ronchi
2009/8/21 Alessandro Ronchi : > > one thing like that : > from PROJECT_ROOT.local_settings import * > > Thanks in advance I correct myself: I need PROJECT_NAME to import, not the project root. I can then import it with exec "from " + settings.PROJECT_NAME +".local_cms_settings import *" is th