mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-07 20:54:29 +08:00
fix *args, **kwargs for views.generic.base
This commit is contained in:
@@ -1,48 +1,44 @@
|
||||
from typing import Any, Callable, Dict, List, Optional, Tuple, Type
|
||||
from typing import Any, Callable, Dict, List, Optional, Type
|
||||
|
||||
from django import http
|
||||
|
||||
logger = ... # type: Any
|
||||
|
||||
class ContextMixin:
|
||||
def get_context_data(self, **kwargs: object) -> Dict[str, Any]: ...
|
||||
def get_context_data(self, **kwargs: Any) -> Dict[str, Any]: ...
|
||||
|
||||
class View:
|
||||
http_method_names = ... # type: List[str]
|
||||
request = ... # type: http.HttpRequest
|
||||
args = ... # type: Tuple[object, ...]
|
||||
kwargs = ... # type: Dict[str, object]
|
||||
def __init__(self, **kwargs: object) -> None: ...
|
||||
http_method_names: List[str] = ...
|
||||
request: http.HttpRequest = ...
|
||||
args: Any = ...
|
||||
kwargs: Any = ...
|
||||
def __init__(self, **kwargs: Any) -> None: ...
|
||||
@classmethod
|
||||
def as_view(cls: Any, **initkwargs: object) -> Callable[..., http.HttpResponse]: ...
|
||||
def dispatch(self, request: http.HttpRequest, *args: object, **kwargs: object) -> http.HttpResponse: ...
|
||||
def http_method_not_allowed(
|
||||
self, request: http.HttpRequest, *args: object, **kwargs: object
|
||||
) -> http.HttpResponse: ...
|
||||
def options(self, request: http.HttpRequest, *args: object, **kwargs: object) -> http.HttpResponse: ...
|
||||
def as_view(cls: Any, **initkwargs: Any) -> Callable[..., http.HttpResponse]: ...
|
||||
def dispatch(self, request: http.HttpRequest, *args: Any, **kwargs: Any) -> http.HttpResponse: ...
|
||||
def http_method_not_allowed(self, request: http.HttpRequest, *args: Any, **kwargs: Any) -> http.HttpResponse: ...
|
||||
def options(self, request: http.HttpRequest, *args: Any, **kwargs: Any) -> http.HttpResponse: ...
|
||||
|
||||
class TemplateResponseMixin:
|
||||
template_name = ... # type: str
|
||||
template_engine = ... # type: Optional[str]
|
||||
response_class = ... # type: Type[http.HttpResponse]
|
||||
content_type = ... # type: Optional[str]
|
||||
request = ... # type: http.HttpRequest
|
||||
def render_to_response(self, context: Dict[str, object], **response_kwargs: object) -> http.HttpResponse: ...
|
||||
template_name: str = ...
|
||||
template_engine: Optional[str] = ...
|
||||
response_class: Type[http.HttpResponse] = ...
|
||||
content_type: Optional[str] = ...
|
||||
request: http.HttpRequest = ...
|
||||
def render_to_response(self, context: Dict[str, Any], **response_kwargs: Any) -> http.HttpResponse: ...
|
||||
def get_template_names(self) -> List[str]: ...
|
||||
|
||||
class TemplateView(TemplateResponseMixin, ContextMixin, View):
|
||||
def get(self, request: http.HttpRequest, *args: object, **kwargs: object) -> http.HttpResponse: ...
|
||||
def get(self, request: http.HttpRequest, *args: Any, **kwargs: Any) -> http.HttpResponse: ...
|
||||
|
||||
class RedirectView(View):
|
||||
permanent = ... # type: bool
|
||||
url = ... # type: Optional[str]
|
||||
pattern_name = ... # type: Optional[str]
|
||||
query_string = ... # type: bool
|
||||
def get_redirect_url(self, *args: object, **kwargs: object) -> Optional[str]: ...
|
||||
def get(self, request: http.HttpRequest, *args: object, **kwargs: object) -> http.HttpResponse: ...
|
||||
def head(self, request: http.HttpRequest, *args: object, **kwargs: object) -> http.HttpResponse: ...
|
||||
def post(self, request: http.HttpRequest, *args: object, **kwargs: object) -> http.HttpResponse: ...
|
||||
def options(self, request: http.HttpRequest, *args: object, **kwargs: object) -> http.HttpResponse: ...
|
||||
def delete(self, request: http.HttpRequest, *args: object, **kwargs: object) -> http.HttpResponse: ...
|
||||
def put(self, request: http.HttpRequest, *args: object, **kwargs: object) -> http.HttpResponse: ...
|
||||
def patch(self, request: http.HttpRequest, *args: object, **kwargs: object) -> http.HttpResponse: ...
|
||||
permanent: bool = ...
|
||||
url: Optional[str] = ...
|
||||
pattern_name: Optional[str] = ...
|
||||
query_string: bool = ...
|
||||
def get_redirect_url(self, *args: Any, **kwargs: Any) -> Optional[str]: ...
|
||||
def get(self, request: http.HttpRequest, *args: Any, **kwargs: Any) -> http.HttpResponse: ...
|
||||
def head(self, request: http.HttpRequest, *args: Any, **kwargs: Any) -> http.HttpResponse: ...
|
||||
def post(self, request: http.HttpRequest, *args: Any, **kwargs: Any) -> http.HttpResponse: ...
|
||||
def options(self, request: http.HttpRequest, *args: Any, **kwargs: Any) -> http.HttpResponse: ...
|
||||
def delete(self, request: http.HttpRequest, *args: Any, **kwargs: Any) -> http.HttpResponse: ...
|
||||
def put(self, request: http.HttpRequest, *args: Any, **kwargs: Any) -> http.HttpResponse: ...
|
||||
def patch(self, request: http.HttpRequest, *args: Any, **kwargs: Any) -> http.HttpResponse: ...
|
||||
|
||||
Reference in New Issue
Block a user