Django-fr

Forum

  • Accueil
  • » Django-fr
  • » django - apache2 - mod wsgi : No module named ho.pisa

#1 10-02-2016 14:42:31

Angelo2016
Membre
Inscription : 10-02-2016
Messages : 1

django - apache2 - mod wsgi : No module named ho.pisa

Bonjour ,
je vous remercie d'avance pour toutes interventions ou aides quelconque je tente d'accéder a mon application via apache http://127.0.0.1/monAPP ,
le framework django me renvoi une page d'erreur avec comme message No module named ho.pisa

quand je demare l'appli via le serveur python << python manager.py runserver >> l'appli fonctionne sans probleme


#voici mon fichier wsgi.py

import os,sys
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "monAPP.settings")
sys.path.append('/usr/local/lib/python2.7/site-packages')
sys.path.append('/home/Angelo/.local/lib/python2.7/site-packages/ho/pisa/')


import site
vepath = '/home/Angelo/.local/lib/python2.7/site-packages/ho'

site.addsitedir(vepath)

from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()


#voici mon fichier 000-default.conf

Alias /static/ /home/Angelo/monAPP/static/

    <Directory /home/Angelo/monAPP/static>
        Allow from all
        Order deny,allow
    </Directory>

WSGIDaemonProcess monAPP python-path=/home/Angelo/.local/lib/python2.7/site-packages:/home/Angelo/monAP
WSGIProcessGroup monAPP
WSGIScriptAlias /monAPP /home/Angelo/monAPP/monAPP/wsgi.py


<Directory monAPP/Tresorie//wsgi.py>
       <Files wsgi.py>
        Require all granted
        </Files>
</Directory>

Dernière modification par Angelo2016 (10-02-2016 14:44:21)

Hors ligne

#2 11-02-2016 10:51:42

Xavier Ordoquy
Administrateur
Lieu : Puteaux, France
Inscription : 12-10-2011
Messages : 312
Site Web

Re : django - apache2 - mod wsgi : No module named ho.pisa

sys.path.append('/home/Angelo/.local/lib/python2.7/site-packages/ho/pisa/')

Le path n'est pas correct, il faudrait supprimer ho/pisa afin de rendre ho.pisa importable.

Hors ligne

  • Accueil
  • » Django-fr
  • » django - apache2 - mod wsgi : No module named ho.pisa

Pied de page des forums