After the django project closes debug, the admin static file cannot find a solution

Solution 1:
It can be handled by nginx reverse proxy, for example:
server { listen 8000; server_name localhost; location / { proxy_pass http://127.0.0.1:xxxx/; } location /static/admin/ { alias /xxxxxxxxx/static /admin/; } } Reference: http://www.jiajiajia.club/blog/artical/QEtFVK/358









Solution 2:
python manage.py runserver 0.0.0.0:8000 --insecure
Reference: https://blog.csdn.net/weixin_30872867/article/details/97463590

Solution 3:
Use collectstatic
reference: https://www.cnblogs.com/yuerhoo/p/14284602.html

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324343854&siteId=291194637