django.conf.urls.url - python examples

Here are the examples of the python api django.conf.urls.url taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

145 Examples 7

3 View Complete Implementation : mixins.py
Copyright MIT License
Author : elton2048
    def get_admin_urls_for_registration(self):
        urls = super(OrderableMixin, self).get_admin_urls_for_registration()
        urls += (
            url(
                self.url_helper.get_action_url_pattern('reorder'),
                view=self.reorder_view,
                name=self.url_helper.get_action_url_name('reorder')
            ),
        )
        return urls

3 View Complete Implementation : admin.py
Copyright Apache License 2.0
Author : drexly
    def get_urls(self):
        return [
            url(
                r'^(.+)/pastword/$',
                self.admin_site.admin_view(self.user_change_pastword),
                name='auth_user_pastword_change',
            ),
        ] + super(UserAdmin, self).get_urls()

3 View Complete Implementation : test_doc.py
Copyright GNU Affero General Public License v3.0
Author : maas
    def test_nested_urlpatterns_with_handler(self):
        # Resources are found in nested urlconfs.
        handler = type("\\m/", (BaseHandler,), {"resource_uri": True})
        resource = Resource(handler)
        module = self.make_module()
        submodule = self.make_module()
        submodule.urlpatterns = [url("^metal", resource)]
        module.urlpatterns = [url("^genre/", include(submodule))]
        self.astertSetEqual({resource}, find_api_resources(module))

3 View Complete Implementation : product.py
Copyright BSD 3-Clause "New" or "Revised" License
Author : dinoperovic
    def get_urls(self):
        urls = super(ProductAdmin, self).get_urls()  # pragma: no cover
        return [
            url(r'^get-attribute-choices/$', self.admin_site.admin_view(self.get_attribute_choices),
                name='shopit_product_get_attribute_choices'),
            url(r'^(?P<pk>\d+)/add-variant/$', self.admin_site.admin_view(self.add_variant),
                name='shopit_product_add_variant'),
            url(r'^(?P<pk>\d+)/create-variant/(?P<combo>\d+)/$', self.admin_site.admin_view(self.create_variant),
                name='shopit_product_create_variant'),
            url(r'^(?P<pk>\d+)/delete-variant/(?P<variant>\d+)/$', self.admin_site.admin_view(self.delete_variant),
                name='shopit_product_delete_variant'),
            url(r'^(?P<pk>\d+)/create-all-variants/$', self.admin_site.admin_view(self.create_all_variants),
                name='shopit_product_create_all_variants'),
            url(r'^(?P<pk>\d+)/delete-invalid-variants/$', self.admin_site.admin_view(self.delete_invalid_variants),
                name='shopit_product_delete_invalid_variants'),
        ] + urls  # pragma: no cover

3 View Complete Implementation : HostAdmin.py
Copyright GNU General Public License v3.0
Author : jianglb-alibaba
    def get_urls(self):
        urls = super().get_urls()
        custom_urls = [
            url(
                r'^scan_host/$',
                self.admin_site.admin_view(self.scan_host),
                name='scan_host',
            ),
        ]
        return custom_urls + urls

3 View Complete Implementation : urls.py
Copyright MIT License
Author : akx
def get_docs_urls(router, namespace, docs_url='docs/?'):
    from . import views
    json_url_name = 'lepo_doc_%s' % id(router)
    return [
        url('swagger\.json$', views.get_swagger_json, kwargs={'router': router}, name=json_url_name),
        url('%s$' % docs_url, views.render_docs, kwargs={
            'router': router,
            'json_url_name': '%s:%s' % (namespace, json_url_name),
        }),
    ]

3 View Complete Implementation : admin.py
Copyright BSD 3-Clause "New" or "Revised" License
Author : openwisp
    def get_urls(self):
        # hardcoding django_loci as the prefix for the
        # view names makes it much easier to extend
        # without having to change templates
        app_label = 'django_loci'
        return [
            url(r'^(?P<pk>[^/]+)/json/$',
                self.admin_site.admin_view(self.json_view),
                name='{0}_location_json'.format(app_label)),
            url(r'^(?P<pk>[^/]+)/floorplans/json/$',
                self.admin_site.admin_view(self.floorplans_json_view),
                name='{0}_location_floorplans_json'.format(app_label))
        ] + super(AbstractLocationAdmin, self).get_urls()

