def __init__(self, extension_manager): super(ExtensionResource, self).__init__() self._extension_manager = extension_manager self._dynamic_patterns = DynamicURLResolver() self._resource_url_patterns_map = {} # We want ExtensionResource to notice when extensions are # initialized or uninitialized, so connect some methods to # those signals. from djblets.extensions.signals import (extension_initialized, extension_uninitialized) extension_initialized.connect(self._on_extension_initialized) extension_uninitialized.connect(self._on_extension_uninitialized)
def __init__(self, *args, **kwargs): """Initialize the extension resource mixin to listen for changes. Args: *args (tuple): Additional positional arguments. **kwargs (dict): Additional keyword arguments. """ super(ExtensionRootResourceMixin, self).__init__(*args, **kwargs) extension_initialized.connect( self._generate_extension_uris_for_template) extension_uninitialized.connect( self._remove_extension_uris_from_template)