I'm working with an existing (and previously functional) Django site. We recently upgraded from Django 1.8.13 to 1.10. It works fine when hosted from my machine using PyCharm, but when deployed, all static resources (on the admin and the main site) yield 404's with the message, Directory indexes are not allowed here.
Our settings.py
contains the following:
INSTALLED_APPS = (
...
'django.contrib.staticfiles',
...
)
STATIC_URL = '/static/'
PROJECT_DIR = os.path.dirname(__file__)
STATICFILES_DIRS = (
os.path.join(PROJECT_DIR, '../static'),
)
STATIC_ROOT = os.path.join(PROJECT_DIR, '../static_resources')
Aucun commentaire:
Enregistrer un commentaire