Django's admin pages are missing their typical formatting/style, have I set it up wrong?

后端 未结 3 1754
你的背包
你的背包 2020-12-06 11:42

I finally got my django install working, however I\'m noticing that the typical look and feel of the admin pages are missing, and it\'s as if there are no styles applied to

3条回答
  •  春和景丽
    2020-12-06 12:15

    Sounds like your admin media isn't being served correctly. In your settings.py, there's a variable called ADMIN_MEDIA_PREFIX, which specifies the URL where Django should look for them. The actual media files are in "[path to your Python site-packages]/django/contrib/admin/media". When using manage.py runserver, the files are served "automagically". However, when using Apache/nginx/etc it's your responsibility to make sure that your server makes the files available at that URL (using rewrite rules, symlinks, etc). More info can be found here.

提交回复
热议问题