Django Admin 看起来很奇怪
Django Admin Look strange
这是 Django 3 的新安装,我让这个管理员查找面板:
我在浏览器控制台没有错误
我已经完成了
python3 manage.py collectstatic
一条线索:
为了能够在没有 apache 500 错误的情况下看到这个管理面板,我必须评论:
django.contrib.staticfiles
在 settings.py 中,在 MIDDLEWARE
下
如果在 MIDDLEWARE 中调用 django.contrib.staticfiles
,我有这个 apache 错误:
TypeError: 'module' object is not callable,
我的 css 和 js 看起来不错...
我找不到如何更正这个观点
from django.contrib import admin
admin.autodiscover()
admin.site.enable_nav_sidebar = False
将以上代码添加到主 urls.py 文件中的某处
此问题已在 django 3.1 中提出。
这不是错误。它只是在其中添加了一个新的侧边栏。
添加上面的代码以禁用它。
这是 Django 3 的新安装,我让这个管理员查找面板:
我在浏览器控制台没有错误
我已经完成了
python3 manage.py collectstatic
一条线索: 为了能够在没有 apache 500 错误的情况下看到这个管理面板,我必须评论:
django.contrib.staticfiles
在 settings.py 中,在 MIDDLEWARE
如果在 MIDDLEWARE 中调用 django.contrib.staticfiles
,我有这个 apache 错误:
TypeError: 'module' object is not callable,
我的 css 和 js 看起来不错...
我找不到如何更正这个观点
from django.contrib import admin
admin.autodiscover()
admin.site.enable_nav_sidebar = False
将以上代码添加到主 urls.py 文件中的某处 此问题已在 django 3.1 中提出。 这不是错误。它只是在其中添加了一个新的侧边栏。 添加上面的代码以禁用它。