|
Django doesnt imports my apps from project root. Errors like this from apache logs: ImportError: No module named loginza All init.py files are in places; Django 1.3. I already have another project with django 1.2, it works fine. |
|
Django doesnt imports my apps from project root. Errors like this from apache logs: ImportError: No module named loginza All init.py files are in places; Django 1.3. I already have another project with django 1.2, it works fine. |
Once you sign in you will be able to subscribe for any updates here
By RSS:Tags:
Asked: Apr 19 '11 at 14:50
Seen: 823 times
Last updated: Apr 20 '11 at 00:32
Plans & prices
Sign up
Why WebFaction?
Contact us
Affiliate program
Support
Legal
Jobs
Blog
Control panel login
Powered by OSQA
© Copyright 2003-2012 Swarma Limited - WebFaction is a service of Swarma Limited
Since loginza is probably an app inside your project and not a python package, you need to have the project name before it in the install_apps setting. Example= 'project.loginza',
And now i have to rewrite all my imports? Is there other solution? Why in this project 'loginza' is not a python package and in another project it is?
You need to add the full app path to the WSGIPythonPath Directive in apache's config. The reason your app is not a valid python module is because it is not located on the python path. What makes something a valid python module basically is "a directory on the python path with an init.py file in it".
Thank you, i just added "/home/<username>/webapps/<project_name>/myproject" to WSGIPythonPath in httpd.conf. But in other projects it added automatically.
It is normal for the path configuration requirements to be different between projects and to be configured upon deployment. Also depending on how old the other stacks are they might just have different default configuration.