Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions django-stubs/views/decorators/csrf.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,15 @@ from typing import Any, Callable, TypeVar

from django.middleware.csrf import CsrfViewMiddleware

csrf_protect: Any
csrf_protect: Callable[[_F], _F]

class _EnsureCsrfToken(CsrfViewMiddleware): ...

requires_csrf_token: Any
requires_csrf_token: Callable[[_F], _F]

class _EnsureCsrfCookie(CsrfViewMiddleware):
get_response: None
def process_view(self, request: Any, callback: Any, callback_args: Any, callback_kwargs: Any): ...
class _EnsureCsrfCookie(CsrfViewMiddleware): ...

ensure_csrf_cookie: Any
ensure_csrf_cookie: Callable[[_F], _F]

_F = TypeVar("_F", bound=Callable[..., Any])

Expand Down