mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-08 21:14:49 +08:00
move most of the generated files
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
from typing import Any, Optional
|
from typing import Any
|
||||||
|
|
||||||
VERSION: Any
|
VERSION: Any
|
||||||
|
|
||||||
|
|||||||
@@ -1,34 +0,0 @@
|
|||||||
from typing import Any, List, Optional, Union, Dict
|
|
||||||
|
|
||||||
from django.utils.functional import LazyObject
|
|
||||||
|
|
||||||
ENVIRONMENT_VARIABLE: str
|
|
||||||
|
|
||||||
class LazySettings(LazyObject):
|
|
||||||
def __getattr__(self, name: str) -> Any: ...
|
|
||||||
def __setattr__(self, name: str, value: Any) -> None: ...
|
|
||||||
def __delattr__(self, name: str) -> None: ...
|
|
||||||
def configure(self, default_settings: Any = ..., **options: Any) -> Any: ...
|
|
||||||
@property
|
|
||||||
def configured(self) -> bool: ...
|
|
||||||
|
|
||||||
class Settings:
|
|
||||||
FORCE_SCRIPT_NAME: None
|
|
||||||
INSTALLED_APPS: List[Any]
|
|
||||||
LOGGING: Dict[Any, Any]
|
|
||||||
LOGGING_CONFIG: str
|
|
||||||
SETTINGS_MODULE: Any = ...
|
|
||||||
def __init__(self, settings_module: str) -> None: ...
|
|
||||||
def is_overridden(self, setting: str) -> bool: ...
|
|
||||||
|
|
||||||
class UserSettingsHolder:
|
|
||||||
SETTINGS_MODULE: Any = ...
|
|
||||||
default_settings: django.conf.Settings = ...
|
|
||||||
def __init__(self, default_settings: Union[Settings, UserSettingsHolder]) -> None: ...
|
|
||||||
def __getattr__(self, name: str) -> Any: ...
|
|
||||||
def __setattr__(self, name: str, value: Any) -> None: ...
|
|
||||||
def __delattr__(self, name: str) -> None: ...
|
|
||||||
def __dir__(self) -> List[str]: ...
|
|
||||||
def is_overridden(self, setting: str) -> bool: ...
|
|
||||||
|
|
||||||
settings: Any
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
from collections import OrderedDict
|
|
||||||
from typing import Any, Callable, Dict, List, Optional, Tuple, Type, Union
|
|
||||||
|
|
||||||
from django.contrib.flatpages.sitemaps import FlatPageSitemap
|
|
||||||
from django.contrib.sitemaps import Sitemap
|
|
||||||
from django.urls import include as include
|
|
||||||
from django.urls.resolvers import URLPattern, URLResolver
|
|
||||||
|
|
||||||
handler400: Any
|
|
||||||
handler403: Any
|
|
||||||
handler404: Any
|
|
||||||
handler500: Any
|
|
||||||
|
|
||||||
def url(
|
|
||||||
regex: str,
|
|
||||||
view: Optional[
|
|
||||||
Union[
|
|
||||||
Callable,
|
|
||||||
Tuple[List[Union[URLPattern, URLResolver]], str, str],
|
|
||||||
Tuple[Union[List[URLPattern], List[URLResolver]], None, None],
|
|
||||||
]
|
|
||||||
],
|
|
||||||
kwargs: Optional[
|
|
||||||
Union[
|
|
||||||
Dict[str, Dict[str, Type[FlatPageSitemap]]],
|
|
||||||
Dict[str, Dict[str, Sitemap]],
|
|
||||||
Dict[str, OrderedDict],
|
|
||||||
Dict[str, str],
|
|
||||||
]
|
|
||||||
] = ...,
|
|
||||||
name: Optional[str] = ...,
|
|
||||||
) -> Union[URLPattern, URLResolver]: ...
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
from typing import Any, List, Tuple, Union
|
|
||||||
|
|
||||||
from django.urls.resolvers import URLPattern, URLResolver
|
|
||||||
|
|
||||||
def i18n_patterns(
|
|
||||||
*urls: Any, prefix_default_language: bool = ...
|
|
||||||
) -> Union[List[List[Any]], List[URLPattern], List[URLResolver]]: ...
|
|
||||||
def is_language_prefix_patterns_used(urlconf: str) -> Tuple[bool, bool]: ...
|
|
||||||
|
|
||||||
urlpatterns: Any
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
from typing import Any, Callable, List
|
|
||||||
|
|
||||||
from django.urls.resolvers import URLPattern
|
|
||||||
|
|
||||||
def static(prefix: str, view: Callable = ..., **kwargs: Any) -> List[URLPattern]: ...
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
from typing import Optional
|
|
||||||
|
|
||||||
from django.contrib.admin.decorators import register as register
|
|
||||||
from django.contrib.admin.filters import AllValuesFieldListFilter as AllValuesFieldListFilter
|
|
||||||
from django.contrib.admin.filters import BooleanFieldListFilter as BooleanFieldListFilter
|
|
||||||
from django.contrib.admin.filters import ChoicesFieldListFilter as ChoicesFieldListFilter
|
|
||||||
from django.contrib.admin.filters import DateFieldListFilter as DateFieldListFilter
|
|
||||||
from django.contrib.admin.filters import FieldListFilter as FieldListFilter
|
|
||||||
from django.contrib.admin.filters import ListFilter as ListFilter
|
|
||||||
from django.contrib.admin.filters import RelatedFieldListFilter as RelatedFieldListFilter
|
|
||||||
from django.contrib.admin.filters import RelatedOnlyFieldListFilter as RelatedOnlyFieldListFilter
|
|
||||||
from django.contrib.admin.filters import SimpleListFilter as SimpleListFilter
|
|
||||||
from django.contrib.admin.helpers import ACTION_CHECKBOX_NAME as ACTION_CHECKBOX_NAME
|
|
||||||
from django.contrib.admin.options import HORIZONTAL as HORIZONTAL
|
|
||||||
from django.contrib.admin.options import VERTICAL as VERTICAL
|
|
||||||
from django.contrib.admin.options import ModelAdmin as ModelAdmin
|
|
||||||
from django.contrib.admin.options import StackedInline as StackedInline
|
|
||||||
from django.contrib.admin.options import TabularInline as TabularInline
|
|
||||||
from django.contrib.admin.sites import AdminSite as AdminSite
|
|
||||||
from django.contrib.admin.sites import site as site
|
|
||||||
|
|
||||||
def autodiscover() -> None: ...
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
from typing import Any, Optional
|
|
||||||
|
|
||||||
from django.core.management.base import BaseCommand, CommandParser
|
|
||||||
|
|
||||||
UserModel: Any
|
|
||||||
|
|
||||||
class Command(BaseCommand):
|
|
||||||
stderr: django.core.management.base.OutputWrapper
|
|
||||||
stdout: django.core.management.base.OutputWrapper
|
|
||||||
style: django.core.management.color.Style
|
|
||||||
help: str = ...
|
|
||||||
requires_migrations_checks: bool = ...
|
|
||||||
requires_system_checks: bool = ...
|
|
||||||
def add_arguments(self, parser: CommandParser) -> None: ...
|
|
||||||
def handle(self, *args: Any, **options: Any) -> str: ...
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
from typing import Any, Optional, Union
|
|
||||||
|
|
||||||
from django.core.management.base import BaseCommand, CommandParser
|
|
||||||
from django.db.models.fields import Field
|
|
||||||
|
|
||||||
class NotRunningInTTYException(Exception): ...
|
|
||||||
|
|
||||||
class Command(BaseCommand):
|
|
||||||
stderr: django.core.management.base.OutputWrapper
|
|
||||||
stdout: django.core.management.base.OutputWrapper
|
|
||||||
style: django.core.management.color.Style
|
|
||||||
help: str = ...
|
|
||||||
requires_migrations_checks: bool = ...
|
|
||||||
stealth_options: Any = ...
|
|
||||||
UserModel: Any = ...
|
|
||||||
username_field: Any = ...
|
|
||||||
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
|
|
||||||
def add_arguments(self, parser: CommandParser) -> None: ...
|
|
||||||
stdin: Any = ...
|
|
||||||
def execute(self, *args: Any, **options: Any) -> None: ...
|
|
||||||
def handle(self, *args: Any, **options: Any) -> None: ...
|
|
||||||
def get_input_data(self, field: Field, message: str, default: Optional[str] = ...) -> Optional[Union[int, str]]: ...
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
from .array import * # NOQA
|
|
||||||
from .jsonb import * # NOQA
|
|
||||||
from .ranges import * # NOQA
|
|
||||||
@@ -1,83 +0,0 @@
|
|||||||
from typing import Any, Dict, List, Optional, Tuple, Union, TypeVar, Type, Generic
|
|
||||||
|
|
||||||
from django.contrib.postgres import lookups
|
|
||||||
from django.db.models import Field, Transform
|
|
||||||
from django.db.models.fields import Field
|
|
||||||
from django.db.models.lookups import Exact, In
|
|
||||||
|
|
||||||
from .mixins import CheckFieldDefaultMixin
|
|
||||||
|
|
||||||
_T = TypeVar("_T", bound=Field)
|
|
||||||
|
|
||||||
class ArrayField(CheckFieldDefaultMixin, Field, Generic[_T]):
|
|
||||||
empty_strings_allowed: bool = ...
|
|
||||||
default_error_messages: Any = ...
|
|
||||||
base_field: Any = ...
|
|
||||||
size: Any = ...
|
|
||||||
default_validators: Any = ...
|
|
||||||
from_db_value: Any = ...
|
|
||||||
def __init__(self, base_field: Field, size: None = ..., **kwargs: Any) -> None: ...
|
|
||||||
@property
|
|
||||||
def model(self): ...
|
|
||||||
@model.setter
|
|
||||||
def model(self, model: Any) -> None: ...
|
|
||||||
def check(self, **kwargs: Any) -> List[Any]: ...
|
|
||||||
def set_attributes_from_name(self, name: str) -> None: ...
|
|
||||||
@property
|
|
||||||
def description(self): ...
|
|
||||||
def db_type(self, connection: Any): ...
|
|
||||||
def get_db_prep_value(self, value: Any, connection: Any, prepared: bool = ...): ...
|
|
||||||
def deconstruct(self) -> Tuple[None, str, List[Any], Dict[str, Optional[Union[bool, Field]]]]: ...
|
|
||||||
def to_python(self, value: Any): ...
|
|
||||||
def value_to_string(self, obj: Any): ...
|
|
||||||
def get_transform(self, name: Any): ...
|
|
||||||
def validate(self, value: Any, model_instance: Any) -> None: ...
|
|
||||||
def run_validators(self, value: Any) -> None: ...
|
|
||||||
def formfield(self, **kwargs: Any): ...
|
|
||||||
def __get__(self, instance, owner) -> List[_T]: ...
|
|
||||||
|
|
||||||
class ArrayContains(lookups.DataContains):
|
|
||||||
def as_sql(self, qn: Any, connection: Any): ...
|
|
||||||
|
|
||||||
class ArrayContainedBy(lookups.ContainedBy):
|
|
||||||
def as_sql(self, qn: Any, connection: Any): ...
|
|
||||||
|
|
||||||
class ArrayExact(Exact):
|
|
||||||
def as_sql(self, qn: Any, connection: Any): ...
|
|
||||||
|
|
||||||
class ArrayOverlap(lookups.Overlap):
|
|
||||||
def as_sql(self, qn: Any, connection: Any): ...
|
|
||||||
|
|
||||||
class ArrayLenTransform(Transform):
|
|
||||||
lookup_name: str = ...
|
|
||||||
output_field: Any = ...
|
|
||||||
def as_sql(self, compiler: Any, connection: Any): ...
|
|
||||||
|
|
||||||
class ArrayInLookup(In):
|
|
||||||
def get_prep_lookup(self): ...
|
|
||||||
|
|
||||||
class IndexTransform(Transform):
|
|
||||||
index: Any = ...
|
|
||||||
base_field: Any = ...
|
|
||||||
def __init__(self, index: Any, base_field: Any, *args: Any, **kwargs: Any) -> None: ...
|
|
||||||
def as_sql(self, compiler: Any, connection: Any): ...
|
|
||||||
@property
|
|
||||||
def output_field(self): ...
|
|
||||||
|
|
||||||
class IndexTransformFactory:
|
|
||||||
index: Any = ...
|
|
||||||
base_field: Any = ...
|
|
||||||
def __init__(self, index: Any, base_field: Any) -> None: ...
|
|
||||||
def __call__(self, *args: Any, **kwargs: Any): ...
|
|
||||||
|
|
||||||
class SliceTransform(Transform):
|
|
||||||
start: Any = ...
|
|
||||||
end: Any = ...
|
|
||||||
def __init__(self, start: Any, end: Any, *args: Any, **kwargs: Any) -> None: ...
|
|
||||||
def as_sql(self, compiler: Any, connection: Any): ...
|
|
||||||
|
|
||||||
class SliceTransformFactory:
|
|
||||||
start: Any = ...
|
|
||||||
end: Any = ...
|
|
||||||
def __init__(self, start: Any, end: Any) -> None: ...
|
|
||||||
def __call__(self, *args: Any, **kwargs: Any): ...
|
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
from typing import Any, Dict, List, Optional, Tuple, Type, Union
|
|
||||||
|
|
||||||
from psycopg2.extras import Json
|
|
||||||
|
|
||||||
from django.core.serializers.json import DjangoJSONEncoder
|
|
||||||
from django.db.models import Field, Transform
|
|
||||||
from django.db.models import lookups as builtin_lookups
|
|
||||||
|
|
||||||
from .mixins import CheckFieldDefaultMixin
|
|
||||||
|
|
||||||
class JsonAdapter(Json):
|
|
||||||
encoder: Any = ...
|
|
||||||
def __init__(self, adapted: Any, dumps: Optional[Any] = ..., encoder: Optional[Any] = ...) -> None: ...
|
|
||||||
def dumps(self, obj: Any): ...
|
|
||||||
|
|
||||||
class JSONField(CheckFieldDefaultMixin, Field):
|
|
||||||
empty_strings_allowed: bool = ...
|
|
||||||
description: Any = ...
|
|
||||||
default_error_messages: Any = ...
|
|
||||||
encoder: Any = ...
|
|
||||||
def __init__(
|
|
||||||
self,
|
|
||||||
verbose_name: None = ...,
|
|
||||||
name: None = ...,
|
|
||||||
encoder: Optional[Type[DjangoJSONEncoder]] = ...,
|
|
||||||
**kwargs: Any
|
|
||||||
) -> None: ...
|
|
||||||
def db_type(self, connection: Any): ...
|
|
||||||
def deconstruct(self) -> Tuple[None, str, List[Any], Dict[str, Union[Type[DjangoJSONEncoder], bool]]]: ...
|
|
||||||
def get_transform(self, name: Any): ...
|
|
||||||
def get_prep_value(self, value: Any): ...
|
|
||||||
def validate(self, value: Any, model_instance: Any) -> None: ...
|
|
||||||
def value_to_string(self, obj: Any): ...
|
|
||||||
def formfield(self, **kwargs: Any): ...
|
|
||||||
|
|
||||||
class KeyTransform(Transform):
|
|
||||||
operator: str = ...
|
|
||||||
nested_operator: str = ...
|
|
||||||
key_name: Any = ...
|
|
||||||
def __init__(self, key_name: Any, *args: Any, **kwargs: Any) -> None: ...
|
|
||||||
def as_sql(self, compiler: Any, connection: Any): ...
|
|
||||||
|
|
||||||
class KeyTextTransform(KeyTransform):
|
|
||||||
operator: str = ...
|
|
||||||
nested_operator: str = ...
|
|
||||||
output_field: Any = ...
|
|
||||||
|
|
||||||
class KeyTransformTextLookupMixin:
|
|
||||||
def __init__(self, key_transform: Any, *args: Any, **kwargs: Any) -> None: ...
|
|
||||||
|
|
||||||
class KeyTransformIExact(KeyTransformTextLookupMixin, builtin_lookups.IExact): ...
|
|
||||||
class KeyTransformIContains(KeyTransformTextLookupMixin, builtin_lookups.IContains): ...
|
|
||||||
class KeyTransformStartsWith(KeyTransformTextLookupMixin, builtin_lookups.StartsWith): ...
|
|
||||||
class KeyTransformIStartsWith(KeyTransformTextLookupMixin, builtin_lookups.IStartsWith): ...
|
|
||||||
class KeyTransformEndsWith(KeyTransformTextLookupMixin, builtin_lookups.EndsWith): ...
|
|
||||||
class KeyTransformIEndsWith(KeyTransformTextLookupMixin, builtin_lookups.IEndsWith): ...
|
|
||||||
class KeyTransformRegex(KeyTransformTextLookupMixin, builtin_lookups.Regex): ...
|
|
||||||
class KeyTransformIRegex(KeyTransformTextLookupMixin, builtin_lookups.IRegex): ...
|
|
||||||
|
|
||||||
class KeyTransformFactory:
|
|
||||||
key_name: Any = ...
|
|
||||||
def __init__(self, key_name: Any) -> None: ...
|
|
||||||
def __call__(self, *args: Any, **kwargs: Any): ...
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
from typing import Any, List, Optional
|
|
||||||
|
|
||||||
class CheckFieldDefaultMixin:
|
|
||||||
def check(self, **kwargs: Any) -> List[Any]: ...
|
|
||||||
@@ -1,97 +0,0 @@
|
|||||||
from typing import Any, Optional
|
|
||||||
|
|
||||||
from django.contrib.postgres import lookups
|
|
||||||
from django.db import models
|
|
||||||
|
|
||||||
class RangeField(models.Field):
|
|
||||||
empty_strings_allowed: bool = ...
|
|
||||||
base_field: Any = ...
|
|
||||||
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
|
|
||||||
@property
|
|
||||||
def model(self): ...
|
|
||||||
@model.setter
|
|
||||||
def model(self, model: Any) -> None: ...
|
|
||||||
def get_prep_value(self, value: Any): ...
|
|
||||||
def to_python(self, value: Any): ...
|
|
||||||
def set_attributes_from_name(self, name: str) -> None: ...
|
|
||||||
def value_to_string(self, obj: Any): ...
|
|
||||||
def formfield(self, **kwargs: Any): ...
|
|
||||||
|
|
||||||
class IntegerRangeField(RangeField):
|
|
||||||
base_field: Any = ...
|
|
||||||
range_type: Any = ...
|
|
||||||
form_field: Any = ...
|
|
||||||
def db_type(self, connection: Any): ...
|
|
||||||
|
|
||||||
class BigIntegerRangeField(RangeField):
|
|
||||||
base_field: Any = ...
|
|
||||||
range_type: Any = ...
|
|
||||||
form_field: Any = ...
|
|
||||||
def db_type(self, connection: Any): ...
|
|
||||||
|
|
||||||
class FloatRangeField(RangeField):
|
|
||||||
base_field: Any = ...
|
|
||||||
range_type: Any = ...
|
|
||||||
form_field: Any = ...
|
|
||||||
def db_type(self, connection: Any): ...
|
|
||||||
|
|
||||||
class DateTimeRangeField(RangeField):
|
|
||||||
base_field: Any = ...
|
|
||||||
range_type: Any = ...
|
|
||||||
form_field: Any = ...
|
|
||||||
def db_type(self, connection: Any): ...
|
|
||||||
|
|
||||||
class DateRangeField(RangeField):
|
|
||||||
base_field: Any = ...
|
|
||||||
range_type: Any = ...
|
|
||||||
form_field: Any = ...
|
|
||||||
def db_type(self, connection: Any): ...
|
|
||||||
|
|
||||||
class DateTimeRangeContains(models.Lookup):
|
|
||||||
lookup_name: str = ...
|
|
||||||
rhs: Any = ...
|
|
||||||
def process_rhs(self, compiler: Any, connection: Any): ...
|
|
||||||
def as_sql(self, compiler: Any, connection: Any): ...
|
|
||||||
|
|
||||||
class RangeContainedBy(models.Lookup):
|
|
||||||
lookup_name: str = ...
|
|
||||||
type_mapping: Any = ...
|
|
||||||
def as_sql(self, qn: Any, connection: Any): ...
|
|
||||||
def get_prep_lookup(self): ...
|
|
||||||
|
|
||||||
class FullyLessThan(lookups.PostgresSimpleLookup):
|
|
||||||
lookup_name: str = ...
|
|
||||||
operator: str = ...
|
|
||||||
|
|
||||||
class FullGreaterThan(lookups.PostgresSimpleLookup):
|
|
||||||
lookup_name: str = ...
|
|
||||||
operator: str = ...
|
|
||||||
|
|
||||||
class NotLessThan(lookups.PostgresSimpleLookup):
|
|
||||||
lookup_name: str = ...
|
|
||||||
operator: str = ...
|
|
||||||
|
|
||||||
class NotGreaterThan(lookups.PostgresSimpleLookup):
|
|
||||||
lookup_name: str = ...
|
|
||||||
operator: str = ...
|
|
||||||
|
|
||||||
class AdjacentToLookup(lookups.PostgresSimpleLookup):
|
|
||||||
lookup_name: str = ...
|
|
||||||
operator: str = ...
|
|
||||||
|
|
||||||
class RangeStartsWith(models.Transform):
|
|
||||||
lookup_name: str = ...
|
|
||||||
function: str = ...
|
|
||||||
@property
|
|
||||||
def output_field(self): ...
|
|
||||||
|
|
||||||
class RangeEndsWith(models.Transform):
|
|
||||||
lookup_name: str = ...
|
|
||||||
function: str = ...
|
|
||||||
@property
|
|
||||||
def output_field(self): ...
|
|
||||||
|
|
||||||
class IsEmpty(models.Transform):
|
|
||||||
lookup_name: str = ...
|
|
||||||
function: str = ...
|
|
||||||
output_field: Any = ...
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
from typing import Any, Optional
|
|
||||||
|
|
||||||
from django.db.backends.sqlite3.schema import DatabaseSchemaEditor
|
|
||||||
from django.db.migrations.operations.base import Operation
|
|
||||||
from django.db.migrations.state import ProjectState
|
|
||||||
|
|
||||||
class CreateExtension(Operation):
|
|
||||||
reversible: bool = ...
|
|
||||||
name: Any = ...
|
|
||||||
def __init__(self, name: str) -> None: ...
|
|
||||||
def state_forwards(self, app_label: str, state: ProjectState) -> None: ...
|
|
||||||
def database_forwards(
|
|
||||||
self, app_label: str, schema_editor: DatabaseSchemaEditor, from_state: ProjectState, to_state: ProjectState
|
|
||||||
) -> None: ...
|
|
||||||
def database_backwards(self, app_label: Any, schema_editor: Any, from_state: Any, to_state: Any) -> None: ...
|
|
||||||
def describe(self): ...
|
|
||||||
|
|
||||||
class BtreeGinExtension(CreateExtension):
|
|
||||||
name: str = ...
|
|
||||||
def __init__(self) -> None: ...
|
|
||||||
|
|
||||||
class BtreeGistExtension(CreateExtension):
|
|
||||||
name: str = ...
|
|
||||||
def __init__(self) -> None: ...
|
|
||||||
|
|
||||||
class CITextExtension(CreateExtension):
|
|
||||||
name: str = ...
|
|
||||||
def __init__(self) -> None: ...
|
|
||||||
|
|
||||||
class CryptoExtension(CreateExtension):
|
|
||||||
name: str = ...
|
|
||||||
def __init__(self) -> None: ...
|
|
||||||
|
|
||||||
class HStoreExtension(CreateExtension):
|
|
||||||
name: str = ...
|
|
||||||
def __init__(self) -> None: ...
|
|
||||||
|
|
||||||
class TrigramExtension(CreateExtension):
|
|
||||||
name: str = ...
|
|
||||||
def __init__(self) -> None: ...
|
|
||||||
|
|
||||||
class UnaccentExtension(CreateExtension):
|
|
||||||
name: str = ...
|
|
||||||
def __init__(self) -> None: ...
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
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: ...
|
|
||||||
@@ -1,82 +0,0 @@
|
|||||||
from datetime import time
|
|
||||||
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
||||||
|
|
||||||
from django.template.backends.base import BaseEngine
|
|
||||||
from django.template.backends.django import Template
|
|
||||||
from django.template.backends.jinja2 import Template
|
|
||||||
|
|
||||||
ROOT: Any
|
|
||||||
|
|
||||||
def get_default_renderer() -> DjangoTemplates: ...
|
|
||||||
|
|
||||||
class BaseRenderer:
|
|
||||||
def get_template(self, template_name: str) -> Any: ...
|
|
||||||
def render(
|
|
||||||
self,
|
|
||||||
template_name: str,
|
|
||||||
context: Dict[
|
|
||||||
str,
|
|
||||||
Union[
|
|
||||||
Dict[
|
|
||||||
str,
|
|
||||||
Optional[
|
|
||||||
Union[Dict[str, bool], List[Dict[str, Optional[Union[Dict[str, str], bool, str]]]], bool, str]
|
|
||||||
],
|
|
||||||
],
|
|
||||||
Dict[
|
|
||||||
str,
|
|
||||||
Union[
|
|
||||||
Dict[str, Union[bool, str]],
|
|
||||||
List[
|
|
||||||
Dict[
|
|
||||||
str,
|
|
||||||
Union[
|
|
||||||
Dict[str, Union[bool, str]],
|
|
||||||
List[Tuple[None, List[Dict[str, Union[Dict[str, bool], bool, str]]], int]],
|
|
||||||
List[str],
|
|
||||||
bool,
|
|
||||||
str,
|
|
||||||
],
|
|
||||||
]
|
|
||||||
],
|
|
||||||
List[str],
|
|
||||||
bool,
|
|
||||||
str,
|
|
||||||
],
|
|
||||||
],
|
|
||||||
Dict[
|
|
||||||
str,
|
|
||||||
Union[
|
|
||||||
Dict[str, Union[int, str]],
|
|
||||||
List[
|
|
||||||
Tuple[
|
|
||||||
Optional[str], List[Dict[str, Union[Dict[str, Union[bool, str]], time, int, str]]], int
|
|
||||||
]
|
|
||||||
],
|
|
||||||
List[str],
|
|
||||||
int,
|
|
||||||
str,
|
|
||||||
],
|
|
||||||
],
|
|
||||||
Dict[
|
|
||||||
str, Union[Dict[str, str], List[Dict[str, Union[Dict[str, str], bool, str]]], List[int], bool, str]
|
|
||||||
],
|
|
||||||
],
|
|
||||||
],
|
|
||||||
request: None = ...,
|
|
||||||
) -> str: ...
|
|
||||||
|
|
||||||
class EngineMixin:
|
|
||||||
def get_template(self, template_name: str) -> Union[Template, Template]: ...
|
|
||||||
def engine(self) -> BaseEngine: ...
|
|
||||||
|
|
||||||
class DjangoTemplates(EngineMixin, BaseRenderer):
|
|
||||||
engine: django.template.backends.django.DjangoTemplates
|
|
||||||
backend: Any = ...
|
|
||||||
|
|
||||||
class Jinja2(EngineMixin, BaseRenderer):
|
|
||||||
engine: django.template.backends.jinja2.Jinja2
|
|
||||||
backend: Any = ...
|
|
||||||
|
|
||||||
class TemplatesSetting(BaseRenderer):
|
|
||||||
def get_template(self, template_name: str) -> Template: ...
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
from typing import Any, Callable, Dict, List, Optional, Type, Union
|
|
||||||
|
|
||||||
from django.db.models.base import Model
|
|
||||||
from django.db.models.manager import Manager
|
|
||||||
from django.db.models.query import QuerySet
|
|
||||||
from django.http import HttpRequest
|
|
||||||
from django.http.response import HttpResponse, HttpResponseRedirect
|
|
||||||
|
|
||||||
def render_to_response(
|
|
||||||
template_name: Union[List[str], str],
|
|
||||||
context: Optional[Dict[str, str]] = ...,
|
|
||||||
content_type: Optional[str] = ...,
|
|
||||||
status: Optional[int] = ...,
|
|
||||||
using: Optional[str] = ...,
|
|
||||||
) -> HttpResponse: ...
|
|
||||||
def render(
|
|
||||||
request: HttpRequest,
|
|
||||||
template_name: Union[List[str], str],
|
|
||||||
context: Optional[Dict[str, bool]] = ...,
|
|
||||||
content_type: Optional[str] = ...,
|
|
||||||
status: Optional[int] = ...,
|
|
||||||
using: Optional[str] = ...,
|
|
||||||
) -> HttpResponse: ...
|
|
||||||
def redirect(to: Union[Callable, str], *args: Any, permanent: bool = ..., **kwargs: Any) -> HttpResponseRedirect: ...
|
|
||||||
def get_object_or_404(klass: Union[Type[Model], Manager, QuerySet, str], *args: Any, **kwargs: Any) -> Model: ...
|
|
||||||
def get_list_or_404(klass: Union[List[Type[Model]], Manager, QuerySet], *args: Any, **kwargs: Any) -> List[Model]: ...
|
|
||||||
def resolve_url(to: Union[Callable, Model, str], *args: Any, **kwargs: Any) -> str: ...
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
from typing import Any, Optional, Tuple, Union
|
|
||||||
|
|
||||||
BASE2_ALPHABET: str
|
|
||||||
BASE16_ALPHABET: str
|
|
||||||
BASE56_ALPHABET: str
|
|
||||||
BASE36_ALPHABET: str
|
|
||||||
BASE62_ALPHABET: str
|
|
||||||
BASE64_ALPHABET: Any
|
|
||||||
|
|
||||||
class BaseConverter:
|
|
||||||
decimal_digits: str = ...
|
|
||||||
sign: str = ...
|
|
||||||
digits: str = ...
|
|
||||||
def __init__(self, digits: str, sign: str = ...) -> None: ...
|
|
||||||
def encode(self, i: int) -> str: ...
|
|
||||||
def decode(self, s: str) -> int: ...
|
|
||||||
def convert(self, number: Union[int, str], from_digits: str, to_digits: str, sign: str) -> Tuple[int, str]: ...
|
|
||||||
|
|
||||||
base2: Any
|
|
||||||
base16: Any
|
|
||||||
base36: Any
|
|
||||||
base56: Any
|
|
||||||
base62: Any
|
|
||||||
base64: Any
|
|
||||||
@@ -1,104 +0,0 @@
|
|||||||
from collections import OrderedDict
|
|
||||||
from datetime import datetime
|
|
||||||
from typing import Any, Callable, Dict, Iterator, List, Optional, Tuple, Type, Union
|
|
||||||
from unittest.case import TestCase
|
|
||||||
from uuid import UUID
|
|
||||||
|
|
||||||
from django.contrib.sitemaps import GenericSitemap
|
|
||||||
from django.core.files.uploadedfile import InMemoryUploadedFile, UploadedFile
|
|
||||||
from django.db.models.base import Model
|
|
||||||
from django.db.models.expressions import Combinable
|
|
||||||
from django.test.testcases import SerializeMixin
|
|
||||||
from django.test.utils import LoggingCaptureMixin
|
|
||||||
from django.urls.converters import IntConverter, StringConverter
|
|
||||||
|
|
||||||
class OrderedSet:
|
|
||||||
dict: collections.OrderedDict = ...
|
|
||||||
def __init__(
|
|
||||||
self,
|
|
||||||
iterable: Optional[
|
|
||||||
Union[
|
|
||||||
List[Tuple[str, str]], List[datetime], List[Combinable], List[int], List[str], List[UUID], OrderedDict
|
|
||||||
]
|
|
||||||
] = ...,
|
|
||||||
) -> None: ...
|
|
||||||
def add(self, item: Union[Type[Model], SerializeMixin, LoggingCaptureMixin, int, TestCase]) -> None: ...
|
|
||||||
def remove(self, item: Any) -> None: ...
|
|
||||||
def discard(self, item: Any) -> None: ...
|
|
||||||
def __iter__(self): ...
|
|
||||||
def __contains__(self, item: Any): ...
|
|
||||||
def __bool__(self) -> bool: ...
|
|
||||||
def __len__(self) -> int: ...
|
|
||||||
|
|
||||||
class MultiValueDictKeyError(KeyError): ...
|
|
||||||
|
|
||||||
class MultiValueDict(dict):
|
|
||||||
def __init__(
|
|
||||||
self,
|
|
||||||
key_to_list_mapping: Union[
|
|
||||||
Dict[str, List[List[Any]]],
|
|
||||||
Dict[str, List[int]],
|
|
||||||
Dict[str, List[str]],
|
|
||||||
List[Tuple[str, Union[List[List[Any]], List[str]]]],
|
|
||||||
Tuple,
|
|
||||||
] = ...,
|
|
||||||
) -> None: ...
|
|
||||||
def __getitem__(self, key: str) -> Optional[Union[List[str], UploadedFile, str]]: ...
|
|
||||||
def __setitem__(self, key: str, value: Optional[Union[int, str]]) -> None: ...
|
|
||||||
def __copy__(self) -> MultiValueDict: ...
|
|
||||||
def __deepcopy__(self, memo: Any): ...
|
|
||||||
def get(
|
|
||||||
self, key: str, default: Optional[Union[int, str]] = ...
|
|
||||||
) -> Optional[Union[InMemoryUploadedFile, int, str]]: ...
|
|
||||||
def getlist(self, key: Optional[Union[Callable, str]], default: Any = ...) -> Any: ...
|
|
||||||
def setlist(self, key: Union[Callable, str], list_: List[str]) -> None: ...
|
|
||||||
def setdefault(self, key: str, default: str = ...) -> str: ...
|
|
||||||
def setlistdefault(
|
|
||||||
self, key: Union[Callable, str], default_list: None = ...
|
|
||||||
) -> Union[
|
|
||||||
List[Tuple[List[Tuple[str, List[str]]], str, Dict[str, str], Dict[Any, Any]]], List[UploadedFile], List[str]
|
|
||||||
]: ...
|
|
||||||
def appendlist(
|
|
||||||
self,
|
|
||||||
key: Union[Callable, str],
|
|
||||||
value: Union[
|
|
||||||
Tuple[
|
|
||||||
List[Tuple[str, List[str]]],
|
|
||||||
str,
|
|
||||||
Dict[str, Dict[str, GenericSitemap]],
|
|
||||||
Dict[str, Union[IntConverter, StringConverter]],
|
|
||||||
],
|
|
||||||
UploadedFile,
|
|
||||||
str,
|
|
||||||
],
|
|
||||||
) -> None: ...
|
|
||||||
def items(self) -> Iterator[Tuple[str, InMemoryUploadedFile]]: ...
|
|
||||||
def lists(self): ...
|
|
||||||
def values(self) -> Iterator[str]: ...
|
|
||||||
def copy(self) -> MultiValueDict: ...
|
|
||||||
def update(self, *args: Any, **kwargs: Any) -> None: ...
|
|
||||||
def dict(self) -> Dict[str, str]: ...
|
|
||||||
|
|
||||||
class ImmutableList(tuple):
|
|
||||||
warning: str = ...
|
|
||||||
def __new__(cls: Type[ImmutableList], *args: Any, warning: str = ..., **kwargs: Any) -> ImmutableList: ...
|
|
||||||
def complain(self, *wargs: Any, **kwargs: Any) -> Any: ...
|
|
||||||
__delitem__: Any = ...
|
|
||||||
__delslice__: Any = ...
|
|
||||||
__iadd__: Any = ...
|
|
||||||
__imul__: Any = ...
|
|
||||||
__setitem__: Any = ...
|
|
||||||
__setslice__: Any = ...
|
|
||||||
append: Any = ...
|
|
||||||
extend: Any = ...
|
|
||||||
insert: Any = ...
|
|
||||||
pop: Any = ...
|
|
||||||
remove: Any = ...
|
|
||||||
sort: Any = ...
|
|
||||||
reverse: Any = ...
|
|
||||||
|
|
||||||
class DictWrapper(dict):
|
|
||||||
func: Callable = ...
|
|
||||||
prefix: str = ...
|
|
||||||
def __init__(self, data: Dict[str, str], func: Callable, prefix: str) -> None: ...
|
|
||||||
def __getitem__(self, key: str) -> Optional[Union[int, str]]: ...
|
|
||||||
@@ -1,54 +0,0 @@
|
|||||||
from typing import Any, Callable, Dict, List, Optional, Tuple, Type, Union
|
|
||||||
|
|
||||||
from django.db.models.base import Model
|
|
||||||
|
|
||||||
def curry(_curried_func: Any, *args: Any, **kwargs: Any): ...
|
|
||||||
|
|
||||||
class cached_property:
|
|
||||||
func: Callable = ...
|
|
||||||
__doc__: Any = ...
|
|
||||||
name: str = ...
|
|
||||||
def __init__(self, func: Callable, name: Optional[str] = ...) -> None: ...
|
|
||||||
def __get__(self, instance: Any, cls: Type[Any] = ...) -> Any: ...
|
|
||||||
|
|
||||||
class Promise: ...
|
|
||||||
|
|
||||||
def lazy(func: Union[Callable, Type[str]], *resultclasses: Any) -> Callable: ...
|
|
||||||
def lazystr(text: Any): ...
|
|
||||||
def keep_lazy(*resultclasses: Any) -> Callable: ...
|
|
||||||
def keep_lazy_text(func: Callable) -> Callable: ...
|
|
||||||
|
|
||||||
empty: Any
|
|
||||||
|
|
||||||
def new_method_proxy(func: Any): ...
|
|
||||||
|
|
||||||
class LazyObject:
|
|
||||||
def __init__(self) -> None: ...
|
|
||||||
__getattr__: Any = ...
|
|
||||||
def __setattr__(self, name: str, value: Any) -> None: ...
|
|
||||||
def __delattr__(self, name: str) -> None: ...
|
|
||||||
def __reduce__(self) -> Tuple[Callable, Tuple[Model]]: ...
|
|
||||||
def __copy__(self): ...
|
|
||||||
def __deepcopy__(self, memo: Any): ...
|
|
||||||
__bytes__: Any = ...
|
|
||||||
__bool__: Any = ...
|
|
||||||
__dir__: Any = ...
|
|
||||||
__class__: Any = ...
|
|
||||||
__eq__: Any = ...
|
|
||||||
__ne__: Any = ...
|
|
||||||
__hash__: Any = ...
|
|
||||||
__getitem__: Any = ...
|
|
||||||
__setitem__: Any = ...
|
|
||||||
__delitem__: Any = ...
|
|
||||||
__iter__: Any = ...
|
|
||||||
__len__: Any = ...
|
|
||||||
__contains__: Any = ...
|
|
||||||
|
|
||||||
def unpickle_lazyobject(wrapped: Model) -> Model: ...
|
|
||||||
|
|
||||||
class SimpleLazyObject(LazyObject):
|
|
||||||
def __init__(self, func: Callable) -> None: ...
|
|
||||||
def __copy__(self) -> List[int]: ...
|
|
||||||
def __deepcopy__(self, memo: Dict[Any, Any]) -> List[int]: ...
|
|
||||||
|
|
||||||
def partition(predicate: Callable, values: List[Model]) -> Tuple[List[Model], List[Model]]: ...
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
from typing import Any, Callable, Optional, Union
|
|
||||||
|
|
||||||
from django.forms.boundfield import BoundField
|
|
||||||
|
|
||||||
class SafeData:
|
|
||||||
def __html__(self) -> SafeText: ...
|
|
||||||
|
|
||||||
class SafeBytes(bytes, SafeData):
|
|
||||||
def __add__(self, rhs: Any): ...
|
|
||||||
|
|
||||||
class SafeText(str, SafeData):
|
|
||||||
def __add__(self, rhs: str) -> str: ...
|
|
||||||
|
|
||||||
SafeString = SafeText
|
|
||||||
|
|
||||||
def mark_safe(s: Union[Callable, BoundField, str]) -> Union[Callable, BoundField, str]: ...
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
from contextlib import ContextDecorator
|
|
||||||
from datetime import date, datetime, timedelta, tzinfo
|
|
||||||
from typing import Any, Optional, Union
|
|
||||||
|
|
||||||
class FixedOffset(tzinfo):
|
|
||||||
def __init__(self, offset: Optional[float] = ..., name: Optional[str] = ...) -> None: ...
|
|
||||||
def utcoffset(self, dt: Union[datetime, str]) -> timedelta: ...
|
|
||||||
def tzname(self, dt: Optional[Union[datetime, str]]) -> str: ...
|
|
||||||
def dst(self, dt: datetime) -> timedelta: ...
|
|
||||||
|
|
||||||
utc: Any
|
|
||||||
|
|
||||||
def get_fixed_timezone(offset: Union[timedelta, int]) -> FixedOffset: ...
|
|
||||||
def get_default_timezone(): ...
|
|
||||||
def get_default_timezone_name() -> str: ...
|
|
||||||
def get_current_timezone() -> FixedOffset: ...
|
|
||||||
def get_current_timezone_name() -> str: ...
|
|
||||||
def activate(timezone: Optional[Union[FixedOffset, str]]) -> None: ...
|
|
||||||
def deactivate() -> None: ...
|
|
||||||
|
|
||||||
class override(ContextDecorator):
|
|
||||||
timezone: Optional[Union[django.utils.timezone.FixedOffset, str]] = ...
|
|
||||||
def __init__(self, timezone: Optional[Union[FixedOffset, str]]) -> None: ...
|
|
||||||
old_timezone: Optional[django.utils.timezone.FixedOffset] = ...
|
|
||||||
def __enter__(self) -> None: ...
|
|
||||||
def __exit__(self, exc_type: None, exc_value: None, traceback: None) -> None: ...
|
|
||||||
|
|
||||||
def localtime(value: Optional[datetime] = ..., timezone: Optional[FixedOffset] = ...) -> datetime: ...
|
|
||||||
def now() -> datetime: ...
|
|
||||||
def is_aware(value: datetime) -> bool: ...
|
|
||||||
def is_naive(value: datetime) -> bool: ...
|
|
||||||
def make_aware(value: datetime, timezone: Optional[FixedOffset] = ..., is_dst: Optional[bool] = ...) -> datetime: ...
|
|
||||||
def make_naive(value: datetime, timezone: Optional[FixedOffset] = ...) -> datetime: ...
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
||||||
|
|
||||||
from django.contrib.auth.models import User
|
|
||||||
from django.db.models.fields.related_lookups import RelatedLookupMixin
|
|
||||||
from django.db.models.lookups import BuiltinLookup, FieldGetDbPrepValueMixin
|
|
||||||
from django.db.models.sql.where import ExtraWhere, NothingNode
|
|
||||||
|
|
||||||
class Node:
|
|
||||||
default: str = ...
|
|
||||||
children: Union[List[Tuple[str, int]], List[django.db.models.lookups.Contains]] = ...
|
|
||||||
connector: str = ...
|
|
||||||
negated: bool = ...
|
|
||||||
def __init__(
|
|
||||||
self,
|
|
||||||
children: Optional[
|
|
||||||
Union[
|
|
||||||
List[Dict[str, str]],
|
|
||||||
List[Tuple[str, List[User]]],
|
|
||||||
List[RelatedLookupMixin],
|
|
||||||
List[BuiltinLookup],
|
|
||||||
List[FieldGetDbPrepValueMixin],
|
|
||||||
List[NothingNode],
|
|
||||||
List[Node],
|
|
||||||
]
|
|
||||||
] = ...,
|
|
||||||
connector: Optional[str] = ...,
|
|
||||||
negated: bool = ...,
|
|
||||||
) -> None: ...
|
|
||||||
def __deepcopy__(self, memodict: Dict[Any, Any]) -> Node: ...
|
|
||||||
def __len__(self) -> int: ...
|
|
||||||
def __bool__(self) -> bool: ...
|
|
||||||
def __contains__(self, other: Tuple[str, int]) -> bool: ...
|
|
||||||
def __eq__(self, other: Union[Tuple[str, List[Any]], BuiltinLookup, ExtraWhere, NothingNode, Node]) -> bool: ...
|
|
||||||
def __hash__(self) -> int: ...
|
|
||||||
def add(self, data: Any, conn_type: str, squash: bool = ...) -> Any: ...
|
|
||||||
def negate(self) -> None: ...
|
|
||||||
@@ -1,52 +0,0 @@
|
|||||||
from typing import Any, Callable, Dict, List, Optional, Type, Union
|
|
||||||
|
|
||||||
from django.core.handlers.wsgi import WSGIRequest
|
|
||||||
from django.http.request import QueryDict
|
|
||||||
from django.http.response import Http404, HttpResponse
|
|
||||||
from django.utils.safestring import SafeText
|
|
||||||
|
|
||||||
DEBUG_ENGINE: Any
|
|
||||||
HIDDEN_SETTINGS: Any
|
|
||||||
CLEANSED_SUBSTITUTE: str
|
|
||||||
CURRENT_DIR: Any
|
|
||||||
|
|
||||||
class CallableSettingWrapper:
|
|
||||||
def __init__(self, callable_setting: Union[Callable, Type[Any]]) -> None: ...
|
|
||||||
|
|
||||||
def cleanse_setting(key: Union[int, str], value: Any) -> Any: ...
|
|
||||||
def get_safe_settings() -> Dict[str, Any]: ...
|
|
||||||
def technical_500_response(request: Any, exc_type: Any, exc_value: Any, tb: Any, status_code: int = ...): ...
|
|
||||||
def get_default_exception_reporter_filter() -> SafeExceptionReporterFilter: ...
|
|
||||||
def get_exception_reporter_filter(request: Optional[WSGIRequest]) -> SafeExceptionReporterFilter: ...
|
|
||||||
|
|
||||||
class ExceptionReporterFilter:
|
|
||||||
def get_post_parameters(self, request: Any): ...
|
|
||||||
def get_traceback_frame_variables(self, request: Any, tb_frame: Any): ...
|
|
||||||
|
|
||||||
class SafeExceptionReporterFilter(ExceptionReporterFilter):
|
|
||||||
def is_active(self, request: Optional[WSGIRequest]) -> bool: ...
|
|
||||||
def get_cleansed_multivaluedict(self, request: WSGIRequest, multivaluedict: QueryDict) -> QueryDict: ...
|
|
||||||
def get_post_parameters(self, request: Optional[WSGIRequest]) -> Union[Dict[Any, Any], QueryDict]: ...
|
|
||||||
def cleanse_special_types(self, request: Optional[WSGIRequest], value: Any) -> Any: ...
|
|
||||||
def get_traceback_frame_variables(self, request: Any, tb_frame: Any): ...
|
|
||||||
|
|
||||||
class ExceptionReporter:
|
|
||||||
request: Optional[django.core.handlers.wsgi.WSGIRequest] = ...
|
|
||||||
filter: django.views.debug.SafeExceptionReporterFilter = ...
|
|
||||||
exc_type: None = ...
|
|
||||||
exc_value: Optional[str] = ...
|
|
||||||
tb: None = ...
|
|
||||||
is_email: bool = ...
|
|
||||||
template_info: None = ...
|
|
||||||
template_does_not_exist: bool = ...
|
|
||||||
postmortem: None = ...
|
|
||||||
def __init__(
|
|
||||||
self, request: Optional[WSGIRequest], exc_type: None, exc_value: Optional[str], tb: None, is_email: bool = ...
|
|
||||||
) -> None: ...
|
|
||||||
def get_traceback_data(self) -> Dict[str, Any]: ...
|
|
||||||
def get_traceback_html(self) -> SafeText: ...
|
|
||||||
def get_traceback_text(self) -> SafeText: ...
|
|
||||||
def get_traceback_frames(self) -> List[Any]: ...
|
|
||||||
|
|
||||||
def technical_404_response(request: WSGIRequest, exception: Http404) -> HttpResponse: ...
|
|
||||||
def default_urlconf(request: WSGIRequest) -> HttpResponse: ...
|
|
||||||
@@ -1,75 +0,0 @@
|
|||||||
from typing import Any, Callable, Dict, List, Optional, Union
|
|
||||||
from unittest.mock import MagicMock
|
|
||||||
|
|
||||||
from django.contrib.auth.forms import AuthenticationForm
|
|
||||||
from django.contrib.sites.models import Site
|
|
||||||
from django.core.handlers.wsgi import WSGIRequest
|
|
||||||
from django.core.paginator import Page, Paginator
|
|
||||||
from django.http.request import HttpRequest
|
|
||||||
from django.http.response import HttpResponse, HttpResponseNotAllowed, HttpResponseRedirect
|
|
||||||
from django.template.response import TemplateResponse
|
|
||||||
from django.views.generic.list import ListView
|
|
||||||
|
|
||||||
logger: Any
|
|
||||||
|
|
||||||
class ContextMixin:
|
|
||||||
extra_context: Any = ...
|
|
||||||
def get_context_data(self, **kwargs: Any) -> Dict[str, Any]: ...
|
|
||||||
|
|
||||||
class View:
|
|
||||||
http_method_names: Any = ...
|
|
||||||
def __init__(self, **kwargs: Any) -> None: ...
|
|
||||||
head: Any = ...
|
|
||||||
request: Any = ...
|
|
||||||
args: Any = ...
|
|
||||||
kwargs: Any = ...
|
|
||||||
def as_view(cls, **initkwargs: Any) -> Callable: ...
|
|
||||||
def dispatch(self, request: HttpRequest, *args: Any, **kwargs: Any) -> Union[HttpResponse, View]: ...
|
|
||||||
def http_method_not_allowed(self, request: WSGIRequest, *args: Any, **kwargs: Any) -> HttpResponseNotAllowed: ...
|
|
||||||
def options(self, request: WSGIRequest, *args: Any, **kwargs: Any) -> HttpResponse: ...
|
|
||||||
|
|
||||||
class TemplateResponseMixin:
|
|
||||||
template_name: Any = ...
|
|
||||||
template_engine: Any = ...
|
|
||||||
response_class: Any = ...
|
|
||||||
content_type: Any = ...
|
|
||||||
def render_to_response(
|
|
||||||
self,
|
|
||||||
context: Union[
|
|
||||||
Dict[str, Any],
|
|
||||||
Dict[str, Optional[Union[List[Dict[str, str]], bool, ListView]]],
|
|
||||||
Dict[str, Union[List[Dict[str, str]], bool, Page, Paginator, ListView]],
|
|
||||||
Dict[str, Union[AuthenticationForm, Site, TemplateResponseMixin, str]],
|
|
||||||
MagicMock,
|
|
||||||
],
|
|
||||||
**response_kwargs: Any
|
|
||||||
) -> TemplateResponse: ...
|
|
||||||
def get_template_names(self) -> List[str]: ...
|
|
||||||
|
|
||||||
class TemplateView(TemplateResponseMixin, ContextMixin, View):
|
|
||||||
args: Tuple
|
|
||||||
content_type: str
|
|
||||||
extra_context: Dict[str, str]
|
|
||||||
head: Callable
|
|
||||||
kwargs: Dict[str, str]
|
|
||||||
request: django.core.handlers.wsgi.WSGIRequest
|
|
||||||
template_engine: str
|
|
||||||
template_name: str
|
|
||||||
def get(self, request: WSGIRequest, *args: Any, **kwargs: Any) -> TemplateResponse: ...
|
|
||||||
|
|
||||||
class RedirectView(View):
|
|
||||||
args: Tuple
|
|
||||||
kwargs: Dict[str, Union[int, str]]
|
|
||||||
request: django.core.handlers.wsgi.WSGIRequest
|
|
||||||
permanent: bool = ...
|
|
||||||
url: str = ...
|
|
||||||
pattern_name: str = ...
|
|
||||||
query_string: bool = ...
|
|
||||||
def get_redirect_url(self, *args: Any, **kwargs: Any) -> Optional[str]: ...
|
|
||||||
def get(self, request: WSGIRequest, *args: Any, **kwargs: Any) -> HttpResponse: ...
|
|
||||||
def head(self, request: WSGIRequest, *args: Any, **kwargs: Any) -> HttpResponse: ...
|
|
||||||
def post(self, request: WSGIRequest, *args: Any, **kwargs: Any) -> HttpResponseRedirect: ...
|
|
||||||
def options(self, request: WSGIRequest, *args: Any, **kwargs: Any) -> HttpResponseRedirect: ...
|
|
||||||
def delete(self, request: WSGIRequest, *args: Any, **kwargs: Any) -> HttpResponseRedirect: ...
|
|
||||||
def put(self, request: WSGIRequest, *args: Any, **kwargs: Any) -> HttpResponseRedirect: ...
|
|
||||||
def patch(self, request: WSGIRequest, *args: Any, **kwargs: Any) -> HttpResponseRedirect: ...
|
|
||||||
@@ -1,108 +0,0 @@
|
|||||||
from datetime import date
|
|
||||||
from typing import Any, Dict, Optional, Tuple, Union
|
|
||||||
|
|
||||||
from django.core.handlers.wsgi import WSGIRequest
|
|
||||||
from django.db.models.base import Model
|
|
||||||
from django.db.models.query import QuerySet
|
|
||||||
from django.template.response import TemplateResponse
|
|
||||||
from django.views.generic.base import View
|
|
||||||
from django.views.generic.detail import BaseDetailView, SingleObjectTemplateResponseMixin
|
|
||||||
from django.views.generic.list import MultipleObjectMixin, MultipleObjectTemplateResponseMixin
|
|
||||||
|
|
||||||
class YearMixin:
|
|
||||||
year_format: str = ...
|
|
||||||
year: Any = ...
|
|
||||||
def get_year_format(self) -> str: ...
|
|
||||||
def get_year(self) -> int: ...
|
|
||||||
def get_next_year(self, date: date) -> Optional[date]: ...
|
|
||||||
def get_previous_year(self, date: date) -> Optional[date]: ...
|
|
||||||
|
|
||||||
class MonthMixin:
|
|
||||||
month_format: str = ...
|
|
||||||
month: Any = ...
|
|
||||||
def get_month_format(self) -> str: ...
|
|
||||||
def get_month(self) -> Union[int, str]: ...
|
|
||||||
def get_next_month(self, date: date) -> Optional[date]: ...
|
|
||||||
def get_previous_month(self, date: date) -> Optional[date]: ...
|
|
||||||
|
|
||||||
class DayMixin:
|
|
||||||
day_format: str = ...
|
|
||||||
day: Any = ...
|
|
||||||
def get_day_format(self) -> str: ...
|
|
||||||
def get_day(self) -> Union[int, str]: ...
|
|
||||||
def get_next_day(self, date: date) -> Optional[date]: ...
|
|
||||||
def get_previous_day(self, date: date) -> Optional[date]: ...
|
|
||||||
|
|
||||||
class WeekMixin:
|
|
||||||
week_format: str = ...
|
|
||||||
week: Any = ...
|
|
||||||
def get_week_format(self) -> str: ...
|
|
||||||
def get_week(self) -> int: ...
|
|
||||||
def get_next_week(self, date: date) -> Optional[date]: ...
|
|
||||||
def get_previous_week(self, date: date) -> Optional[date]: ...
|
|
||||||
|
|
||||||
class DateMixin:
|
|
||||||
date_field: Any = ...
|
|
||||||
allow_future: bool = ...
|
|
||||||
def get_date_field(self) -> str: ...
|
|
||||||
def get_allow_future(self) -> bool: ...
|
|
||||||
def uses_datetime_field(self) -> bool: ...
|
|
||||||
|
|
||||||
class BaseDateListView(MultipleObjectMixin, DateMixin, View):
|
|
||||||
allow_empty: bool = ...
|
|
||||||
date_list_period: str = ...
|
|
||||||
def get(self, request: WSGIRequest, *args: Any, **kwargs: Any) -> TemplateResponse: ...
|
|
||||||
def get_dated_items(self) -> None: ...
|
|
||||||
def get_ordering(self) -> Union[Tuple[str, str], str]: ...
|
|
||||||
def get_dated_queryset(self, **lookup: Any) -> QuerySet: ...
|
|
||||||
def get_date_list_period(self) -> str: ...
|
|
||||||
def get_date_list(self, queryset: QuerySet, date_type: None = ..., ordering: str = ...) -> QuerySet: ...
|
|
||||||
|
|
||||||
class BaseArchiveIndexView(BaseDateListView):
|
|
||||||
context_object_name: str = ...
|
|
||||||
def get_dated_items(self) -> Tuple[QuerySet, QuerySet, Dict[Any, Any]]: ...
|
|
||||||
|
|
||||||
class ArchiveIndexView(MultipleObjectTemplateResponseMixin, BaseArchiveIndexView):
|
|
||||||
template_name_suffix: str = ...
|
|
||||||
|
|
||||||
class BaseYearArchiveView(YearMixin, BaseDateListView):
|
|
||||||
date_list_period: str = ...
|
|
||||||
make_object_list: bool = ...
|
|
||||||
def get_dated_items(self) -> Tuple[QuerySet, QuerySet, Dict[str, Optional[date]]]: ...
|
|
||||||
def get_make_object_list(self) -> bool: ...
|
|
||||||
|
|
||||||
class YearArchiveView(MultipleObjectTemplateResponseMixin, BaseYearArchiveView):
|
|
||||||
template_name_suffix: str = ...
|
|
||||||
|
|
||||||
class BaseMonthArchiveView(YearMixin, MonthMixin, BaseDateListView):
|
|
||||||
date_list_period: str = ...
|
|
||||||
def get_dated_items(self) -> Tuple[QuerySet, QuerySet, Dict[str, Optional[date]]]: ...
|
|
||||||
|
|
||||||
class MonthArchiveView(MultipleObjectTemplateResponseMixin, BaseMonthArchiveView):
|
|
||||||
template_name_suffix: str = ...
|
|
||||||
|
|
||||||
class BaseWeekArchiveView(YearMixin, WeekMixin, BaseDateListView):
|
|
||||||
def get_dated_items(self) -> Tuple[None, QuerySet, Dict[str, Optional[date]]]: ...
|
|
||||||
|
|
||||||
class WeekArchiveView(MultipleObjectTemplateResponseMixin, BaseWeekArchiveView):
|
|
||||||
template_name_suffix: str = ...
|
|
||||||
|
|
||||||
class BaseDayArchiveView(YearMixin, MonthMixin, DayMixin, BaseDateListView):
|
|
||||||
def get_dated_items(self) -> Tuple[None, QuerySet, Dict[str, Optional[date]]]: ...
|
|
||||||
|
|
||||||
class DayArchiveView(MultipleObjectTemplateResponseMixin, BaseDayArchiveView):
|
|
||||||
template_name_suffix: str = ...
|
|
||||||
|
|
||||||
class BaseTodayArchiveView(BaseDayArchiveView):
|
|
||||||
def get_dated_items(self) -> Tuple[None, QuerySet, Dict[str, Optional[date]]]: ...
|
|
||||||
|
|
||||||
class TodayArchiveView(MultipleObjectTemplateResponseMixin, BaseTodayArchiveView):
|
|
||||||
template_name_suffix: str = ...
|
|
||||||
|
|
||||||
class BaseDateDetailView(YearMixin, MonthMixin, DayMixin, DateMixin, BaseDetailView):
|
|
||||||
def get_object(self, queryset: Optional[QuerySet] = ...) -> Model: ...
|
|
||||||
|
|
||||||
class DateDetailView(SingleObjectTemplateResponseMixin, BaseDateDetailView):
|
|
||||||
template_name_suffix: str = ...
|
|
||||||
|
|
||||||
def timezone_today() -> date: ...
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
from typing import Any, Dict, List, Optional, Union
|
|
||||||
|
|
||||||
from django.core.handlers.wsgi import WSGIRequest
|
|
||||||
from django.db.models.base import Model
|
|
||||||
from django.db.models.query import QuerySet
|
|
||||||
from django.template.response import TemplateResponse
|
|
||||||
from django.views.generic.base import ContextMixin, TemplateResponseMixin, View
|
|
||||||
|
|
||||||
class SingleObjectMixin(ContextMixin):
|
|
||||||
model: Any = ...
|
|
||||||
queryset: Any = ...
|
|
||||||
slug_field: str = ...
|
|
||||||
context_object_name: Any = ...
|
|
||||||
slug_url_kwarg: str = ...
|
|
||||||
pk_url_kwarg: str = ...
|
|
||||||
query_pk_and_slug: bool = ...
|
|
||||||
def get_object(self, queryset: Optional[QuerySet] = ...) -> Model: ...
|
|
||||||
def get_queryset(self) -> QuerySet: ...
|
|
||||||
def get_slug_field(self) -> str: ...
|
|
||||||
def get_context_object_name(self, obj: Union[Dict[str, str], Model]) -> Optional[str]: ...
|
|
||||||
def get_context_data(self, **kwargs: Any) -> Dict[str, Any]: ...
|
|
||||||
|
|
||||||
class BaseDetailView(SingleObjectMixin, View):
|
|
||||||
object: Any = ...
|
|
||||||
def get(self, request: WSGIRequest, *args: Any, **kwargs: Any) -> TemplateResponse: ...
|
|
||||||
|
|
||||||
class SingleObjectTemplateResponseMixin(TemplateResponseMixin):
|
|
||||||
template_name_field: Any = ...
|
|
||||||
template_name_suffix: str = ...
|
|
||||||
def get_template_names(self) -> List[str]: ...
|
|
||||||
|
|
||||||
class DetailView(SingleObjectTemplateResponseMixin, BaseDetailView): ...
|
|
||||||
@@ -1,72 +0,0 @@
|
|||||||
from typing import Any, Dict, Optional, Type, Union
|
|
||||||
|
|
||||||
from django.core.handlers.wsgi import WSGIRequest
|
|
||||||
from django.db.models.base import Model
|
|
||||||
from django.forms.forms import BaseForm, Form
|
|
||||||
from django.forms.models import ModelForm
|
|
||||||
from django.http.request import HttpRequest
|
|
||||||
from django.http.response import HttpResponse, HttpResponseRedirect
|
|
||||||
from django.template.response import TemplateResponse
|
|
||||||
from django.utils.datastructures import MultiValueDict
|
|
||||||
from django.views.generic.base import ContextMixin, TemplateResponseMixin, View
|
|
||||||
from django.views.generic.detail import BaseDetailView, SingleObjectMixin, SingleObjectTemplateResponseMixin
|
|
||||||
|
|
||||||
class FormMixin(ContextMixin):
|
|
||||||
initial: Any = ...
|
|
||||||
form_class: Any = ...
|
|
||||||
success_url: Any = ...
|
|
||||||
prefix: Any = ...
|
|
||||||
def get_initial(self) -> Dict[Any, Any]: ...
|
|
||||||
def get_prefix(self) -> None: ...
|
|
||||||
def get_form_class(self) -> Type[Form]: ...
|
|
||||||
def get_form(self, form_class: None = ...) -> BaseForm: ...
|
|
||||||
def get_form_kwargs(self) -> Dict[str, Optional[Union[Dict[str, str], MultiValueDict]]]: ...
|
|
||||||
def get_success_url(self) -> str: ...
|
|
||||||
def form_valid(self, form: BaseForm) -> HttpResponseRedirect: ...
|
|
||||||
def form_invalid(self, form: Form) -> TemplateResponse: ...
|
|
||||||
def get_context_data(self, **kwargs: Any) -> Dict[str, Union[Model, BaseForm, TemplateResponseMixin]]: ...
|
|
||||||
|
|
||||||
class ModelFormMixin(FormMixin, SingleObjectMixin):
|
|
||||||
request: django.core.handlers.wsgi.WSGIRequest
|
|
||||||
fields: Any = ...
|
|
||||||
def get_form_class(self) -> Type[ModelForm]: ...
|
|
||||||
def get_form_kwargs(self) -> Dict[str, Optional[Union[Dict[Any, Any], Model, MultiValueDict]]]: ...
|
|
||||||
def get_success_url(self) -> str: ...
|
|
||||||
object: Any = ...
|
|
||||||
def form_valid(self, form: ModelForm) -> HttpResponseRedirect: ...
|
|
||||||
|
|
||||||
class ProcessFormView(View):
|
|
||||||
def get(self, request: WSGIRequest, *args: Any, **kwargs: Any) -> TemplateResponse: ...
|
|
||||||
def post(self, request: HttpRequest, *args: Any, **kwargs: Any) -> HttpResponse: ...
|
|
||||||
def put(self, *args: Any, **kwargs: Any): ...
|
|
||||||
|
|
||||||
class BaseFormView(FormMixin, ProcessFormView): ...
|
|
||||||
class FormView(TemplateResponseMixin, BaseFormView): ...
|
|
||||||
|
|
||||||
class BaseCreateView(ModelFormMixin, ProcessFormView):
|
|
||||||
object: Any = ...
|
|
||||||
def get(self, request: WSGIRequest, *args: Any, **kwargs: Any) -> TemplateResponse: ...
|
|
||||||
def post(self, request: WSGIRequest, *args: Any, **kwargs: Any) -> HttpResponse: ...
|
|
||||||
|
|
||||||
class CreateView(SingleObjectTemplateResponseMixin, BaseCreateView):
|
|
||||||
template_name_suffix: str = ...
|
|
||||||
|
|
||||||
class BaseUpdateView(ModelFormMixin, ProcessFormView):
|
|
||||||
object: Any = ...
|
|
||||||
def get(self, request: WSGIRequest, *args: Any, **kwargs: Any) -> TemplateResponse: ...
|
|
||||||
def post(self, request: WSGIRequest, *args: Any, **kwargs: Any) -> HttpResponse: ...
|
|
||||||
|
|
||||||
class UpdateView(SingleObjectTemplateResponseMixin, BaseUpdateView):
|
|
||||||
template_name_suffix: str = ...
|
|
||||||
|
|
||||||
class DeletionMixin:
|
|
||||||
success_url: Any = ...
|
|
||||||
object: Any = ...
|
|
||||||
def delete(self, request: WSGIRequest, *args: Any, **kwargs: Any) -> HttpResponseRedirect: ...
|
|
||||||
def post(self, request: WSGIRequest, *args: Any, **kwargs: Any) -> HttpResponseRedirect: ...
|
|
||||||
def get_success_url(self) -> str: ...
|
|
||||||
|
|
||||||
class BaseDeleteView(DeletionMixin, BaseDetailView): ...
|
|
||||||
|
|
||||||
class DeleteView(SingleObjectTemplateResponseMixin, BaseDeleteView):
|
|
||||||
template_name_suffix: str = ...
|
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
||||||
|
|
||||||
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 django.views.generic.base import ContextMixin, TemplateResponseMixin, View
|
|
||||||
|
|
||||||
class MultipleObjectMixin(ContextMixin):
|
|
||||||
allow_empty: bool = ...
|
|
||||||
queryset: Any = ...
|
|
||||||
model: Any = ...
|
|
||||||
paginate_by: Any = ...
|
|
||||||
paginate_orphans: int = ...
|
|
||||||
context_object_name: Any = ...
|
|
||||||
paginator_class: Any = ...
|
|
||||||
page_kwarg: str = ...
|
|
||||||
ordering: Any = ...
|
|
||||||
def get_queryset(self) -> Union[List[Dict[str, str]], QuerySet]: ...
|
|
||||||
def get_ordering(self) -> Optional[Union[Tuple[str, str], str]]: ...
|
|
||||||
def paginate_queryset(
|
|
||||||
self, queryset: Union[List[Dict[str, str]], QuerySet], page_size: int
|
|
||||||
) -> Tuple[Paginator, Page, Union[List[Dict[str, str]], QuerySet], bool]: ...
|
|
||||||
def get_paginate_by(self, queryset: Optional[Union[List[Dict[str, str]], QuerySet]]) -> Optional[int]: ...
|
|
||||||
def get_paginator(
|
|
||||||
self,
|
|
||||||
queryset: Union[List[Dict[str, str]], QuerySet],
|
|
||||||
per_page: int,
|
|
||||||
orphans: int = ...,
|
|
||||||
allow_empty_first_page: bool = ...,
|
|
||||||
**kwargs: Any
|
|
||||||
) -> Paginator: ...
|
|
||||||
def get_paginate_orphans(self) -> int: ...
|
|
||||||
def get_allow_empty(self) -> bool: ...
|
|
||||||
def get_context_object_name(
|
|
||||||
self, object_list: Optional[Union[List[Dict[str, str]], QuerySet]]
|
|
||||||
) -> Optional[str]: ...
|
|
||||||
def get_context_data(self, *, object_list: Optional[Any] = ..., **kwargs: Any) -> Dict[str, Any]: ...
|
|
||||||
|
|
||||||
class BaseListView(MultipleObjectMixin, View):
|
|
||||||
object_list: Any = ...
|
|
||||||
def get(self, request: WSGIRequest, *args: Any, **kwargs: Any) -> TemplateResponse: ...
|
|
||||||
|
|
||||||
class MultipleObjectTemplateResponseMixin(TemplateResponseMixin):
|
|
||||||
template_name_suffix: str = ...
|
|
||||||
def get_template_names(self) -> List[str]: ...
|
|
||||||
|
|
||||||
class ListView(MultipleObjectTemplateResponseMixin, BaseListView): ...
|
|
||||||
23
django-stubs/contrib/admin/__init__.pyi
Normal file
23
django-stubs/contrib/admin/__init__.pyi
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
from django.contrib.admin.decorators import register as register
|
||||||
|
from django.contrib.admin.filters import (
|
||||||
|
AllValuesFieldListFilter as AllValuesFieldListFilter,
|
||||||
|
BooleanFieldListFilter as BooleanFieldListFilter,
|
||||||
|
ChoicesFieldListFilter as ChoicesFieldListFilter,
|
||||||
|
DateFieldListFilter as DateFieldListFilter,
|
||||||
|
FieldListFilter as FieldListFilter,
|
||||||
|
ListFilter as ListFilter,
|
||||||
|
RelatedFieldListFilter as RelatedFieldListFilter,
|
||||||
|
RelatedOnlyFieldListFilter as RelatedOnlyFieldListFilter,
|
||||||
|
SimpleListFilter as SimpleListFilter,
|
||||||
|
)
|
||||||
|
from django.contrib.admin.helpers import ACTION_CHECKBOX_NAME as ACTION_CHECKBOX_NAME
|
||||||
|
from django.contrib.admin.options import (
|
||||||
|
HORIZONTAL as HORIZONTAL,
|
||||||
|
VERTICAL as VERTICAL,
|
||||||
|
ModelAdmin as ModelAdmin,
|
||||||
|
StackedInline as StackedInline,
|
||||||
|
TabularInline as TabularInline,
|
||||||
|
)
|
||||||
|
from django.contrib.admin.sites import AdminSite as AdminSite, site as site
|
||||||
|
|
||||||
|
def autodiscover() -> None: ...
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
from typing import Any, Optional
|
from typing import Optional
|
||||||
|
|
||||||
from django.contrib.admin.options import ModelAdmin
|
from django.contrib.admin.options import ModelAdmin
|
||||||
from django.core.handlers.wsgi import WSGIRequest
|
from django.core.handlers.wsgi import WSGIRequest
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
from typing import Any, Optional
|
from typing import Any
|
||||||
|
|
||||||
from django.apps import AppConfig
|
from django.apps import AppConfig
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
from typing import Any, List, Optional
|
from typing import Any, List
|
||||||
|
|
||||||
from django.contrib.admin.options import BaseModelAdmin, InlineModelAdmin, ModelAdmin
|
from django.contrib.admin.options import BaseModelAdmin, InlineModelAdmin, ModelAdmin
|
||||||
from django.core.checks.messages import Error
|
from django.core.checks.messages import Error
|
||||||
@@ -3,12 +3,12 @@ from typing import Any, Callable, Dict, List, Optional, Tuple, Type, Union
|
|||||||
from django.contrib.admin.options import ModelAdmin
|
from django.contrib.admin.options import ModelAdmin
|
||||||
from django.core.handlers.wsgi import WSGIRequest
|
from django.core.handlers.wsgi import WSGIRequest
|
||||||
from django.db.models.base import Model
|
from django.db.models.base import Model
|
||||||
from django.db.models.fields import BooleanField, DateField, Field
|
|
||||||
from django.db.models.fields.mixins import FieldCacheMixin
|
from django.db.models.fields.mixins import FieldCacheMixin
|
||||||
from django.db.models.fields.related import RelatedField
|
from django.db.models.fields.related import RelatedField
|
||||||
from django.db.models.fields.reverse_related import ForeignObjectRel
|
|
||||||
from django.db.models.query import QuerySet
|
from django.db.models.query import QuerySet
|
||||||
|
|
||||||
|
from django.db.models.fields import BooleanField, DateField, Field
|
||||||
|
|
||||||
class ListFilter:
|
class ListFilter:
|
||||||
title: Any = ...
|
title: Any = ...
|
||||||
template: str = ...
|
template: str = ...
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
from typing import Any, Optional
|
from typing import Any
|
||||||
|
|
||||||
from django.contrib.auth.forms import AuthenticationForm, PasswordChangeForm
|
from django.contrib.auth.forms import AuthenticationForm, PasswordChangeForm
|
||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User
|
||||||
@@ -1,24 +1,23 @@
|
|||||||
from typing import Any, Dict, List, Optional, Tuple
|
from typing import Any, Dict, List, Optional, Tuple, Type
|
||||||
|
|
||||||
from django.contrib import admin
|
from django.contrib.auth.models import User, Group
|
||||||
from django.contrib.auth.models import User
|
|
||||||
from django.core.handlers.wsgi import WSGIRequest
|
from django.core.handlers.wsgi import WSGIRequest
|
||||||
from django.db.models.fields.related import ManyToManyField
|
from django.db.models.fields.related import ManyToManyField
|
||||||
from django.forms.models import ModelMultipleChoiceField
|
from django.forms.models import ModelMultipleChoiceField
|
||||||
from django.http.response import HttpResponse
|
from django.http.response import HttpResponse
|
||||||
from django.urls.resolvers import URLPattern
|
from django.urls.resolvers import URLPattern
|
||||||
|
|
||||||
|
from django.contrib import admin
|
||||||
|
from django.contrib.admin.sites import AdminSite
|
||||||
|
|
||||||
csrf_protect_m: Any
|
csrf_protect_m: Any
|
||||||
sensitive_post_parameters_m: Any
|
sensitive_post_parameters_m: Any
|
||||||
|
|
||||||
class GroupAdmin(admin.ModelAdmin):
|
class GroupAdmin(admin.ModelAdmin):
|
||||||
admin_site: django.contrib.admin.sites.AdminSite
|
admin_site: AdminSite
|
||||||
formfield_overrides: Dict[
|
formfield_overrides: Any
|
||||||
Type[Union[django.db.models.fields.DateTimeCheckMixin, django.db.models.fields.Field]],
|
model: Type[Group]
|
||||||
Dict[str, Type[Union[django.forms.fields.SplitDateTimeField, django.forms.widgets.Widget]]],
|
opts: Options
|
||||||
]
|
|
||||||
model: Type[django.contrib.auth.models.Group]
|
|
||||||
opts: django.db.models.options.Options
|
|
||||||
search_fields: Any = ...
|
search_fields: Any = ...
|
||||||
ordering: Any = ...
|
ordering: Any = ...
|
||||||
filter_horizontal: Any = ...
|
filter_horizontal: Any = ...
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
from typing import Any, Optional
|
from typing import Any
|
||||||
|
|
||||||
from django.apps.config import AppConfig
|
from django.apps.config import AppConfig
|
||||||
from django.apps.registry import Apps
|
from django.apps.registry import Apps
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
from typing import Any
|
||||||
|
|
||||||
|
from django.core.management.base import BaseCommand
|
||||||
|
|
||||||
|
UserModel: Any
|
||||||
|
|
||||||
|
class Command(BaseCommand): ...
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
from django.core.management.base import BaseCommand
|
||||||
|
|
||||||
|
class NotRunningInTTYException(Exception): ...
|
||||||
|
class Command(BaseCommand): ...
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user