3 View Complete Implementation : admin.py
Copyright MIT License
Author : ic-labs
    def get_urls(self):
        """
        Add ``layout_placeholder_data`` URL.
        """
        # See: `fluent_pages.pagetypes.fluentpage.admin.FluentPageAdmin`.
        urls = super(LayoutAdmin, self).get_urls()
        my_urls = patterns(
            '',
            url(
                r'^placeholder_data/(?P<id>\d+)/$',
                self.admin_site.admin_view(self.placeholder_data_view),
                name='layout_placeholder_data',
            )
        )
        return my_urls + urls

3 View Complete Implementation : sites.py
Copyright GNU General Public License v3.0
Author : jianglb-alibaba
    def get_urls(self):
        urls = super(DashboardSite, self).get_urls()
        custom_urls = [
            url(r'^$', self.admin_view(HomeView.as_view()), name='index')
        ]

        del urls[0]
        return custom_urls + urls + get_refreshable_urls(self.admin_view)

3 View Complete Implementation : test_doc.py
Copyright GNU Affero General Public License v3.0
Author : maas
    def test_urlpatterns_with_resource_hidden(self):
        # Resources for handlers with resource_uri attributes are discovered
        # in a urlconf module and returned, unless hidden = True.
        handler = type(
            "\\m/", (BaseHandler,), {"resource_uri": True, "hidden": True}
        )
        resource = Resource(handler)
        module = self.make_module()
        module.urlpatterns = [url("^metal", resource)]
        self.astertSetEqual(set(), find_api_resources(module))

3 View Complete Implementation : register.py
Copyright GNU General Public License v3.0
Author : luisza
    def get_urls(self):
        dev = []

        for i, view in enumerate(self.views):
            appname = view.base_model._meta.app_label
            modelname = view.base_model.__clast__.__name__
            dev.append(
                url("regProduct/%s/%s/(?P<modelpk>)\d+$" % (
                    appname, modelname),
                    self.views[i].as_view(),
                    name="reserve_product_%s_%s" % (
                    appname, modelname))

            )
        return dev

3 View Complete Implementation : urls.py
Copyright MIT License
Author : jet-admin
def init_urls():
    router = Router()

    router.register('models/(?P<model>[^/]+)/', route_view(ModelViewSet))

    extra_urls = [
        url(r'^$', route_view(ApiView).as_view(), name='root'),
        url(r'^register/', route_view(RegisterView).as_view(), name='register'),
        url(r'^model_descriptions/', route_view(ModelDescriptionView).as_view(), name='model-descriptions'),
        url(r'^sql/', route_view(SqlView).as_view(), name='sql'),
        url(r'^messages/', route_view(MessageView).as_view(), name='message'),
        url(r'^file_upload/', route_view(FileUploadView).as_view(), name='file-upload'),
        url(r'^image_resize/', route_view(ImageResizeView).as_view(), name='image-resize'),
    ]

    api_urls = router.urls + extra_urls

    return api_urls

3 View Complete Implementation : models.py
Copyright GNU Affero General Public License v3.0
Author : nesdis
    def get_urls(self):
        # Add the URL of our custom 'add_view' view to the front of the URLs
        # list.  Remove the existing one(s) first
        from django.conf.urls import url

        def wrap(view):
            def wrapper(*args, **kwargs):
                return self.admin_site.admin_view(view)(*args, **kwargs)
            return update_wrapper(wrapper, view)

        info = self.model._meta.app_label, self.model._meta.model_name

        view_name = '%s_%s_add' % info

        return [
            url(r'^!add/$', wrap(self.add_view), name=view_name),
        ] + self.remove_url(view_name)

