Static files won't load when out of debug in Django

后端 未结 2 1049
礼貌的吻别
礼貌的吻别 2020-12-13 14:54

I\'m creating a Django project. I just tried taking the project out of debug, DEBUG = False and for some reason all my static files do not show up. They give an

2条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-13 15:58

    In Django 1.3, if you are just testing using the manage.py runserver, you can add the option "--insecure", as described in the staticfiles docs:

    It seems to still send emails to the admin saying that there is no template, but it does serve static files.

    I'm not sure if the email issue is on purpose or a bug

提交回复
热议问题