问题解决了 。
environment: django1.6 python2.7 mac
1.base setting:
MEDIA_ROOT = os.path.join(BASE_DIR, "media")
MEDIA_URL = '/media/'
ADMIN_MEDIA_PREFIX = '/static/admin/'
STATIC_ROOT = os.path.join(BASE_DIR, "static")
STATIC_URL = "/static/"
2.remove "django.contrib.staticfiles" in INSTALL_APPS
3.ADD THIS FOLLOWING CODE IN PROJECT URLS.PY FILE.
from django.conf import settings
if settings.DEBUG:
urlpatterns += patterns('', url(r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT }),
url(r'^static/(?P<path>.*)$','django.views.static.serve',{'document_root':settings.STATIC_ROOT}), )
4. YOU COULD USE STATIC FILE IN HTML FILE LIKE THIS:
<link rel="stylesheet" type="text/css" href="/static/blog/style.css" />