3 View Complete Implementation : urls.py
Copyright The Unlicense
Author : apinf
def get_docs_urls(router, namespace, docs_url='docs/?'):
    from . import views
    json_url_name = 'lepo_doc_%s' % id(router)
    return [
        url('swagger\.json$', views.get_swagger_json, kwargs={'router': router}, name=json_url_name),
        url('%s$' % docs_url, views.render_docs, kwargs={
            'router': router,
            'json_url_name': '%s:%s' % (namespace, json_url_name),
        }),
    ]

3 View Complete Implementation : test_urlparser.py
Copyright MIT License
Author : Arello-Mobile
    def test_astemble_data_with_non_api_callback(self):
        bad_pattern = patterns('', url(r'^some_view/', NonApiView.as_view()))

        data = self.urlparser.gather_endpoint_data(bad_pattern)

        self.astertIsNone(data)

3 View Complete Implementation : admin.py
Copyright MIT License
Author : asmadotgh
    def get_urls(self):
        urls = super(StudyAdmin, self).get_urls()
        my_urls = [
            url(r'download_records_csv/(?P<study_key>\w+)/', self.admin_site.admin_view(_download_records_csv), name="download_study_records_csv"),
            url(r'download_rating_csv/(?P<study_key>\w+)/', self.admin_site.admin_view(_download_rating_csv), name="download_study_ratings_csv"),
        ]
        return my_urls + urls

3 View Complete Implementation : test_doc.py
Copyright GNU Affero General Public License v3.0
Author : maas
    def test_urlpatterns_with_resource(self):
        # Resources for handlers with resource_uri attributes are discovered
        # in a urlconf module and returned. The type of resource_uri is not
        # checked; it must only be present and not None.
        handler = type("\\m/", (BaseHandler,), {"resource_uri": True})
        resource = Resource(handler)
        module = self.make_module()
        module.urlpatterns = [url("^metal", resource)]
        self.astertSetEqual({resource}, find_api_resources(module))

3 View Complete Implementation : wagtail_hooks.py
Copyright MIT License
Author : JamesRamm
    def get_admin_urls_for_registration(self):
        """
        Utilised by Wagtail's 'register_admin_urls' hook to register urls for
        our the views that clast offers.
        """
        urls = super(OrderModelAdmin, self).get_admin_urls_for_registration()
        urls = urls + (
            url(self.url_helper.get_action_url_pattern('detail'),
                self.detail_view,
                name=self.url_helper.get_action_url_name('detail')),
        )
        return urls

3 View Complete Implementation : test_api_introspector.py
Copyright MIT License
Author : Arello-Mobile
    def setUp(self):
        CustomViewSet.as_view = viewset_as_view_decorator(CustomViewSet.as_view)
        self.url_patterns = patterns(
            '',
            url(r'a-view$', EmailApiView.as_view()),
            url(r'b-view$', CustomViewSet.as_view({'get': 'list'})),
            url(r'c-view$', decorator_view),
        )

        url_parser = UrlParser()
        self.apis = url_parser.get_apis(url_patterns=self.url_patterns)
        self.api_introspector = ApiIntrospector(self.apis)
        self.api_introspector.inspect()

3 View Complete Implementation : admin.py
Copyright MIT License
Author : asmadotgh
    def get_urls(self):
        urls = super(ChatRatingAdmin, self).get_urls()
        my_urls = [
            url(r'download_rating_csv/$', self.admin_site.admin_view(_download_rating_csv), name="download_rating_csv"),
        ]
        return my_urls + urls

3 View Complete Implementation : previews.py
Copyright MIT License
Author : ic-labs
    def get_urls(self):
        urlpatterns = patterns(
            '',
            url(
                r'^(?P<pk>.+)/preview-field/(?P<field_name>[\w\d-]+)/(?P<raw_ids>[\d,]+)/$',
                self.admin_site.admin_view(self.fetch_field_previews))
        )

        return urlpatterns + super(RawIdPreviewAdminMixin, self).get_urls()

