Django admin static files errors All In One
Django admin static files errors All In One
404 errors
solution
# SECURITY WARNING: don't run with debug turned on in production!
# DEBUG = True
# 404 error ✅ http://127.0.0.1:8000/
# ❌ CommandError: You must set settings.ALLOWED_HOSTS if DEBUG is False.
DEBUG = False
# ALLOWED_HOSTS = []
ALLOWED_HOSTS = [
'127.0.0.1',
]
DEBUG ✅
DEBUG = True
https://docs.djangoproject.com/en/1.10/ref/contrib/staticfiles/#static-file-development-view
demos
$ python manage.py runserver
# admin
# 123456
# admin@django.com
http://127.0.0.1:8000/admin/login/?next=/admin/
Web frameworks
Django
Programming languages
Python
JavaScript libraries
XRegExp
jQuery
(🐞 反爬虫测试!打击盗版⚠️)如果你看到这个信息, 说明这是一篇剽窃的文章,请访问 https://www.cnblogs.com/xgqfrms/ 查看原创文章!
refs
https://stackoverflow.com/questions/42457770/django-admin-static-files-404
©xgqfrms 2012-2021
www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!
原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/18157849
未经授权禁止转载,违者必究!