misc: remove cache decorators declaration to avoir circular import (#62014)

This commit is contained in:
Serghei Mihai 2022-02-21 12:12:50 +01:00
parent 76decbaf27
commit cae2e1cd33
6 changed files with 6 additions and 11 deletions

View File

@ -33,7 +33,7 @@ from django.db.models.functions import Trunc
from django.utils.timezone import now, utc
from django.utils.translation import ugettext_lazy as _
from authentic2.decorators import GlobalCache
from authentic2.utils.cache import GlobalCache
from . import sql

View File

@ -20,7 +20,7 @@ import urllib.parse
from django.conf import settings
from . import app_settings, plugins
from .decorators import SessionCache
from .utils.cache import SessionCache
def make_origin(url):

View File

@ -36,9 +36,10 @@ from django.contrib.postgres.fields import JSONField
from authentic2 import app_settings
from authentic2.a2_rbac.models import RoleParenting
from authentic2.decorators import RequestCache, errorcollector
from authentic2.decorators import errorcollector
from authentic2.models import Attribute, AttributeValue, Service
from authentic2.utils import misc as utils_misc
from authentic2.utils.cache import RequestCache
from authentic2.validators import email_validator
from django_rbac.models import PermissionMixin

View File

@ -24,12 +24,6 @@ from django.http import Http404, HttpResponse, HttpResponseBadRequest, HttpRespo
from django.views.debug import technical_404_response
from . import app_settings
from .utils.cache import ( # pylint: disable=unused-import
CacheUnusable,
GlobalCache,
RequestCache,
SessionCache,
)
# XXX: import to_list for retrocompaibility
from .utils.misc import to_iter, to_list # pylint: disable=unused-import

View File

@ -29,7 +29,6 @@ from django.urls import reverse
from django.utils.encoding import force_text
from authentic2.compat_lasso import lasso
from authentic2.decorators import RequestCache
from authentic2.http_utils import get_url
from authentic2.idp.saml import app_settings
from authentic2.saml import models, saml2utils
@ -39,6 +38,7 @@ from authentic2.saml.models import (
LibertyServiceProvider,
SPOptionsIdPPolicy,
)
from authentic2.utils.cache import RequestCache
from .. import nonce

View File

@ -17,7 +17,7 @@
from django.conf.urls import url
from django.http import HttpResponse
from authentic2.decorators import SessionCache
from authentic2.utils.cache import SessionCache
@SessionCache()