0

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:

enter image description here

enter image description here

Please advise how to solve this.

sunsetjunks
  • 740
  • 1
  • 9
  • 14
  • 1
    For someone having a similar issue: in contrast to Django 1.X, Django 3.X now shows the list of objects in a sidebar all the time (one can show/hide it). So if the styles are wrong, you see both and in a kind of mess. – sunsetjunks Oct 29 '20 at 10:43
  • Can be hidden with the site setting 'enable_nav_sidebar = False' – Moulde Jun 17 '21 at 08:45

1 Answers1

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.

cizario
  • 3,995
  • 3
  • 13
  • 27
  • 1
    OK, your answer helped to get to the solution. We see both the list and the internal items because Django 3 shows the list in a sidebar you can show or hide! We updated the styles and everything is fine now! – sunsetjunks Oct 29 '20 at 10:42