开发者

Where Are My Django Static Files?

When I view my Django admin (after firing up the python manage.py runserver command), my admin section looks pretty & has CSS files in a static directory....somewhere.

When I look at the exact same admin area via Apache, it looks awful, 'cause the static files are nonexistent.

  • http://localhost:8000/static/admin/css/base.css (run via Django, exists)
  • http://loca开发者_开发技巧lhost/static/admin/css/base.css (run via Apache, doesn't exist!)

I'm assuming that the static CSS files are in some directory somewhere and the Django server can see them but Apache doesn't know where they are. So if I knew where Django keeps the CSS files, then I could put that path into the settings.py for static files. I have no clue where the files are being stored.... where are my Django static files?


For Django's admin static files, look in:

django > contrib > admin > media

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