After an upgrade from Django 1.11 to Django 3.1 django admin shows list of models on top of internal items

余生长醉 提交于 2021-01-29 14:24:16

问题


After an upgrade from Django 1.11 (python2.7) to Django 3.1 (python3.6) on Centos7, django admin still shows the list of models on top of the page, above the list of items in this model.

Before the upgrade, the admin showed everything correctly: you see a list, you enter an item and see a screen related to this item, no more lists.

Please see the related screenshots:

Please advise how to solve this.


回答1:


maybe you need to re-run collectstatic command

python manage.py collectstatic

refer to https://docs.djangoproject.com/en/3.1/ref/contrib/staticfiles/#collectstatic for more options, but --clear is the one that may helps you:

python manage.py collectstatic --clear

to clear Clear the existing files before trying to copy or link the original file.



来源:https://stackoverflow.com/questions/64588165/after-an-upgrade-from-django-1-11-to-django-3-1-django-admin-shows-list-of-model

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!