Django 1.6

Django 1.6 Community Python


Get up and running quickly with a Django 1.6 and Python 3.3 installation on OpenShift. The Django project name used in this repo is 'openshift' but you can feel free to change it. Right now the backend is sqlite3 and the database runtime is found in $OPENSHIFT_DATA_DIR/db.sqlite3.

Before you push this app for the first time, you will need to change the Django admin password. Then, when you first push this application to the cloud instance, the sqlite database is copied from wsgi/openshift/db.sqlite3 to $OPENSHIFT_DATA_DIR/ with your newly changed login credentials. Other than the password change, this is the stock database that is created when python syncdb is run with only the admin app installed.

On subsequent pushes, a python syncdb is executed to make sure that any models you added are created in the DB. If you do anything that requires an alter table, you could add the alter statements in GIT_ROOT/.openshift/action_hooks/alter.sql and then use GIT_ROOT/.openshift/action_hooks/deploy to execute that script (make sure to back up your database w/ rhc app snapshot save first :) )