我正在使用 http://appfog.com我有 DEBUG = True 和 ADMIN_MEDIA_PREFIX = '/static/admin/' 管理员的 css 丢失。
最佳答案
Django 仅在 DEBUG=True 并且它正在运行开发服务器时提供静态文件。
This view is automatically enabled and will serve your static files at STATIC_URL when you use the built-in runserver management command [...] To enable this view if you are using some other server for local development, you'll add a couple of lines to your URLconf. The first line goes at the top of the file, and the last line at the bottom.
例子:
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
# ... the rest of your URLconf goes here ...
urlpatterns += staticfiles_urlpatterns()
希望对你有帮助
关于python - Appfog Django 管理 css 丢失,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13600005/