python - Appfog Django 管理 css 丢失

标签 python django appfog

我正在使用 http://appfog.com我有 DEBUG = True 和 ADMIN_MEDIA_PREFIX = '/static/admin/' 管理员的 css 丢失。

最佳答案

Django 仅在 DEBUG=True 并且它正在运行开发服务器时提供静态文件。

Documentation :

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/

相关文章:

python - 计算 10 个整数中的平均数和最小数

python - 重试 <Response [404]> 直到我得到 <Response [200]>

node.js - 使用 AppFog 的意外响应代码 : 502 error when using socket. io

php - 我需要破解哪些配置文件才能在 appfog 上部署crete5

Python:有没有办法从包装它的装饰器中获取局部函数变量?

python - 尽管python脚本在本地工作,但运行MapReduce代码时出错

python - 有没有一种简单的方法可以在没有图像的情况下为 Kivy 标签、按钮、小部件等添加边框?

python - Django - TypeError - save() 得到了一个意外的关键字参数 'force_insert'

python - Django 通用 View ManyToMany 与 "through"模型

node.js - Appfog 与 Node.js 的负载均衡