How to configure Django's "staticfiles" app to list directory contents? -
i'm using django's built-in web server, in debug mode.
this part of settings.py:
static_root = '/home/user/static_root' static_url = '/static/' staticfiles_dirs = ( '/abs/path/to/static/dir', ) staticfiles_finders = ( 'django.contrib.staticfiles.finders.filesystemfinder', 'django.contrib.staticfiles.finders.appdirectoriesfinder', ) if access http://localhost:8000/static/png/, expect see list of files available in /abs/path/to/static/dir/png. instead 404 error "directory indexes not allowed here."
now if access files directly, e.g. http://localhost:8000/static/png/test.png, works.
i've checked answers (here) without success.
so, know how configure django such staticfiles app lists directory contents?
'show_indexes': true as per documentation
Comments
Post a Comment