Files
django-stubs/django-stubs/views/decorators/http.pyi
2020-10-26 00:01:36 +03:00

13 lines
586 B
Python

from typing import Any, Callable, List, Optional, TypeVar
_F = TypeVar("_F", bound=Callable[..., Any])
def conditional_page(_F) -> _F: ...
def require_http_methods(request_method_list: List[str]) -> Callable[[_F], _F]: ...
def require_GET(_F) -> _F: ...
def require_POST(_F) -> _F: ...
def require_safe(_F) -> _F: ...
def condition(etag_func: Optional[Callable] = ..., last_modified_func: Optional[Callable] = ...) -> Callable: ...
def etag(etag_func: Callable[..., Any]) -> Callable[[_F], _F]: ...
def last_modified(last_modified_func: Callable[..., Any]) -> Callable[[_F], _F]: ...