mirror of
https://github.com/davidhalter/django-stubs.git
synced 2026-09-21 03:03:18 +08:00
merge with stubgen output
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
# Stubs for django.views.decorators.cache (Python 3.6)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from typing import Any, Optional
|
||||
|
||||
from typing import Callable
|
||||
|
||||
|
||||
def cache_page(timeout: float, *, cache = ..., key_prefix = ...) -> Callable: ...
|
||||
|
||||
|
||||
def never_cache(view_func: Callable) -> Callable: ...
|
||||
def cache_page(timeout: float, *, cache: Optional[Any] = ..., key_prefix: Optional[Any] = ...) -> Callable: ...
|
||||
def cache_control(**kwargs: Any): ...
|
||||
def never_cache(view_func: Callable) -> Callable: ...
|
||||
|
||||
@@ -1,25 +1,23 @@
|
||||
from django.http.request import HttpRequest
|
||||
from typing import (
|
||||
Any,
|
||||
Callable,
|
||||
Dict,
|
||||
Tuple,
|
||||
)
|
||||
# Stubs for django.views.decorators.csrf (Python 3.6)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from django.middleware.csrf import CsrfViewMiddleware
|
||||
from typing import Any
|
||||
|
||||
from django.http.request import HttpRequest
|
||||
from typing import Any, Callable, Dict, Tuple
|
||||
csrf_protect: Any
|
||||
|
||||
class _EnsureCsrfToken(CsrfViewMiddleware):
|
||||
def _reject(self, request: HttpRequest, reason: str) -> None: ...
|
||||
|
||||
requires_csrf_token: Any
|
||||
|
||||
class _EnsureCsrfCookie(CsrfViewMiddleware):
|
||||
def _reject(self, request: HttpRequest, reason: str) -> None: ...
|
||||
def process_view(self, request: HttpRequest, callback: Callable, callback_args: Tuple, callback_kwargs: Dict[Any, Any]) -> None: ...
|
||||
|
||||
ensure_csrf_cookie: Any
|
||||
|
||||
def csrf_exempt(view_func: Callable) -> Callable: ...
|
||||
|
||||
|
||||
class _EnsureCsrfCookie:
|
||||
def _reject(self, request: HttpRequest, reason: str) -> None: ...
|
||||
def process_view(
|
||||
self,
|
||||
request: HttpRequest,
|
||||
callback: Callable,
|
||||
callback_args: Tuple,
|
||||
callback_kwargs: Dict[Any, Any]
|
||||
) -> None: ...
|
||||
|
||||
|
||||
class _EnsureCsrfToken:
|
||||
def _reject(self, request: HttpRequest, reason: str) -> None: ...
|
||||
@@ -1,7 +1,9 @@
|
||||
# Stubs for django.views.decorators.debug (Python 3.6)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from typing import Any
|
||||
|
||||
from typing import Callable
|
||||
|
||||
|
||||
def sensitive_post_parameters(*parameters) -> Callable: ...
|
||||
|
||||
|
||||
def sensitive_variables(*variables) -> Callable: ...
|
||||
def sensitive_variables(*variables: Any) -> Callable: ...
|
||||
def sensitive_post_parameters(*parameters: Any) -> Callable: ...
|
||||
|
||||
@@ -1,13 +1,18 @@
|
||||
from typing import (
|
||||
Callable,
|
||||
List,
|
||||
)
|
||||
# Stubs for django.views.decorators.http (Python 3.6)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from typing import Any, Optional
|
||||
|
||||
from typing import Callable, List
|
||||
conditional_page: Any
|
||||
|
||||
def require_http_methods(request_method_list: List[str]) -> Callable: ...
|
||||
|
||||
require_GET: Any
|
||||
require_POST: Any
|
||||
require_safe: Any
|
||||
|
||||
def condition(etag_func: Callable = ..., last_modified_func: None = ...) -> Callable: ...
|
||||
|
||||
|
||||
def etag(etag_func: Callable) -> Callable: ...
|
||||
|
||||
|
||||
def require_http_methods(request_method_list: List[str]) -> Callable: ...
|
||||
def last_modified(last_modified_func: Any): ...
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
# Stubs for django.views.decorators.vary (Python 3.6)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from typing import Any
|
||||
|
||||
from typing import Callable
|
||||
|
||||
|
||||
def vary_on_headers(*headers: Any) -> Callable: ...
|
||||
def vary_on_cookie(func: Callable) -> Callable: ...
|
||||
|
||||
|
||||
def vary_on_headers(*headers) -> Callable: ...
|
||||
Reference in New Issue
Block a user