I get that too!! It's like python path is empty!

2010/9/12 Max Countryman <[email protected]>

> This doesn't seem to work. It returns an import error: ImportError: No
> module named WSGIHandler()
>
>
> On Sep 12, 2010, at 9:57 AM, Roberto De Ioris wrote:
>
>
>>  I'll show you the contents of my xml and py files used for uWSGI:
>>>
>>> uwsgi.xml
>>> ---
>>> <uwsgi>
>>>    <pythonpath>/usr/local/django/voxi_production/</pythonpath>
>>>    <app mountpoint="/">
>>>        <script>django_wsgi</script>
>>>    </app>
>>> </uwsgi>
>>>
>>> uwsgi.py
>>> ---
>>> import os, sys
>>> import django.core.handlers.wsgi
>>>
>>> sys.path.append('/usr/local/django/')
>>> os.environ['DJANGO_SETTINGS_MODULE'] = 'voxi_production.settings'
>>> application = django.core.handlers.wsgi.WSGIHandler()
>>>
>>> # Mount application to a URL
>>> applications = {'/': application }
>>>
>>> In Cherokee I use this source: /usr/bin/uwsgi -M -p 4 -s /tmp/cherokee/
>>> voxi_production.sock -C -x /usr/local/django/voxi_production/uwsgi.xml
>>>
>>>
>>
>> Only for example you can avoid having to manage 2 files and having such a
>> long commandline in uwsgi startup: (this config is for uWSGI 0.9.6.1)
>>
>> <uwsgi>
>>     <pythonpath>/usr/local/django/voxi_production/</pythonpath>
>>     <master/>
>>     <processes>6</processes>
>>     <socket>/tmp/cherokee/voxi_production.sock</socket>
>>     <chmod/>
>>     <![CDATA[
>> import os, sys
>> import django.core.handlers.wsgi
>>
>> sys.path.append('/usr/local/django/')
>> os.environ['DJANGO_SETTINGS_MODULE'] = 'voxi_production.settings'
>> application = django.core.handlers.wsgi.WSGIHandler()
>>     ]]>
>>
>> </uwsgi>
>>
>> or even simpler
>>
>> <uwsgi>
>>     <pythonpath>/usr/local/django/voxi_production/</pythonpath>
>>     <pythonpath>/usr/local/django/</pythonpath>
>>     <env>DJANGO_SETTINGS_MODULE=voxi_production.settings</env>
>>     <module>django.core.handlers.wsgi:WSGIHandler()</module>
>>     <master/>
>>     <processes>6</processes>
>>     <socket>/tmp/cherokee/voxi_production.sock</socket>
>>     <chmod/>
>> </uwsgi>
>>
>> Then you can simply run
>>
>> uwsgi -x <filename>
>>
>> --
>> Roberto De Ioris
>> http://unbit.it
>>
>
> _______________________________________________
> Cherokee mailing list
> [email protected]
> http://lists.octality.com/listinfo/cherokee
>



-- 
"A arrogância é a arma dos fracos."

===========================
Italo Moreira Campelo Maia
Graduado em Ciência da Computação - UECE
Desenvolvedor WEB e Desktop (Java, Python, Lua)
Coordenador do Pug-CE
-----------------------------------------------------
http://www.italomaia.com/
http://twitter.com/italomaia/
http://eusouolobomau.blogspot.com/
-----------------------------------------------------
turtle linux 910 - http://tiny.cc/blogturtle910
===========================
_______________________________________________
Cherokee mailing list
[email protected]
http://lists.octality.com/listinfo/cherokee

Reply via email to