Reputation: 580
Apache configuration:
<Location "/">
SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE pro.settings
PythonDebug On
PythonPath "['/home/cha0s/','/home/cha0s/pro/apps/']
+ sys.path" </Location>
So the question is : with following configuration , to import an app in INSTALLED_APPS , for example blog i need to write just
INSTALLED_APPS = (
.....
'blog',
'gallery',
......
)
but if i take this line '/home/cha0s/pro/apps/' away from python path , by my logic then to install a module for example blog , i need to write full path like pro.apps.blog and it should work , but it doesn't . How come ?
SOLUTION:
Thanks Lam . Don't know how to mark Thierry Lam answer correct , so i'll just write it here.
init.py file must be created in apps directory even if it is just a directory with no files. Then there is no need for '/home/cha0s/pro/apps/' line in apache configuration , and modules can be declared like pro.apps.blog
Upvotes: 1
Views: 401