Fixed #32443 -- Removed "shifted" CSS class when admin's sidebar is disabled.

This commit is contained in:
Amir Ajorloo 2021-02-18 11:48:19 +03:30 committed by GitHub
parent d02d60eb0f
commit 1710cdbe79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -69,7 +69,7 @@
{% endblock %} {% endblock %}
{% endif %} {% endif %}
<div class="main shifted" id="main"> <div class="main" id="main">
{% if not is_popup and is_nav_sidebar_enabled %} {% if not is_popup and is_nav_sidebar_enabled %}
{% block nav-sidebar %} {% block nav-sidebar %}
{% include "admin/nav_sidebar.html" %} {% include "admin/nav_sidebar.html" %}

View File

@ -39,6 +39,7 @@ class AdminSidebarTests(TestCase):
def test_sidebar_not_on_index(self): def test_sidebar_not_on_index(self):
response = self.client.get(reverse('test_with_sidebar:index')) response = self.client.get(reverse('test_with_sidebar:index'))
self.assertContains(response, '<div class="main" id="main">')
self.assertNotContains(response, '<nav class="sticky" id="nav-sidebar">') self.assertNotContains(response, '<nav class="sticky" id="nav-sidebar">')
def test_sidebar_disabled(self): def test_sidebar_disabled(self):