Skip to content

Commit

Permalink
Update middlewares.py
Browse files Browse the repository at this point in the history
  • Loading branch information
baseplate-admin committed Oct 13, 2024
1 parent 5adc95b commit ca4ef35
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions ninja_put_patch_file_upload_middleware/middlewares.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
from collections.abc import Callable
from typing import Any, Union

import sys
from asgiref.sync import iscoroutinefunction, sync_to_async
from django.http import HttpRequest, HttpResponse
from django.utils.decorators import sync_and_async_middleware
from typing import Any

if sys.version_info >= (3, 9):
from collections.abc import Callable
else:
from typing import Callable

if sys.version_info >= (3, 10):
from typing import Union
else:
from typing_extensions import Union


@sync_and_async_middleware
Expand Down

0 comments on commit ca4ef35

Please sign in to comment.