diff --git a/gas/apps.py b/gas/apps.py index be03c38..5579e5a 100644 --- a/gas/apps.py +++ b/gas/apps.py @@ -1,6 +1,5 @@ from django.apps import AppConfig from django.utils.translation import gettext_lazy as _ -from django.db.models.signals import post_migrate class GASConfig(AppConfig): diff --git a/gas/sites.py b/gas/sites.py index b5cebb1..3f6043e 100644 --- a/gas/sites.py +++ b/gas/sites.py @@ -1,9 +1,6 @@ -from collections import namedtuple - from django.urls import include, re_path from django.core.exceptions import ImproperlyConfigured from django.utils.module_loading import autodiscover_modules -from django.utils.translation import gettext_lazy as _ class Entry: diff --git a/gas/views.py b/gas/views.py index 2c8d04c..be08d8c 100644 --- a/gas/views.py +++ b/gas/views.py @@ -1,11 +1,10 @@ -import datetime import json from django.contrib import messages from django.contrib.admin.utils import NestedObjects from django.core.exceptions import ImproperlyConfigured from django.db import router -from django.http import HttpResponse, HttpResponseRedirect, HttpResponseBadRequest, HttpResponseNotAllowed +from django.http import HttpResponse, HttpResponseRedirect, HttpResponseBadRequest from django.urls import reverse from django.utils.encoding import force_text from django.utils.html import escape, escapejs @@ -13,9 +12,7 @@ from django.utils.text import capfirst from django.utils.translation import gettext_lazy as _ from django.views.generic import ListView, CreateView, UpdateView, DeleteView -from . import forms from . import gas_settings -from .sites import site class AjaxCommandsMixin: @@ -52,8 +49,8 @@ class GASMixin: roles.add(self.base_role) access_denied = ( not user.is_authenticated or ( - not user.is_superuser - and user.user_roles.filter(role__in=roles).count() == 0 + not user.is_superuser + and user.user_roles.filter(role__in=roles).count() == 0 ) ) if access_denied: