Installation instructions for Ubuntu. Tested on 12.04.
Install setuptools.
sudo apt-get install python-setuptools
Install virtualenv, to keep the environment isolated.
sudo easy_install virtualenv
Clone the repository.
git clone [email protected]:Teknologforeningen/traffpunkt_aalto.git && cd traffpunkt_aalto/
Install virtualenv to the project.
virtualenv --no-site-packages venv
Activate virtualenv:
source venv/bin/activate
PIL and Python requirements: https://github.com/python-imaging/Pillow
# Ubuntu 12.04
$ sudo apt-get install python-dev python-setuptools libpq-dev
$ sudo apt-get install libtiff4-dev libjpeg8-dev zlib1g-dev libfreetype6-dev liblcms1-dev libwebp-dev
Install requirements:
pip install -r requirements.txt
To activate:
$ source venv/bin/activate
Now you can use pip without sudo, and run django with pip's isolated packages just like you would normally.
After fresh install:
python manage.py syncdb --all
python manage.py migrate --fake
Guide: https://devcenter.heroku.com/articles/django
Add heroku remote to git:
$ heroku git:remote -a <heroku-app-id>
Set the environment variable so the settings use heroku-settings:
$ heroku config:set DJANGO_ENVIRONMENT=heroku
Deploy branch named "heroku" to heroku:
$ git push heroku master
Running commands:
# e.g
$ heroku run python manage.py syncdb
Start/scale the instance:
$ heroku ps:scale web=1
Check the status:
$ heroku ps
Check if database is configured and ready:
$ heroku config | grep DATABASE_URL
If the DATABASE_URL variable is set the db is ready and should work with the default heroku settings.
If the DATABASE_URL is not set you may need to add a db and promote it.
Check if there is a database available already:
$ heroku addons | grep POSTGRES
Add a database:
$ heroku addons:add heroku-postgresql:dev
Promote the database so the settings pick it up:
$ heroku config | grep HEROKU_POSTGRESQL
$ heroku pg:promote <output of previous command>
Reset the database
$ heroku pg:reset DATABASE
More db information here: https://devcenter.heroku.com/articles/heroku-postgresql#provisioning-the-add-on
Twitter Bootstrap http://getbootstrap.com/
less http://lesscss.org/
Django https://www.djangoproject.com/
Django CMS https://www.django-cms.org/en/