3 View Complete Implementation : utils.py
Copyright MIT License
Author : akx
def get_urlpatterns(handler_module, definition_file='swagger2/petstore-expanded.yaml'):
    # NB: This could just as well be your `urls.py` – it's here to make testing various handler
    #     configurations easier.

    router = Router.from_file(os.path.join(os.path.dirname(__file__), 'tests', definition_file))
    router.add_handlers(handler_module)
    validate_router(router)
    router_urls = router.get_urls(
        decorate=(csrf_exempt,),
        optional_trailing_slash=True,
        root_view_name='api_root',
    )

    urlpatterns = [
        url(r'^admin/', admin.site.urls),
        url(r'^api/', include((router_urls, 'api'), 'api')),
        url(r'^api/', include((get_docs_urls(router, 'api-docs'), 'api-docs'), 'api-docs')),
    ]
    return urlpatterns

3 View Complete Implementation : test_urlparser.py
Copyright MIT License
Author : Arello-Mobile
    def test_format_api_patterns_excluded_namesapce(self):
        urls = patterns(
            '',
            url(r'api/base/path/',
                include(self.url_patterns, namespace='exclude'))
        )
        apis = self.urlparser.format_api_patterns(
            url_patterns=urls, exclude_namespaces='exclude')

        self.astertEqual([], apis)

3 View Complete Implementation : router.py
Copyright MIT License
Author : nhsuk
    @clastmethod
    def get_urlpatterns(cls):
        """
        Only get page by id allowed.
        """
        return [
            url(r'^(?P<pk>\d+)/$', cls.as_view({'get': 'detail_view'}), name='detail'),
        ]

3 View Complete Implementation : admin.py
Copyright MIT License
Author : opennode
    def get_urls(self):
        """
        Inject extra action URLs.
        """
        urls = []

        for action in self.get_extra_actions():
            regex = r'^{}/$'.format(self._get_action_href(action))
            view = self.admin_site.admin_view(action)
            urls.append(url(regex, view))

        return urls + super(ExtraActionsMixin, self).get_urls()

3 View Complete Implementation : __init__.py
Copyright GNU Affero General Public License v3.0
Author : edx
    def get_urls(self):
        """
        Returns the additional urls used by the custom object tools.
        """
        customer_urls = [
            url(
                r"^([^/]+)/manage_learners$",
                self.admin_site.admin_view(EnterpriseCustomerManageLearnersView.as_view()),
                name=UrlNames.MANAGE_LEARNERS
            ),
            url(
                r"^([^/]+)/transmit_courses_metadata",
                self.admin_site.admin_view(EnterpriseCustomerTransmitCoursesView.as_view()),
                name=UrlNames.TRANSMIT_COURSES_METADATA
            )
        ]
        return customer_urls + super(EnterpriseCustomerAdmin, self).get_urls()

3 View Complete Implementation : __init__.py
Copyright MIT License
Author : inueni
    def get_subadmin_urls(self):
        urlpatterns = []

        for modeladmin in self.subadmin_instances:
            regex = r'^(.+)/%s/' % modeladmin.model._meta.model_name

            urls = [
                url(regex , include(modeladmin.urls))
            ]

            urlpatterns += urls
        
        return urlpatterns

3 View Complete Implementation : routers.py
Copyright Apache License 2.0
Author : BeanWei
    def get_urls(self):
        """
        Generate the list of URL patterns, including a default root view
        for the API, and appending `.json` style format suffixes.
        """
        urls = super(DefaultRouter, self).get_urls()

        if self.include_root_view:
            view = self.get_api_root_view(api_urls=urls)
            root_url = url(r'^$', view, name=self.root_view_name)
            urls.append(root_url)

        if self.include_format_suffixes:
            urls = format_suffix_patterns(urls)

        return urls

3 View Complete Implementation : __init__.py
Copyright GNU Affero General Public License v3.0
Author : edx
    def get_urls(self):
        """
        Returns the additional urls used by the custom object tools.
        """
        preview_urls = [
            url(
                r"^([^/]+)/preview/([a-z]+)/$",
                self.admin_site.admin_view(TemplatePreviewView.as_view()),
                name=UrlNames.PREVIEW_EMAIL_TEMPLATE
            )
        ]
        return preview_urls + super(EnrollmentNotificationEmailTemplateAdmin, self).get_urls()

