# Copyright © 2024 Contrast Security, Inc.
# See https://www.contrastsecurity.com/enduser-terms-0317a for more details.
from contrast.utils.deprecated_middleware import deprecated_asgi
from contrast.patches.middleware.django import initialize_django

ASGIMiddleware = deprecated_asgi("django")


class DjangoASGIMiddleware(ASGIMiddleware):
    def __init__(self, *args, **kwargs):
        initialize_django()
        super().__init__(*args, **kwargs)
