何らかの理由で、django が静的ファイルを提供していません。
私はすでにこの問題に対する多くの修正を見てきましたが、まだ解決策を見つけていません。
これが私の構成です:
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')}),
)
設定.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',
# Uncomment the next line to enable the admin:
# 'django.contrib.admin',
# Uncomment the next line to enable admin documentation:
# 'django.contrib.admindocs',
)
に移動するhttp://localhost:8000/static/css/default.css
と、次のエラーが表示されます。'css/default.css' could not be found
に移動するhttp://localhost:8000/static/
と、次のエラーが表示されます。Directory indexes are not allowed here.
静的ディレクトリがマッピングされているように見えますが、サブディレクトリはそうではありません。