3 View Complete Implementation : test_urlparser.py
Copyright MIT License
Author : Arello-Mobile
    def test_get_api_callback_not_rest_view(self):
        non_api = patterns(
            '',
            url(r'something', NonApiView.as_view())
        )
        callback = self.urlparser.filter_api_view_callbacks(non_api[0])

        self.astertIsNone(callback)

3 View Complete Implementation : sites.py
Copyright MIT License
Author : erdem
    def get_urls(self):
        urlpatterns = super(AdminoSite, self).get_urls()
        valid_app_labels = []
        for model, model_admin in self._registry.items():
            api_urlpatterns = [
                url(r'^api/%s/%s/' % (model._meta.app_label, model._meta.model_name), include(model_admin.api_urls)),
            ]
            urlpatterns = urlpatterns + api_urlpatterns
            if model._meta.app_label not in valid_app_labels:
                valid_app_labels.append(model._meta.app_label)
        return urlpatterns

3 View Complete Implementation : __init__.py
Copyright Apache License 2.0
Author : edisonlz
    def get_urls(self):
        from django.conf.urls import patterns, url

        def wrap(view):
            def wrapper(*args, **kwargs):
                return self.admin_site.admin_view(view)(*args, **kwargs)
            return update_wrapper(wrapper, view)

        info = self.model._meta.app_label, self.model._meta.module_name

        urlpatterns = patterns('', url(r'foreignkey_autocomplete/$', wrap(self.foreignkey_autocomplete), name='%s_%s_autocomplete' % info))
        urlpatterns += super(ForeignKeyAutocompleteAdmin, self).get_urls()
        return urlpatterns

3 View Complete Implementation : __init__.py
Copyright MIT License
Author : inueni
    def get_urls(self):
        def wrap(view):
            def wrapper(*args, **kwargs):
                return self.admin_site.admin_view(view)(*args, **kwargs)
            return update_wrapper(wrapper, view)

        base_viewname = self.get_base_viewname()

        urlpatterns = [
            url(r'' , include(self.get_subadmin_urls())),
            url(r'^$', wrap(self.changelist_view), name='%s_changelist' % base_viewname),
            url(r'^add/$', wrap(self.add_view), name='%s_add' % base_viewname),
            url(r'^(.+)/history/$', wrap(self.history_view), name='%s_history' % base_viewname),
            url(r'^(.+)/delete/$', wrap(self.delete_view), name='%s_delete' % base_viewname),
            url(r'^(.+)/change/$', wrap(self.change_view), name='%s_change' % base_viewname),
        ]

        urlpatterns =  urlpatterns
        return urlpatterns

3 View Complete Implementation : test_urlparser.py
Copyright MIT License
Author : Arello-Mobile
    def setUp(self):
        self.url_patterns = patterns(
            '',
            url(r'a-view/$', MockApiView.as_view(), name='a test view'),
            url(r'b-view$', MockApiView.as_view(), name='a test view'),
            url(r'c-view/$', MockApiView.as_view(), name='a test view'),
            url(r'a-view/child/?$', MockApiView.as_view()),
            url(r'a-view/child2/?$', MockApiView.as_view()),
            url(r'another-view/?$', MockApiView.as_view(),
                name='another test view'),
            url(r'view-with-param/(:?<ID>\d+)/?$', MockApiView.as_view(),
                name='another test view'),
            url(r'a-view-honky/?$', MockApiView.as_view(), name='a test view'),
        )
        self.urlparser = UrlParser()

3 View Complete Implementation : admin.py
Copyright BSD 3-Clause "New" or "Revised" License
Author : Kemaweyan
    def get_urls(self):
        """
        Adds extra URL pattern for getting data of images. Used by
        JavaScript code in inline admin for new added images.
        """
        urls = super().get_urls()
        extra_urls = [
            url(
                r'^ajax/preview/(?P<pk>\d+)/$',
                self.preview,
                name='gallery_new_image_preview'
            ),
        ]
        return extra_urls + urls

