mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-09 13:35:01 +08:00
move generated stubs to separate directory, too messty
This commit is contained in:
46
django-stubs-generated/contrib/sitemaps/__init__.pyi
Normal file
46
django-stubs-generated/contrib/sitemaps/__init__.pyi
Normal file
@@ -0,0 +1,46 @@
|
||||
from datetime import datetime
|
||||
from typing import Any, Dict, List, Optional, Union
|
||||
|
||||
from django.contrib.sites.models import Site
|
||||
from django.contrib.sites.requests import RequestSite
|
||||
from django.core.paginator import Paginator
|
||||
from django.db.models.base import Model
|
||||
from django.db.models.query import QuerySet
|
||||
|
||||
PING_URL: str
|
||||
|
||||
class SitemapNotFound(Exception): ...
|
||||
|
||||
def ping_google(sitemap_url: None = ..., ping_url: str = ...) -> None: ...
|
||||
|
||||
class Sitemap:
|
||||
limit: int = ...
|
||||
protocol: Any = ...
|
||||
def items(self) -> List[Any]: ...
|
||||
def location(self, obj: Model) -> str: ...
|
||||
@property
|
||||
def paginator(self) -> Paginator: ...
|
||||
def get_urls(
|
||||
self,
|
||||
page: Union[int, str] = ...,
|
||||
site: Optional[Union[Site, RequestSite]] = ...,
|
||||
protocol: Optional[str] = ...,
|
||||
) -> List[Dict[str, Optional[Union[datetime, Model, str]]]]: ...
|
||||
|
||||
class GenericSitemap(Sitemap):
|
||||
priority: None = ...
|
||||
changefreq: None = ...
|
||||
queryset: django.db.models.query.QuerySet = ...
|
||||
date_field: None = ...
|
||||
protocol: None = ...
|
||||
def __init__(
|
||||
self,
|
||||
info_dict: Dict[str, Union[datetime, QuerySet, str]],
|
||||
priority: Optional[float] = ...,
|
||||
changefreq: Optional[str] = ...,
|
||||
protocol: Optional[str] = ...,
|
||||
) -> None: ...
|
||||
def items(self) -> QuerySet: ...
|
||||
def lastmod(self, item: Model) -> Optional[datetime]: ...
|
||||
|
||||
default_app_config: str
|
||||
@@ -0,0 +1,12 @@
|
||||
from typing import Any, Optional
|
||||
|
||||
from django.core.management.base import BaseCommand, CommandParser
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
stderr: django.core.management.base.OutputWrapper
|
||||
stdout: django.core.management.base.OutputWrapper
|
||||
style: django.core.management.color.Style
|
||||
help: str = ...
|
||||
def add_arguments(self, parser: CommandParser) -> None: ...
|
||||
def handle(self, *args: Any, **options: Any) -> None: ...
|
||||
25
django-stubs-generated/contrib/sitemaps/views.pyi
Normal file
25
django-stubs-generated/contrib/sitemaps/views.pyi
Normal file
@@ -0,0 +1,25 @@
|
||||
from collections import OrderedDict
|
||||
from typing import Any, Callable, Dict, Optional, Type, Union
|
||||
|
||||
from django.contrib.sitemaps import GenericSitemap, Sitemap
|
||||
from django.core.handlers.wsgi import WSGIRequest
|
||||
from django.template.response import TemplateResponse
|
||||
|
||||
|
||||
def x_robots_tag(func: Callable) -> Callable: ...
|
||||
def index(
|
||||
request: WSGIRequest,
|
||||
sitemaps: Dict[str, Union[Type[Sitemap], Sitemap]],
|
||||
template_name: str = ...,
|
||||
content_type: str = ...,
|
||||
sitemap_url_name: str = ...,
|
||||
) -> TemplateResponse: ...
|
||||
def sitemap(
|
||||
request: WSGIRequest,
|
||||
sitemaps: Union[
|
||||
Dict[str, Type[Sitemap]], Dict[str, GenericSitemap], OrderedDict
|
||||
],
|
||||
section: Optional[str] = ...,
|
||||
template_name: str = ...,
|
||||
content_type: str = ...,
|
||||
) -> TemplateResponse: ...
|
||||
Reference in New Issue
Block a user