0

I have built a Django application with a custom interface. It hasn't been changed in a couple of years.

These (previous) servers are running Django 3.0.8.

Recently I set up a new server, and the Django Admin interface now shows the model list in a scrolling iframe, and long tables on the right side are also scrolled independently of the page.

This server is running Django 3.2.3.

I don't like the new interface, but it more importantly it will require an extensive rewrite of our custom admin css.

Can anyone point me to information about the change, or tell me if there is a setting to disable it?

Andy Swift
  • 2,179
  • 3
  • 32
  • 53

1 Answers1

0

I found the answer in this Stack Overflow answer. I will leave this question up because the other answer doesn't mention iframes.


Django 3.1 added the new scrolling sidebar in an iframe.

To disable it add the following to the root urls.py file:

from django.contrib import admin
admin.autodiscover()
admin.site.enable_nav_sidebar = False

The 3.1 Release Notes say:

The admin now has a sidebar on larger screens for easier navigation. It is enabled by default but can be disabled by using a custom AdminSite and setting AdminSite.enable_nav_sidebar to False.


Reference links from the original answer:

Andy Swift
  • 2,179
  • 3
  • 32
  • 53