Auto-generated from Kevin Xu's Django Project Builder
- Kevin Xu kevin@imkevinxu.com
For best results, make sure you have at least:
- Python 2.7
- Django 1.5
- Jinja2 templating with Coffin
- Django Debug Toolbar
- bcrypt password hashing
- South database migration
cd sleepdebtcalc/ # changes directory to project after initial git clone
mkvirtualenv sleepdebtcalc # requires proper virtualenv setup
workon sleepdebtcalc # sets the virtual environment
pip install -r requirements.txt # installs all python packages
python manage.py syncdb # sets up django database
python manage.py migrate sleepdebtcalc # migrates any south migrations
Application will be running at http://localhost:8000 after running one of the two commands:
python manage.py runserver # Normal way
foreman start # Advanced way
# Requires .env and .env.dev files (see below)
# Sources environment variables and runs all processes
# Packaged with Heroku Toolbelt https://toolbelt.heroku.com/
App uses a local .env and .env.dev not tracked in the git repo to get some environment variables. Email Kevin Xu kevin@imkevinxu.com to get the latest version
In case something's not working after pulling, try one of these:
workon sleepdebtcalc # makes sure you're in the right virtual environment
pip install -r requirements.txt # makes sure python packages are up to date
python manage.py migrate sleepdebtcalc # makes sure database schema is migrated
source .env.dev # makes sure local environment variables are setup
If you are missing some dependencies like pip
, django
, virtualenv
, orvirtualenvwrapper
then try downloading and running this script or use this line of code:
curl -O https://raw.github.com/imkevinxu/django-projectbuilder/master/install_dependencies.sh && source install_dependencies.sh && rm -f install_dependencies.sh
Script has been tested with Mac OSX 10.7 (lion) and 10.8 (mountain lion) so far.