def base_factor(self): if not self._base_factor: if not self.POOL_BASE_FACTOR: self.POOL_BASE_FACTOR = LazyConfiguration().POOL_BASE_FACTOR self._base_factor = self.POOL_BASE_FACTOR return self._base_factor
def __init__(self, *args, **kwargs): super().__init__(args, kwargs) request = self.context.get('request') self.configs = LazyConfiguration() if request is not None and request.configs is not None: self.configs = request.configs
def __call__(self, request): request.configs = LazyConfiguration() response = self.get_response(request) return response