Question

When I run any command within manage.py, I get no response from the command line. In my local machine, it works fine, but on server side it's not responding

(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

some of my configs files

(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()
Was it helpful?

Solution

You seem somehow to have overridden the contents of manage.py with what should be in wsgi.py.

Replace it with the content from the original file, changing {{ project.name }} as appropriate.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top