mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-09 05:24:53 +08:00
first version finished
This commit is contained in:
54
django/views/generic/list.pyi
Normal file
54
django/views/generic/list.pyi
Normal file
@@ -0,0 +1,54 @@
|
||||
from django.core.handlers.wsgi import WSGIRequest
|
||||
from django.core.paginator import (
|
||||
Page,
|
||||
Paginator,
|
||||
)
|
||||
from django.db.models.query import QuerySet
|
||||
from django.template.response import TemplateResponse
|
||||
from typing import (
|
||||
Any,
|
||||
Dict,
|
||||
List,
|
||||
Optional,
|
||||
Tuple,
|
||||
Union,
|
||||
)
|
||||
|
||||
|
||||
class BaseListView:
|
||||
def get(
|
||||
self,
|
||||
request: WSGIRequest,
|
||||
*args,
|
||||
**kwargs
|
||||
) -> TemplateResponse: ...
|
||||
|
||||
|
||||
class MultipleObjectMixin:
|
||||
def get_allow_empty(self) -> bool: ...
|
||||
def get_context_data(self, *, object_list = ..., **kwargs) -> Dict[str, Any]: ...
|
||||
def get_context_object_name(
|
||||
self,
|
||||
object_list: Optional[Union[QuerySet, List[Dict[str, str]]]]
|
||||
) -> Optional[str]: ...
|
||||
def get_ordering(self) -> None: ...
|
||||
def get_paginate_by(self, queryset: Union[QuerySet, List[Dict[str, str]]]) -> Optional[int]: ...
|
||||
def get_paginate_orphans(self) -> int: ...
|
||||
def get_paginator(
|
||||
self,
|
||||
queryset: QuerySet,
|
||||
per_page: int,
|
||||
orphans: int = ...,
|
||||
allow_empty_first_page: bool = ...,
|
||||
**kwargs
|
||||
) -> Paginator: ...
|
||||
def get_queryset(self) -> Union[QuerySet, List[Dict[str, str]]]: ...
|
||||
def paginate_queryset(
|
||||
self,
|
||||
queryset: QuerySet,
|
||||
page_size: int
|
||||
) -> Tuple[Paginator, Page, QuerySet, bool]: ...
|
||||
|
||||
|
||||
class MultipleObjectTemplateResponseMixin:
|
||||
def get_template_names(self) -> List[str]: ...
|
||||
Reference in New Issue
Block a user