I need to write a setting in my settings.py that uses my model, but
it's not possible to load models inside settings.py

So I need to import a custom local_settings.py to be loaded by my app.

It should be simple:
from myapp.settings import *

but I want to remove "myapp" to that import, because I don't know how
my app will be called.

with
PROJECT_ROOT = os.path.dirname(os.path.realpath(__file__))

I can know how my project is called, but I don't know hot to load a
file from that root with an import. is it possible?

one thing like that :
from PROJECT_ROOT.local_settings import *

Thanks in advance

-- 
Alessandro Ronchi

SOASI
Sviluppo Software e Sistemi Open Source
http://www.soasi.com

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

Reply via email to