I recently tried to export a Django project on OpenShift, but fruitlessly. The only solutions I found were “prebuilt” ones (such as https://github.com/openshift/django-example).
I spent some hours trying to adapt it to my project but I always got an Internal Server Error.
So, how to setup django on openshift?
I finally figured it out. The first thing to do is to start an openshift app and edit the setup.py file :
You need to uncomment “install_requires=[‘Django>=1.3’]”
Then you can commit to the server :
By default, it installs django 1.4 but I think you can choose another version with the correct install requirement in setup.py. Anyway, you’ll have to run the same django version on your computer and the server for the following.
Create your django project :
Then you’ll have to edit the file application, replace the whole content by :
Finally, you can commit the modifications :
You should see the django welcome page.
Now you can edit the settings and import your django apps without unwanted content