def context_class(self):
        """
        Context as a :class:`shelter.core.context.Context` class or subclass.
        """
        if 'context_class' not in self._cached_values:
            context_cls_name = getattr(self.settings, 'CONTEXT_CLASS', '')
            if context_cls_name:
                context_class = import_object(context_cls_name)
            else:
                context_class = Context
            self._cached_values['context_class'] = context_class
        return self._cached_values['context_class']
def context_class ( self ) : if 'context_class' not in self . _cached_values : context_cls_name = getattr ( self . settings , 'CONTEXT_CLASS' , '' ) if context_cls_name : context_class = import_object ( context_cls_name ) else : context_class = Context self . _cached_values [ 'context_class' ] = context_class return self . _cached_values [ 'context_class' ]
Context as a :class:`shelter.core.context.Context` class or subclass.