mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-08 21:14:49 +08:00
more cleanups: http
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
from typing import Any, Dict, Iterator, List, Optional, Tuple, Union
|
from typing import Any, Dict, Iterator, List, Optional, Tuple, Union, Callable
|
||||||
|
|
||||||
|
from django.contrib.sessions.backends.db import SessionStore
|
||||||
from django.core.handlers.wsgi import WSGIRequest
|
from django.core.handlers.wsgi import WSGIRequest
|
||||||
from django.utils.datastructures import MultiValueDict
|
from django.utils.datastructures import MultiValueDict
|
||||||
|
|
||||||
@@ -15,12 +16,12 @@ class HttpRequest:
|
|||||||
csrf_processing_done: bool
|
csrf_processing_done: bool
|
||||||
get_host: Callable
|
get_host: Callable
|
||||||
sensitive_post_parameters: str
|
sensitive_post_parameters: str
|
||||||
session: django.contrib.sessions.backends.db.SessionStore
|
session: SessionStore
|
||||||
GET: Union[Dict[str, str], django.http.request.QueryDict] = ...
|
GET: Union[Dict[str, str], QueryDict] = ...
|
||||||
POST: Union[Dict[str, str], django.http.request.QueryDict] = ...
|
POST: Union[Dict[str, str], QueryDict] = ...
|
||||||
COOKIES: Dict[str, str] = ...
|
COOKIES: Dict[str, str] = ...
|
||||||
META: Dict[str, Union[int, str]] = ...
|
META: Dict[str, Union[int, str]] = ...
|
||||||
FILES: django.utils.datastructures.MultiValueDict = ...
|
FILES: MultiValueDict = ...
|
||||||
path: str = ...
|
path: str = ...
|
||||||
path_info: str = ...
|
path_info: str = ...
|
||||||
method: Optional[str] = ...
|
method: Optional[str] = ...
|
||||||
|
|||||||
@@ -287,15 +287,7 @@ class JsonResponse(HttpResponse):
|
|||||||
wsgi_request: django.core.handlers.wsgi.WSGIRequest
|
wsgi_request: django.core.handlers.wsgi.WSGIRequest
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
data: Union[
|
data: Any,
|
||||||
Dict[str, Dict[str, str]],
|
|
||||||
Dict[str, int],
|
|
||||||
Dict[str, str],
|
|
||||||
List[int],
|
|
||||||
List[str],
|
|
||||||
str,
|
|
||||||
UUID,
|
|
||||||
],
|
|
||||||
encoder: Type[DjangoJSONEncoder] = ...,
|
encoder: Type[DjangoJSONEncoder] = ...,
|
||||||
safe: bool = ...,
|
safe: bool = ...,
|
||||||
json_dumps_params: Optional[Dict[str, int]] = ...,
|
json_dumps_params: Optional[Dict[str, int]] = ...,
|
||||||
|
|||||||
Reference in New Issue
Block a user