Amazon Beanstalk uses a virtualenv and in order to activate it you have to:
source /opt/python/run/venv/bin/activate
cd /opt/python/current/app
python manage.py commandname
Add the Python path and environment variables used by your application. So, do this:
vi /home/ec2-user/.bash_profile
and added:
export PYTHONPATH=$PYTHONPATH:/opt/python/current/app
In order to automatically activate the virtualenv and to be able to use the Django shell as soon as logged via ssh, is it possible to add:
As soon as you logged via ssh, you can automatically activate the virtualenv and the Django shell adding this to the .bash_profile:
source /opt/python/run/venv/bin/activate
cd /opt/python/current/app