Yes, the files exist and they have read access and are owned by apache. I do
use a symlink of "current" to point to my actual project directory to
facilitate testing. I ported this from 1.3 by creating a new 1.5 project and
then moving the contents of the old to the new. The error looks like this:
Python Path: (this is the actual data, I simplified structure in my earlier
posts.
['/var/www/mdsdeploy/current/AccNewMdsServer',
'/usr/lib/python26.zip',
'/usr/lib/python2.6',
. . .
--------------------------------------------------------------------------------------------
My wsgi.conf looks like this :
WSGIScriptAlias /mdsapi
/var/www/mdsdeploy/current/AccNewMdsServer/AccNewMdsServer/wsgi.py
WSGIPythonPath /var/www/mdsdeploy/current
WSGIPythonPath /var/www/mdsdeploy/current/AccNewMdsServer
WSGIScriptReloading On
#commented the following out until I get it to work.
#WSGIReloadMechanism Process
#WSGIDaemonProcess djangoapps processes=2 threads=15
python-path=/home/mdsdeploy/current:/home/mdsdeploy/current/AccNewMdsServer
#WSGIProcessGroup djangoapps
LogLevel info
WSGISocketPrefix /var/run/wsgi
<Location /var/www/mdsdeploy/current/AccNewMdsServer/AccNewMdsServer>
Order allow,deny
Allow from all
</Location>
<Directory /var/www/mdsdeploy/current>
Order allow,deny
Allow from all
</Directory>
<Directory /var/www/mdsdeploy/current/AccNewMdsServer>
Order allow,deny
Allow from all
</Directory>
<Directory /var/www/mdsdeploy/current/AccNewMdsServer/AccNewMdsServer>
<Files wsgi.py>
Order allow,deny
Allow from all
</Files>
</Directory>
-----Original Message-----
From: [email protected] [mailto:[email protected]] On
Behalf Of Tom Evans
Sent: Thursday, June 20, 2013 4:50 AM
To: [email protected]
Subject: Re: Cannot import mypackage with code in the __init__.py file
On Wed, Jun 19, 2013 at 7:51 PM, fred <[email protected]> wrote:
> I'm upgrading to django 1.5.1 on CentOs 6.4 with python 2.6.6
> although I'm developing on a W7 with the django debug server.
>
> I am getting executing my view.py and most of the modules it uses.
> But in one scenario, the import fails, see directory outline below
>
> NewMdsServer
> |___NewMdsServer
> |___settings.py
> |___wsgi.py
> |___ ...
> |___app
> |___views.py
> |___mymodule.py
> |___mypackage
> |___ __init__.py
> |___ x.py
> |___ y.py
>
> I have code in the __init__.py which then imports x, y, etc
Do the files NewMdsServer/NewMdsServer/__init__.py and
NewMdsServer/app/__init__.py exist?
Cheers
Tom
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.