Question

Quand j'ai exécuter n'importe quelle commande dans manage.py, Je n'obtenez pas de réponse à partir de la ligne de commande.Dans ma machine locale, il fonctionne très bien, mais sur le côté serveur, c'est de ne pas répondre

(env3)root@server /var/www/web/proj3 # python manage.py help
(env3)root@server /var/www/web/proj3 # python manage.py check
(env3)root@server /var/www/web/proj3 # ./manage.py help
(env3)root@server /var/www/web/proj3 # ./manage.py check
(env3)root@server /var/www/web/proj3 # ./manage.py colectstatics
(env3)root@server /var/www/web/proj3 # ./manage.py syncdb

certains de mes fichiers de configs

(env3)root@server /var/www/web/proj3 # which python
/var/virtualenv/env3/bin/python
(env3)root@server /var/www/web/proj3 # cat manage.py 

#!/usr/bin/env python
import os
import sys
import site

#Add the site-packages of the chosen virtualenv to work with
site.addsitedir('/var/virtualenv/env3/local/lib/python2.7/site-packages')

# Add the app's directory to the PYTHONPATH
sys.path.append('/var/www/web')
sys.path.append('/var/www/web/proj3')
sys.path.append('/var/www/web/proj3/proj3')

os.environ['DJANGO_SETTINGS_MODULE'] = 'proj3.settings'

# Activate your virtual env
activate_env=os.path.expanduser("/var/virtualenv/env3/bin/activate_this.py")
execfile(activate_env, dict(__file__=activate_env))

import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
Était-ce utile?

La solution

Vous semblez en quelque sorte d'avoir remplacé le contenu de manage.py avec ce qui devrait être dans wsgi.py.

Le remplacer par le contenu de le fichier d'origine, la modification de {{ project.name }} comme appropriée.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top