- Create and start a python virtualenv https://pypi.python.org/pypi/virtualenv
a) easy_install virtualenv #first time only
b) mkdir ~/Documents/PythonEnv/ && cd ~/Documents/PythonEnv/
c) virtualenv project-name
d) source ~/Documents/PythonEnv/project-name/bin/activate - git clone https://[email protected]/rfadams/python-django-heroku.git ~/projects/project-name
- cd ~/projects/project-name && pip install --upgrade setuptools && pip install -r requirements.txt
- python web/manage.py syncdb --all #Gets user account profile configured properly
- python web/manage.py migrate --fake #Gets South migration configured properly
- python web/manage.py runserver
- Create an account at https://heroku.com
- Install the heroku CLI https://devcenter.heroku.com/articles/heroku-command
- heroku create --stack cedar project-name
- heroku config:add DJANGO_ENV=production
- git push heroku master
- heroku open
- Yay! All done.
https://south.aeracode.org/docs/tutorial/part1.html
Database should already be sync'd using steps from above
- python web/manage.py startapp southtut
- add
'southtut',
just above'south',
in theINSTALLED_APPS
setting in web/settings.py - python web/manage.py schemamigration southtut --initial #After making a new model
- python web/manage.py migrate southtut
- python web/manage.py schemamigration southtut --auto #After you make some changes to the model
- python web/manage.py migrate southtut
- mysqladmin -u DBUSER -p create
- modify web/settings.py to reflect your database settings
- createdb
- modify web/settings.py to reflect your database settings