There's no official documentation from Red Hat about how to write your WSGI application for OpenShift. So I decided to create bootstrap script to prepare your repository for deployment of your Django or Flask application.
Create your app and virtual enviroment
rhc-create-app -a <app name>
cd <bootstrap directory>
./bootstrap.py -f <framework> -n <app name> <app directory>/env
If you want to activate virtualenv:
cd <app directory>
source env/bin/activate
And if you want to test your app locally
Flask:
cd <app directory>/wsgi
./application
Django:
cd <app directory>/libs/<app name>
python manage.py runserver