fifth iteration

This commit is contained in:
Maxim Kurnikov
2018-08-14 12:01:01 +03:00
parent 8cc446150c
commit a13d4c352a
124 changed files with 1455 additions and 5681 deletions

View File

@@ -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(

View File

@@ -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