mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-23 20:31:32 +08:00
fifth iteration
This commit is contained in:
@@ -9,10 +9,7 @@ class UpdateCacheMiddleware(MiddlewareMixin):
|
||||
cache_timeout: float = ...
|
||||
key_prefix: str = ...
|
||||
cache_alias: str = ...
|
||||
cache: Union[
|
||||
django.core.cache.DefaultCacheProxy,
|
||||
django.core.cache.backends.base.BaseCache,
|
||||
] = ...
|
||||
cache: django.core.cache.backends.base.BaseCache = ...
|
||||
get_response: Optional[Callable] = ...
|
||||
def __init__(self, get_response: Optional[Callable] = ...) -> None: ...
|
||||
def process_response(
|
||||
@@ -22,10 +19,7 @@ class UpdateCacheMiddleware(MiddlewareMixin):
|
||||
class FetchFromCacheMiddleware(MiddlewareMixin):
|
||||
key_prefix: str = ...
|
||||
cache_alias: str = ...
|
||||
cache: Union[
|
||||
django.core.cache.DefaultCacheProxy,
|
||||
django.core.cache.backends.base.BaseCache,
|
||||
] = ...
|
||||
cache: django.core.cache.backends.base.BaseCache = ...
|
||||
get_response: Optional[Callable] = ...
|
||||
def __init__(self, get_response: Optional[Callable] = ...) -> None: ...
|
||||
def process_request(
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
from typing import Any, Callable, Dict, Optional, Tuple, Type, Union
|
||||
from typing import Any, Callable, Dict, Optional, Tuple
|
||||
|
||||
from django.contrib.sitemaps import Sitemap
|
||||
from django.core.exceptions import PermissionDenied, SuspiciousOperation
|
||||
from django.http.multipartparser import MultiPartParserError
|
||||
from django.http.request import HttpRequest
|
||||
from django.http.response import (Http404, HttpResponseBase,
|
||||
HttpResponseForbidden)
|
||||
from django.http.response import HttpResponseBase, HttpResponseForbidden
|
||||
from django.utils.deprecation import MiddlewareMixin
|
||||
|
||||
logger: Any
|
||||
@@ -31,17 +27,7 @@ class CsrfViewMiddleware(MiddlewareMixin):
|
||||
request: HttpRequest,
|
||||
callback: Callable,
|
||||
callback_args: Tuple,
|
||||
callback_kwargs: Union[
|
||||
Dict[str, Dict[str, Sitemap]],
|
||||
Dict[str, Dict[str, str]],
|
||||
Dict[str, None],
|
||||
Dict[str, Union[Dict[str, Type[Sitemap]], str]],
|
||||
Dict[str, Union[int, str]],
|
||||
Dict[str, PermissionDenied],
|
||||
Dict[str, SuspiciousOperation],
|
||||
Dict[str, MultiPartParserError],
|
||||
Dict[str, Http404],
|
||||
],
|
||||
callback_kwargs: Dict[str, Any],
|
||||
) -> Optional[HttpResponseForbidden]: ...
|
||||
def process_response(
|
||||
self, request: HttpRequest, response: HttpResponseBase
|
||||
|
||||
Reference in New Issue
Block a user