Exemplo n.º 1
0
    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)
Exemplo n.º 2
0
    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)
Exemplo n.º 3
0
    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)
Exemplo n.º 4
0
    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)