For some reason, django is not serving my static files.
I have already reviewed many fixes for this problem, but I still have not found a solution.
Here is my configuration:
urls.py
urlpatterns = patterns('', (r'^$', index), (r'^ajax/$', ajax), (r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': path.join(path.dirname(__file__), 'static')}), )
settings.py
STATIC_ROOT = '/home/aurora/Code/django/test/static/' STATIC_URL = '/static/' INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles',
When will I go to http://localhost:8000/static/css/default.css
I get this error: 'css/default.css' could not be found
When will I go to http://localhost:8000/static/
I get this error: Directory indexes are not allowed here.
It looks like the static directory is getting mapped, but the subdirectories are not.
Franz payer
source share