Skip to content

Commit 6cc5060

Browse files
author
nikitatonkoshkur
committed
Added support for Django 3.1 admin sidebar
1 parent acc0592 commit 6cc5060

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

admin_reorder/middleware.py

+2-7
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
1-
# -*- coding: utf-8 -*-
2-
3-
from __future__ import unicode_literals
4-
51
from copy import deepcopy
62

73
from django.conf import settings
84
from django.contrib import admin
95
from django.core.exceptions import ImproperlyConfigured
10-
from django.utils.six import string_types
116

127
try:
138
from django.urls import resolve, Resolver404
@@ -64,11 +59,11 @@ def get_app_list(self):
6459
return ordered_app_list
6560

6661
def make_app(self, app_config):
67-
if not isinstance(app_config, (dict, string_types)):
62+
if not isinstance(app_config, (dict, str)):
6863
raise TypeError('ADMIN_REORDER list item must be '
6964
'dict or string. Got %s' % repr(app_config))
7065

71-
if isinstance(app_config, string_types):
66+
if isinstance(app_config, str):
7267
# Keep original label and models
7368
return self.find_app(app_config)
7469
else:

0 commit comments

Comments
 (0)