diff --git a/.vscode/temp.sql b/.vscode/temp.sql new file mode 100644 index 000000000..e69de29bb diff --git a/xadmin/plugins/xversion.py b/xadmin/plugins/xversion.py index 9d33502b8..6e337a72b 100644 --- a/xadmin/plugins/xversion.py +++ b/xadmin/plugins/xversion.py @@ -204,7 +204,8 @@ def get(self, request, *args, **kwargs): return TemplateResponse( request, self.recover_list_template or self.get_template_list( - "views/recover_list.html"), context) + "views/recover_list.html"), + context) class RevisionListView(BaseReversionView): diff --git a/xadmin/util.py b/xadmin/util.py index 06a23be82..33f6c4abd 100644 --- a/xadmin/util.py +++ b/xadmin/util.py @@ -34,7 +34,7 @@ except ImportError: from django.utils.timezone import localtime as tz_localtime -if django.get_version() < '1.11': +if django.VERSION < (1, 11): DJANGO_11 = False else: DJANGO_11 = True diff --git a/xadmin/views/base.py b/xadmin/views/base.py index 7d786c308..539ccbe4e 100644 --- a/xadmin/views/base.py +++ b/xadmin/views/base.py @@ -253,7 +253,7 @@ def __init__(self, request, *args, **kwargs): self.request = request self.request_method = request.method.lower() self.user = request.user - self.request.current_app = self.admin_site.name + self.base_plugins = [p(self) for p in getattr(self, "plugin_classes", [])]