darklow / django-suit

Modern theme for Django admin interface
http://djangosuit.com/
Other
2.31k stars 701 forks source link

Sidebar is not properly showing #765

Closed shadowwa1k3r closed 3 years ago

shadowwa1k3r commented 3 years ago

Version: django-suit-2.0a1 Problem: Sidebar is not showing properly, but I did not get style problems when inspect with browser debugger image image

Mahdi-Ba commented 3 years ago

I have got same problem . I extend AdminSite Class django and set enable_nav_sidebar = False create directory myadmin and apps.py file and write

from django.contrib.admin.apps import AdminConfig

class MyAdminConfig(AdminConfig):
    default_site = 'myadmin.admin.MyAdminSite'

then like bellow write in admin.py

from django.contrib import admin
class MyAdminSite(admin.AdminSite):
    enable_nav_sidebar = False

then register and replace in settings.py

    'suit',
    # 'django.contrib.admin',
    'myadmin.apps.MyAdminConfig',
Jay-Arr-HummingBird commented 3 years ago

This solution works for me; my development website uses Python 3.7.6 suit 2.0a1 Django 3.1.2 (I upgraded from Django 2.1.0 today)

neerajgupta2407 commented 3 years ago

Thanks @Mahdi-Ba for solution I have created small gist for above issue. https://gist.github.com/neerajgupta2407/2474f255a4fb5a1f136288c480c91d87