We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fc91a2f commit 38283aeCopy full SHA for 38283ae
admin_reorder/middleware.py
@@ -7,6 +7,7 @@
7
from django.conf import settings
8
from django.contrib import admin
9
from django.core.exceptions import ImproperlyConfigured
10
+from django.utils.six import string_types
11
12
try:
13
from django.urls import resolve, Resolver404
@@ -63,11 +64,11 @@ def get_app_list(self):
63
64
return ordered_app_list
65
66
def make_app(self, app_config):
- if not isinstance(app_config, (dict, basestring)):
67
+ if not isinstance(app_config, (dict, string_types)):
68
raise TypeError('ADMIN_REORDER list item must be '
69
'dict or string. Got %s' % repr(app_config))
70
- if isinstance(app_config, basestring):
71
+ if isinstance(app_config, string_types):
72
# Keep original label and models
73
return self.find_app(app_config)
74
else:
0 commit comments