Description of problem: Like some others, I cannot get static files to work with django and Python-2.7. It works when you add DEBUG=True to the settings.py file, but without that, no static files show up. I have put the appropriate collect-static call in my deploy script, and I also tried adding a .htaccess file to wsgi, wsgi/static, and both, but that didn't help. Additional info: Similar bugs http://www.openshift.com/forums/openshift/cannot-server-django-27-static-files https://www.openshift.com/forums/openshift/djangos-not-serving-static-files
Same issue as v1.
I'd also like to see a fix for this. I'm currently using Python 2.6 but would like to start using 2.7 cartridge, but not until this is fixed. Running production Django apps in debug mode is not cool.
Things did not change with migration of Python-2.7 cartridge from "community" to "official".
This is how we got it working on OpenShift: https://appsembler.readthedocs.org/en/latest/static_assets.html
I wasn't able to reproduce this issue using python-2.7 and Django 1.4. What were the steps taken that originally exhibited this issue?
I'm having the same issue with the python-3.3 cartridge and Django 1.6.
I can't reproduce this issue with python-3.3 / Django 1.6 either. Static files are being served and DEBUG=False, same as with python-2.7 and Django 1.4. Please provide: 1. Detailed steps how you're able to provoke the issue. 2. `rhc tail` output that coincides with the issue occurring (with DEBUG=False). In case you find it helpful for your own debugging, my steps to attempt to reproduce this issue were: 1. Create a python-3.3 / python 2.7 app. 2. For Python 3, install Django using the Django Python 3 quickstart: <https://www.openshift.com/quickstarts/django-16-and-python-3-on-openshift-0> For Python 2, I used: <https://www.openshift.com/quickstarts/django> 3. Edit setup.py with 'Django==1.6' For Django 1.4, I set: 'Django==1.4' 4. Edit wsgi/openshift/settings.py with DEBUG=False 5. Commit, push app. 6. Test requesting a static file using the browser and curl.
Alex, thank you for your effort with this; I was using a custom setup of Django 1.6 which lacks code to perform the functionality contained in wsgi/openshift/openshiftstaticfiles.py. I will use the quickstart git repo from now on. Thanks again!!
Verified on devenv_4607 Reffer to comment 7 A. python-3.3/ django 1.6 1. rhc app create django33 python-3.3 2. #cd django33 #git remote add upstream -m master git://github.com/rancavil/django-py3-openshift-quickstart.git #git pull -s recursive -X theirs upstream master 3. Edit setup.py with 'Django==1.6' 4. Edit wsgi/openshift/settings.py with DEBUG=False 5. Commit push app Will show static files copying debug info. <----snip-----> remote: Copying '/var/lib/openshift/533a233f778b13ab4100003a/python/virtenv/venv/lib/python3.3/site-packages/Django-1.6-py3.3.egg/django/contrib/admin/static/admin/img/gis/move_vertex_on.png' remote: remote: 69 static files copied. <----snip----> 6.Test requesting a static file using the browser. Could see the static file. http://django33-adog.dev.rhcloud.com/static/admin/img/gis/move_vertex_on.png B. python 2.7/ django 1.4 1.rhc app create django27 python-2.7 2.cd django27 git remote add upstream -m master git://github.com/openshift/django-example.git git pull -s recursive -X theirs upstream master 3. Edit setup.py with 'Django==1.4' 4. Edit wsgi/openshift/settings.py with DEBUG=False 5. Commit push app Same info with A->5 step 6.Test requesting a static file using the browser. Could see the static file. Mark this bug as VERIFIED.