Hi Graham

Once again very helpful, that sorted out the import wsgi and the styling 
problem.

Can I purchase " 
<http://www.amazon.com/dp/1449319793/ref=wl_it_dp_v_nS_img?_encoding=UTF8&colid=1ENAXIJG1G044&coliid=IDU29KPHOU81L>Python
 
for Data Analysis: Data Wrangling with Pandas, NumPy, and IPython" from 
your wishlist for you, or would you prefer funds ?

Liam


On Wednesday, 2 July 2014 13:59:43 UTC+2, Graham Dumpleton wrote:
>
>
> On 02/07/2014, at 8:59 PM, Liam Thompson <[email protected] <javascript:>> 
> wrote:
>
> > Following the instructions from the PyPi mod_wsgi pages I'm trying to 
>> get the pypi modules to work with django 
>> > (virtualenv activated). 
>> > 
>> > Everything is fine up until I run "python -v manage.py runmodwsgi" 
>> > 
>> > whereafter I receive a 
>> > 
>> > # /opt/code_home/.../apache/__init__.pyc matches 
>> /opt/code_home/.../apache/__init__.py 
>> > import apache # precompiled from /opt/code_home/.../apache/__init__.pyc 
>> > ImportError: No module named wsgi 
>> > 
>> > Obviously an import error, perhaps another one of those pesky path 
>> problems from Django ? I don't get this error running 
>> > the site from the base wsgi, so there must be information missing that 
>> pypi-wsgi needs. 
>>
>> What is WSGI_APPLICATION set to in the Django settings.py file, and what 
>> is the directory structure you have? 
>>
>> Normally the structure would be: 
>>
>> mysite 
>> mysite/htdocs/* 
>> mysite/manage.py 
>> mysite/mysite 
>> mysite/mysite/__init__.py 
>> mysite/mysite/settings.py 
>> mysite/mysite/urls.py 
>> mysite/mysite/views.py 
>> mysite/mysite/wsgi.py 
>>
>> Key settings in the settings.py file would then be: 
>>
>> ROOT_URLCONF = 'mysite.urls' 
>> WSGI_APPLICATION = 'mysite.wsgi.application' 
>>
>
> My directory structure is a little different
>
> instead of mysite/mysite, it is just mysite/
>
> mysite 
> mysite/static
> mysite/media
>
> mysite/manage.py 
> mysite/urls.py 
>
> mysite/settings/__init__.py 
> mysite/settings/local.py
> mysite/settings/base.py
>
> mysite/apache/apache.wsgi
>
> mysite/myapp
> mysite/myapp/__init__.py 
> mysite/myapp/views.py 
>
> ROOT_URLCONF = 'urls' 
> WSGI_APPLICATION = 'apache.wsgi.application' 
>
>
> The WSGI_APPLICATION setting is wrong, or at least the filename for the 
> WSGI script file is wrong.
>
> You should rename:
>
> mysite/apache/apache.wsgi
>
> to:
>
> mysite/apache/wsgi.py
>
> if you are going to use that structure.
>
> Try that and see how it goes.
>
> Graham
>

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" 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/modwsgi.
For more options, visit https://groups.google.com/d/optout.

Reply via email to