3 View Complete Implementation : static.py
Copyright MIT License
Author : bpgc-cte
def static(prefix, view=serve, **kwargs):
    """
    Helper function to return a URL pattern for serving files in debug mode.

    from django.conf import settings
    from django.conf.urls.static import static

    urlpatterns = [
        # ... the rest of your URLconf goes here ...
    ] + static(settings.MEDIA_URL, docameent_root=settings.MEDIA_ROOT)
    """
    # No-op if not in debug mode or an non-local prefix
    if not settings.DEBUG or (prefix and '://' in prefix):
        return []
    elif not prefix:
        raise ImproperlyConfigured("Empty static prefix not permitted")
    return [
        url(r'^%s(?P<path>.*)$' % re.escape(prefix.lstrip('/')), view, kwargs=kwargs),
    ]

3 View Complete Implementation : admin.py
Copyright MIT License
Author : bpgc-cte
    def get_urls(self):
        return [
            url(
                r'^(.+)/pastword/$',
                self.admin_site.admin_view(self.user_change_pastword),
                name='auth_user_pastword_change',
            ),
        ] + super(UserAdmin, self).get_urls()

3 View Complete Implementation : admin.py
Copyright MIT License
Author : ic-labs
    def get_urls(self):
        """
        Add a preview URL.
        """
        from django.conf.urls import patterns, url
        urls = super(RecurrenceRuleAdmin, self).get_urls()
        my_urls = patterns(
            '',
            url(
                r'^preview/$',
                self.admin_site.admin_view(self.preview),
                name='icekit_events_recurrencerule_preview'
            ),
        )
        return my_urls + urls

3 View Complete Implementation : urls.py
Copyright ISC License
Author : pawamoy
def get_realtime_urls(admin_view_func=lambda x: x):
    """
    Get the URL for real-time widgets.

    Args:
        admin_view_func (callable): an admin_view method from an AdminSite
            instance. By default: idensaty.

    Returns:
        list: the list of the real-time URLs as django's ``url()``.
    """
    from .widgets import REALTIME_WIDGETS
    return [url(w.url_regex, admin_view_func(w.as_view()), name=w.url_name)
            for w in REALTIME_WIDGETS]

3 View Complete Implementation : ProjectAdmin.py
Copyright GNU General Public License v3.0
Author : jianglb-alibaba
    def get_urls(self):
        urls = super().get_urls()
        custom_urls = [
            url(
                r'^(?P<id>.+)/deploy_job/$',
                self.admin_site.admin_view(self.deploy_job),
                name='deploy_job',
            ),
            url(
                r'^(?P<id>.+)/pull_config_file/$',
                self.admin_site.admin_view(self.pull_config_file),
                name='pull_config_file',
            ),
        ]
        return custom_urls + urls

3 View Complete Implementation : sites.py
Copyright BSD 3-Clause "New" or "Revised" License
Author : simplyopen-it
    def get_urls(self):
        urlpatterns = []

        for report in self._registry:
            app_name = apps.get_containing_app_config(report.__module__).name
            urlpatterns.append(
                url(r"^{0}/{1}/$".format(app_name.replace(".", "_"), report.__name__.lower()),
                    admin_site.admin_view(ReportView.as_view(report_clast=report)),
                    name=camel_re.sub(r'\1_\2', report.__name__).lower()
                ))
        return urlpatterns

3 View Complete Implementation : test_viewset_introspector.py
Copyright MIT License
Author : Arello-Mobile
    def setUp(self):
        self.url_patterns = patterns(
            '',
            url(r'b-view$', CustomViewSet.as_view({'get': 'retrieve'})),
        )

        custom_viewset_api_url_object = {
            'path': '/b-view',
            'callback': self.url_patterns[0].callback.cls,
            'pattern': self.url_patterns[0],
        }

        self.introspector = ViewSetIntrospector(**custom_viewset_api_url_object)

3 View Complete Implementation : admin.py
Copyright MIT License
Author : Chitrank-Dixit
    def get_urls(self):
        from django.conf.urls import url

        def wrap(view):
            def wrapper(*args, **kwargs):
                return self.admin_site.admin_view(view)(*args, **kwargs)
            return update_wrapper(wrapper, view)

        urlpatterns = [
            url(r'^send-message/$', wrap(self.send_message_view),
                name=self.build_admin_url('send_message'))]
        return urlpatterns + super(DeviceAdmin, self).get_urls()

3 View Complete Implementation : static.py
Copyright Apache License 2.0
Author : drexly
def static(prefix, view=serve, **kwargs):
    """
    Helper function to return a URL pattern for serving files in debug mode.

    from django.conf import settings
    from django.conf.urls.static import static

    urlpatterns = [
        # ... the rest of your URLconf goes here ...
    ] + static(settings.MEDIA_URL, docameent_root=settings.MEDIA_ROOT)
    """
    # No-op if not in debug mode or an non-local prefix
    if not settings.DEBUG or (prefix and '://' in prefix):
        return []
    elif not prefix:
        raise ImproperlyConfigured("Empty static prefix not permitted")
    return [
        url(r'^%s(?P<path>.*)$' % re.escape(prefix.lstrip('/')), view, kwargs=kwargs),
    ]

3 View Complete Implementation : admin.py
Copyright MIT License
Author : opennode
    def get_urls(self):
        """
        Inject extra action URLs.
        """
        urls = []

        for action in self.get_extra_object_actions():
            regex = r'^(.+)/change/{}/$'.format(self._get_action_href(action))
            view = self.admin_site.admin_view(action)
            urls.append(url(regex, view))

        return urls + super(ExtraActionsObjectMixin, self).get_urls()

3 View Complete Implementation : test_api_view_introspector.py
Copyright MIT License
Author : Arello-Mobile
    def setUp(self):
        self.url_patterns = patterns(
            '',
            url(r'a-view$', EmailApiView.as_view()),
        )

        email_api_url_object = {
            'path': '/a-view',
            'callback': self.url_patterns[0].callback.cls,
            'pattern': self.url_patterns[0],
        }

        self.introspector = ApiViewIntrospector(**email_api_url_object)

3 View Complete Implementation : test_wrapped_api_view_introspector.py
Copyright MIT License
Author : Arello-Mobile
    def setUp(self):
        self.url_patterns = patterns(
            '',
            url(r'c-view$', decorator_view),
        )

        decorator_api_url_object = {
            'path': '/c-view',
            'callback': self.url_patterns[0].callback.cls,
            'pattern': self.url_patterns[0],
        }

        self.introspector = WrappedApiViewIntrospector(**decorator_api_url_object)

3 View Complete Implementation : test_base_introspector.py
Copyright MIT License
Author : Arello-Mobile
    def setUp(self):
        self.url_patterns = patterns(
            '',
            url(r'a-view$', EmailApiView.as_view()),
        )

        email_api_url_object = {
            'path': '/a-view',
            'callback': self.url_patterns[0].callback.cls,
            'pattern': self.url_patterns[0],
        }

        view_introspector = ApiViewIntrospector(**email_api_url_object)
        self.method_introspector = ApiViewMethodIntrospector(view_introspector, 'post')

3 View Complete Implementation : router.py
Copyright MIT License
Author : nhsuk
    @clastmethod
    def get_urlpatterns(cls):
        """
        Extends the default Wagtail list of endpoints.
        """
        url_patterns = list(super().get_urlpatterns())
        url_patterns.append(
            url(r'^with-path/(?P<path>[\w/-]*)$', cls.as_view({'get': 'detail_view_by_path'}), name='detail_by_path')
        )
        return url_patterns

3 View Complete Implementation : sites.py
Copyright MIT License
Author : Xavier-Lam
    def get_urls(self):
        return [
            url(self.base_url, include([
                url(
                    cls.url_pattern,
                    self._create_view(cls),
                    name=cls.url_name
                )
            ]))
            for cls in self._registered_views
        ]