Перенос служебных методов настроек

This commit is contained in:
2026-07-19 20:45:46 +03:00
parent da3f3aa703
commit 9e71bb6e29
7 changed files with 14 additions and 14 deletions

View File

@@ -16,12 +16,12 @@ from django.contrib.auth import authenticate
from environ import ImproperlyConfigured
from net.xeaf.rack.enums import AuthRejectReason
from net.xeaf.rack.managers import ConfigurationManager
from net.xeaf.rack.managers import CryptoManager
from net.xeaf.rack.models import AccountModel
from net.xeaf.rack.models import SessionModel
from net.xeaf.rack.utils.exceptions import UnauthorizedException
from .account_manager import AccountManager
from ..utils.settings import Config
class SessionManager[T:SessionModel]:
@@ -116,7 +116,7 @@ class SessionManager[T:SessionModel]:
:param session: Модель данных сессии
"""
ttl = ConfigurationManager.get_int("SESSION_TTL", cls.DEFAULT_SESSION_TTL)
ttl = Config.get_int("SESSION_TTL", cls.DEFAULT_SESSION_TTL)
session.renew(ttl, save=True)
@classmethod
@@ -144,7 +144,7 @@ class SessionManager[T:SessionModel]:
"""
if cls.__model_class is None:
model_path = ConfigurationManager.get_string("AUTH_SESSION_MODEL", "net_xeaf_rack.SessionModel")
model_path = Config.get_str("AUTH_SESSION_MODEL", "net_xeaf_rack.SessionModel")
app_label, model_name = model_path.split(".")
try: