-
-
Save neerajgupta2407/2474f255a4fb5a1f136288c480c91d87 to your computer and use it in GitHub Desktop.
File contains code to install Django-Suit , Dark theme on Django 3.1. ( Fix for sidebar issue)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# App Name: common. | |
# pip install https://github.com/darklow/django-suit/tarball/v2 | |
# File: common/apps.py | |
from django.apps import AppConfig | |
from django.contrib import admin | |
from django.contrib.admin.apps import AdminConfig | |
from suit.apps import DjangoSuitConfig | |
class CommonConfig(AppConfig): | |
name = 'common' | |
### For Admin Panel config. | |
# Code for using the Dark theme. | |
class SuitConfig(DjangoSuitConfig): | |
layout = 'vertical' | |
class MyAdminSite(admin.AdminSite): | |
enable_nav_sidebar = False | |
class MyAdminConfig(AdminConfig): | |
default_site = 'common.apps.MyAdminSite' | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Issue Solution: https://github.com/darklow/django-suit/issues/765 | |
# Steps: | |
1. pip install https://github.com/darklow/django-suit/tarball/v2 | |
2. copy the content from `apps.py` above | |
3. Update INSTALLED_APPS in settings.py. | |
` | |
'common.apps.SuitConfig', # for django suit. | |
# 'django.contrib.admin', | |
'common.apps.MyAdminConfig', | |
` | |
Enjoy!! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment