from rest_framework_nested.routers import NestedSimpleRouter


class RouterDeleteMixin:
    """
    Adds DELETE call to viewset's root url
    """

    def get_routes(self, viewset):
        routes = super().get_routes(viewset)
        if hasattr(viewset, 'delete'):
            routes[0].mapping['delete'] = 'delete'
        return routes


class ExtendedNestedRouter(RouterDeleteMixin, NestedSimpleRouter):
    pass

015863e9349554b547272d95155928e5a4fc87b1
<mask token>


class RouterDeleteMixin:
    <mask token>
    <mask token>


class ExtendedNestedRouter(RouterDeleteMixin, NestedSimpleRouter):
    pass

<mask token>


class RouterDeleteMixin:
    <mask token>

    def get_routes(self, viewset):
        routes = super().get_routes(viewset)
        if hasattr(viewset, 'delete'):
            routes[0].mapping['delete'] = 'delete'
        return routes


class ExtendedNestedRouter(RouterDeleteMixin, NestedSimpleRouter):
    pass

<mask token>


class RouterDeleteMixin:
    """
    Adds DELETE call to viewset's root url
    """

    def get_routes(self, viewset):
        routes = super().get_routes(viewset)
        if hasattr(viewset, 'delete'):
            routes[0].mapping['delete'] = 'delete'
        return routes


class ExtendedNestedRouter(RouterDeleteMixin, NestedSimpleRouter):
    pass

from rest_framework_nested.routers import NestedSimpleRouter


class RouterDeleteMixin:
    """
    Adds DELETE call to viewset's root url
    """

    def get_routes(self, viewset):
        routes = super().get_routes(viewset)
        if hasattr(viewset, 'delete'):
            routes[0].mapping['delete'] = 'delete'
        return routes


class ExtendedNestedRouter(RouterDeleteMixin, NestedSimpleRouter):
    pass
