mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-08 13:04:47 +08:00
better stubs
This commit is contained in:
@@ -1,10 +1,5 @@
|
|||||||
# Stubs for django (Python 3.6)
|
from typing import Any, Optional
|
||||||
#
|
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
||||||
|
|
||||||
from typing import Any
|
|
||||||
|
|
||||||
VERSION: Any
|
VERSION: Any
|
||||||
__version__: Any
|
|
||||||
|
|
||||||
def setup(set_prefix: bool = ...) -> None: ...
|
def setup(set_prefix: bool = ...) -> None: ...
|
||||||
|
|||||||
@@ -1,29 +1,24 @@
|
|||||||
# Stubs for django.apps.config (Python 3.6)
|
from typing import Any, Iterator, Optional, Type
|
||||||
#
|
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
||||||
|
|
||||||
from typing import Any
|
|
||||||
|
|
||||||
from django.db.models.base import Model
|
from django.db.models.base import Model
|
||||||
from typing import Any, Iterator, Type
|
|
||||||
|
|
||||||
MODELS_MODULE_NAME: str
|
MODELS_MODULE_NAME: str
|
||||||
|
|
||||||
class AppConfig:
|
class AppConfig:
|
||||||
name: Any = ...
|
name: str = ...
|
||||||
module: Any = ...
|
module: Any = ...
|
||||||
apps: Any = ...
|
apps: None = ...
|
||||||
label: Any = ...
|
label: str = ...
|
||||||
verbose_name: Any = ...
|
verbose_name: str = ...
|
||||||
path: Any = ...
|
path: str = ...
|
||||||
models_module: Any = ...
|
models_module: None = ...
|
||||||
models: Any = ...
|
models: None = ...
|
||||||
def __init__(self, app_name: str, app_module: Any) -> None: ...
|
def __init__(self, app_name: str, app_module: None) -> None: ...
|
||||||
def __repr__(self): ...
|
|
||||||
def _path_from_module(self, module: Any) -> str: ...
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def create(cls, entry: str) -> AppConfig: ...
|
def create(cls, entry: str) -> AppConfig: ...
|
||||||
def get_model(self, model_name: str, require_ready: bool = ...) -> Type[Model]: ...
|
def get_model(
|
||||||
|
self, model_name: str, require_ready: bool = ...
|
||||||
|
) -> Type[Model]: ...
|
||||||
def get_models(
|
def get_models(
|
||||||
self, include_auto_created: bool = ..., include_swapped: bool = ...
|
self, include_auto_created: bool = ..., include_swapped: bool = ...
|
||||||
) -> Iterator[Type[Model]]: ...
|
) -> Iterator[Type[Model]]: ...
|
||||||
|
|||||||
@@ -1,48 +1,57 @@
|
|||||||
# Stubs for django.apps.registry (Python 3.6)
|
from functools import partial
|
||||||
#
|
from typing import Any, List, Optional, Tuple, Type, Union
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
||||||
|
|
||||||
from .config import AppConfig
|
|
||||||
from typing import Any, Optional
|
|
||||||
|
|
||||||
from django.apps.config import AppConfig
|
from django.apps.config import AppConfig
|
||||||
from django.db.migrations.state import AppConfigStub
|
from django.db.migrations.state import AppConfigStub
|
||||||
from django.db.models.base import Model
|
from django.db.models.base import Model
|
||||||
from typing import List, Optional, Tuple, Type, Union
|
|
||||||
|
from .config import AppConfig
|
||||||
|
|
||||||
|
|
||||||
class Apps:
|
class Apps:
|
||||||
all_models: Any = ...
|
all_models: collections.defaultdict = ...
|
||||||
app_configs: Any = ...
|
app_configs: collections.OrderedDict = ...
|
||||||
stored_app_configs: Any = ...
|
stored_app_configs: List[Any] = ...
|
||||||
apps_ready: bool = ...
|
apps_ready: bool = ...
|
||||||
_lock: Any = ...
|
|
||||||
loading: bool = ...
|
loading: bool = ...
|
||||||
_pending_operations: Any = ...
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, installed_apps: Union[Tuple, List[str], List[AppConfigStub]] = ...
|
self, installed_apps: Union[List[AppConfigStub], Tuple] = ...
|
||||||
) -> None: ...
|
) -> None: ...
|
||||||
models_ready: bool = ...
|
models_ready: bool = ...
|
||||||
ready: bool = ...
|
ready: bool = ...
|
||||||
def populate(self, installed_apps: Optional[Any] = ...): ...
|
def populate(
|
||||||
|
self, installed_apps: Union[List[AppConfigStub], Tuple, List[str]] = ...
|
||||||
|
) -> None: ...
|
||||||
def check_apps_ready(self) -> None: ...
|
def check_apps_ready(self) -> None: ...
|
||||||
def check_models_ready(self) -> None: ...
|
def check_models_ready(self) -> None: ...
|
||||||
def get_app_configs(self): ...
|
def get_app_configs(self): ...
|
||||||
def get_app_config(self, app_label: str) -> AppConfig: ...
|
def get_app_config(self, app_label: str) -> AppConfig: ...
|
||||||
def get_models(self, include_auto_created: bool = ..., include_swapped: bool = ...): ...
|
def get_models(
|
||||||
|
self, include_auto_created: bool = ..., include_swapped: bool = ...
|
||||||
|
) -> List[Type[Model]]: ...
|
||||||
def get_model(
|
def get_model(
|
||||||
self, app_label: str, model_name: None = ..., require_ready: bool = ...
|
self,
|
||||||
|
app_label: str,
|
||||||
|
model_name: Optional[str] = ...,
|
||||||
|
require_ready: bool = ...,
|
||||||
) -> Type[Model]: ...
|
) -> Type[Model]: ...
|
||||||
def register_model(self, app_label: Any, model: Any) -> None: ...
|
def register_model(self, app_label: str, model: Type[Model]) -> None: ...
|
||||||
def is_installed(self, app_name: Any): ...
|
def is_installed(self, app_name: Any): ...
|
||||||
def get_containing_app_config(self, object_name: str) -> Optional[AppConfig]: ...
|
def get_containing_app_config(
|
||||||
def get_registered_model(self, app_label: Any, model_name: Any): ...
|
self, object_name: str
|
||||||
def get_swappable_settings_name(self, to_string: Any): ...
|
) -> Optional[AppConfig]: ...
|
||||||
|
def get_registered_model(
|
||||||
|
self, app_label: str, model_name: str
|
||||||
|
) -> Type[Model]: ...
|
||||||
|
def get_swappable_settings_name(self, to_string: str) -> Optional[str]: ...
|
||||||
def set_available_apps(self, available: Any) -> None: ...
|
def set_available_apps(self, available: Any) -> None: ...
|
||||||
def unset_available_apps(self) -> None: ...
|
def unset_available_apps(self) -> None: ...
|
||||||
def set_installed_apps(self, installed: Any) -> None: ...
|
def set_installed_apps(self, installed: List[str]) -> None: ...
|
||||||
def unset_installed_apps(self) -> None: ...
|
def unset_installed_apps(self) -> None: ...
|
||||||
def clear_cache(self) -> None: ...
|
def clear_cache(self) -> None: ...
|
||||||
def lazy_model_operation(self, function: Any, *model_keys: Any) -> None: ...
|
def lazy_model_operation(
|
||||||
|
self, function: partial, *model_keys: Any
|
||||||
|
) -> None: ...
|
||||||
def do_pending_operations(self, model: Type[Model]) -> None: ...
|
def do_pending_operations(self, model: Type[Model]) -> None: ...
|
||||||
|
|
||||||
apps: Any
|
apps: Any
|
||||||
|
|||||||
@@ -1,42 +1,36 @@
|
|||||||
# Stubs for django.conf (Python 3.6)
|
from typing import Any, List, Optional, Union
|
||||||
#
|
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
||||||
|
|
||||||
from django.utils.functional import LazyObject
|
from django.utils.functional import LazyObject
|
||||||
from typing import Any, Optional
|
|
||||||
|
|
||||||
from typing import Any, List
|
|
||||||
|
|
||||||
ENVIRONMENT_VARIABLE: str
|
ENVIRONMENT_VARIABLE: str
|
||||||
|
|
||||||
class LazySettings(LazyObject):
|
class LazySettings(LazyObject):
|
||||||
_wrapped: Any = ...
|
|
||||||
def _setup(self, name: None = ...) -> None: ...
|
|
||||||
def __repr__(self): ...
|
|
||||||
def __getattr__(self, name: str) -> Any: ...
|
def __getattr__(self, name: str) -> Any: ...
|
||||||
def __setattr__(self, name: str, value: object) -> None: ...
|
def __setattr__(self, name: str, value: Any) -> None: ...
|
||||||
def __delattr__(self, name: str) -> None: ...
|
def __delattr__(self, name: str) -> None: ...
|
||||||
def configure(self, default_settings: Any = ..., **options: Any) -> None: ...
|
def configure(self, default_settings: Any = ..., **options: Any) -> Any: ...
|
||||||
@property
|
@property
|
||||||
def configured(self) -> bool: ...
|
def configured(self) -> bool: ...
|
||||||
|
|
||||||
class Settings:
|
class Settings:
|
||||||
|
FORCE_SCRIPT_NAME: None
|
||||||
|
INSTALLED_APPS: List[Any]
|
||||||
|
LOGGING: Dict[Any, Any]
|
||||||
|
LOGGING_CONFIG: str
|
||||||
SETTINGS_MODULE: Any = ...
|
SETTINGS_MODULE: Any = ...
|
||||||
_explicit_settings: Any = ...
|
|
||||||
def __init__(self, settings_module: str) -> None: ...
|
def __init__(self, settings_module: str) -> None: ...
|
||||||
def is_overridden(self, setting: str) -> bool: ...
|
def is_overridden(self, setting: str) -> bool: ...
|
||||||
def __repr__(self): ...
|
|
||||||
|
|
||||||
class UserSettingsHolder:
|
class UserSettingsHolder:
|
||||||
SETTINGS_MODULE: Any = ...
|
SETTINGS_MODULE: Any = ...
|
||||||
default_settings: Any = ...
|
default_settings: django.conf.Settings = ...
|
||||||
def __init__(self, default_settings: Any) -> None: ...
|
def __init__(
|
||||||
|
self, default_settings: Union[Settings, UserSettingsHolder]
|
||||||
|
) -> None: ...
|
||||||
def __getattr__(self, name: str) -> Any: ...
|
def __getattr__(self, name: str) -> Any: ...
|
||||||
def __setattr__(self, name: str, value: Any) -> None: ...
|
def __setattr__(self, name: str, value: Any) -> None: ...
|
||||||
def __delattr__(self, name: str) -> None: ...
|
def __delattr__(self, name: str) -> None: ...
|
||||||
def __dir__(self) -> List[str]: ...
|
def __dir__(self) -> List[str]: ...
|
||||||
def is_overridden(self, setting: Any): ...
|
def is_overridden(self, setting: str) -> bool: ...
|
||||||
def __repr__(self): ...
|
|
||||||
|
|
||||||
settings = LazySettings()
|
|
||||||
settings: Any
|
settings: Any
|
||||||
|
|||||||
@@ -1,12 +1,7 @@
|
|||||||
# Stubs for django.conf.urls (Python 3.6)
|
from typing import Any, Callable, Optional, Tuple, Union
|
||||||
#
|
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
||||||
|
|
||||||
from django.urls import include as include
|
from django.urls import include as include
|
||||||
from typing import Any, Optional
|
|
||||||
|
|
||||||
from django.urls.resolvers import URLPattern, URLResolver
|
from django.urls.resolvers import URLPattern, URLResolver
|
||||||
from typing import Any, Optional, Union
|
|
||||||
|
|
||||||
handler400: Any
|
handler400: Any
|
||||||
handler403: Any
|
handler403: Any
|
||||||
@@ -14,5 +9,10 @@ handler404: Any
|
|||||||
handler500: Any
|
handler500: Any
|
||||||
|
|
||||||
def url(
|
def url(
|
||||||
regex: str, view: Any, kwargs: Any = ..., name: Optional[str] = ...
|
regex: str,
|
||||||
) -> Union[URLPattern, URLResolver]: ...
|
view: Optional[
|
||||||
|
Union[Tuple[None, None, None], Tuple[str, str, str], Callable]
|
||||||
|
],
|
||||||
|
kwargs: Any = ...,
|
||||||
|
name: Optional[str] = ...,
|
||||||
|
) -> Union[URLResolver, URLPattern]: ...
|
||||||
|
|||||||
@@ -1,15 +1,11 @@
|
|||||||
# Stubs for django.conf.urls.i18n (Python 3.6)
|
from typing import Any, List, Optional, Tuple, Union
|
||||||
#
|
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
||||||
|
|
||||||
from typing import Any
|
from django.urls.resolvers import URLPattern, URLResolver
|
||||||
|
|
||||||
from django.urls.resolvers import URLResolver
|
|
||||||
from typing import Any, List, Tuple, Union
|
|
||||||
|
|
||||||
def i18n_patterns(
|
def i18n_patterns(
|
||||||
*urls: Any, prefix_default_language: bool = ...
|
*urls: Any, prefix_default_language: bool = ...
|
||||||
) -> Union[List[URLResolver], List[List[Any]]]: ...
|
) -> Union[List[URLPattern], List[List[Any]], List[URLResolver]]: ...
|
||||||
def is_language_prefix_patterns_used(urlconf: str) -> Tuple[bool, bool]: ...
|
def is_language_prefix_patterns_used(urlconf: str) -> Tuple[bool, bool]: ...
|
||||||
|
|
||||||
urlpatterns: Any
|
urlpatterns: Any
|
||||||
|
|||||||
@@ -1,10 +1,8 @@
|
|||||||
# Stubs for django.conf.urls.static (Python 3.6)
|
from typing import Any, Callable, List, Optional
|
||||||
#
|
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
||||||
|
|
||||||
from typing import Any
|
|
||||||
|
|
||||||
from django.urls.resolvers import URLPattern
|
from django.urls.resolvers import URLPattern
|
||||||
from typing import Callable, List
|
|
||||||
|
|
||||||
def static(prefix: str, view: Callable = ..., **kwargs: Any) -> List[URLPattern]: ...
|
|
||||||
|
def static(
|
||||||
|
prefix: str, view: Callable = ..., **kwargs: Any
|
||||||
|
) -> List[URLPattern]: ...
|
||||||
|
|||||||
@@ -1,27 +1,30 @@
|
|||||||
# Stubs for django.contrib.admin (Python 3.6)
|
from typing import Optional
|
||||||
#
|
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
||||||
|
|
||||||
from django.contrib.admin.decorators import register as register
|
from django.contrib.admin.decorators import register as register
|
||||||
from django.contrib.admin.filters import (
|
from django.contrib.admin.filters import \
|
||||||
AllValuesFieldListFilter as AllValuesFieldListFilter,
|
AllValuesFieldListFilter as AllValuesFieldListFilter
|
||||||
BooleanFieldListFilter as BooleanFieldListFilter,
|
from django.contrib.admin.filters import \
|
||||||
ChoicesFieldListFilter as ChoicesFieldListFilter,
|
BooleanFieldListFilter as BooleanFieldListFilter
|
||||||
DateFieldListFilter as DateFieldListFilter,
|
from django.contrib.admin.filters import \
|
||||||
FieldListFilter as FieldListFilter,
|
ChoicesFieldListFilter as ChoicesFieldListFilter
|
||||||
ListFilter as ListFilter,
|
from django.contrib.admin.filters import \
|
||||||
RelatedFieldListFilter as RelatedFieldListFilter,
|
DateFieldListFilter as DateFieldListFilter
|
||||||
RelatedOnlyFieldListFilter as RelatedOnlyFieldListFilter,
|
from django.contrib.admin.filters import FieldListFilter as FieldListFilter
|
||||||
SimpleListFilter as SimpleListFilter,
|
from django.contrib.admin.filters import ListFilter as ListFilter
|
||||||
)
|
from django.contrib.admin.filters import \
|
||||||
from django.contrib.admin.helpers import ACTION_CHECKBOX_NAME as ACTION_CHECKBOX_NAME
|
RelatedFieldListFilter as RelatedFieldListFilter
|
||||||
from django.contrib.admin.options import (
|
from django.contrib.admin.filters import \
|
||||||
HORIZONTAL as HORIZONTAL,
|
RelatedOnlyFieldListFilter as RelatedOnlyFieldListFilter
|
||||||
ModelAdmin as ModelAdmin,
|
from django.contrib.admin.filters import SimpleListFilter as SimpleListFilter
|
||||||
StackedInline as StackedInline,
|
from django.contrib.admin.helpers import \
|
||||||
TabularInline as TabularInline,
|
ACTION_CHECKBOX_NAME as ACTION_CHECKBOX_NAME
|
||||||
VERTICAL as VERTICAL,
|
from django.contrib.admin.options import HORIZONTAL as HORIZONTAL
|
||||||
)
|
from django.contrib.admin.options import VERTICAL as VERTICAL
|
||||||
from django.contrib.admin.sites import AdminSite as AdminSite, site as site
|
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: ...
|
def autodiscover() -> None: ...
|
||||||
|
|||||||
@@ -1,14 +1,11 @@
|
|||||||
# Stubs for django.contrib.admin.actions (Python 3.6)
|
from typing import Any, Optional
|
||||||
#
|
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
||||||
|
|
||||||
from typing import Any
|
|
||||||
|
|
||||||
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.query import QuerySet
|
from django.db.models.query import QuerySet
|
||||||
from django.template.response import TemplateResponse
|
from django.template.response import TemplateResponse
|
||||||
|
|
||||||
|
|
||||||
def delete_selected(
|
def delete_selected(
|
||||||
modeladmin: ModelAdmin, request: WSGIRequest, queryset: QuerySet
|
modeladmin: ModelAdmin, request: WSGIRequest, queryset: QuerySet
|
||||||
) -> TemplateResponse: ...
|
) -> Optional[TemplateResponse]: ...
|
||||||
|
|||||||
@@ -1,15 +1,26 @@
|
|||||||
# Stubs for django.contrib.admin.apps (Python 3.6)
|
from typing import Any, Optional
|
||||||
#
|
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
||||||
|
|
||||||
from django.apps import AppConfig
|
from django.apps import AppConfig
|
||||||
from typing import Any
|
|
||||||
|
|
||||||
class SimpleAdminConfig(AppConfig):
|
class SimpleAdminConfig(AppConfig):
|
||||||
|
apps: None
|
||||||
|
label: str
|
||||||
|
models: None
|
||||||
|
models_module: None
|
||||||
|
module: Any
|
||||||
|
path: str
|
||||||
default_site: str = ...
|
default_site: str = ...
|
||||||
name: str = ...
|
name: str = ...
|
||||||
verbose_name: Any = ...
|
verbose_name: Any = ...
|
||||||
def ready(self) -> None: ...
|
def ready(self) -> None: ...
|
||||||
|
|
||||||
class AdminConfig(SimpleAdminConfig):
|
class AdminConfig(SimpleAdminConfig):
|
||||||
|
apps: None
|
||||||
|
label: str
|
||||||
|
models: None
|
||||||
|
models_module: None
|
||||||
|
module: Any
|
||||||
|
name: str
|
||||||
|
path: str
|
||||||
def ready(self) -> None: ...
|
def ready(self) -> None: ...
|
||||||
|
|||||||
@@ -1,159 +1,28 @@
|
|||||||
# Stubs for django.contrib.admin.checks (Python 3.6)
|
from typing import Any, List, Optional
|
||||||
#
|
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
||||||
|
|
||||||
from typing import Any
|
from django.contrib.admin.options import (BaseModelAdmin, InlineModelAdmin,
|
||||||
|
ModelAdmin)
|
||||||
from django.contrib.admin.options import InlineModelAdmin, ModelAdmin, TabularInline
|
|
||||||
from django.contrib.auth.models import Group, User
|
|
||||||
from django.core.checks.messages import Error
|
from django.core.checks.messages import Error
|
||||||
from django.db.models.base import Model
|
|
||||||
from typing import Any, List, Tuple, Type, Union
|
|
||||||
|
|
||||||
def check_admin_app(app_configs: Any, **kwargs: Any): ...
|
|
||||||
def check_dependencies(**kwargs: Any): ...
|
def check_admin_app(app_configs: None, **kwargs: Any) -> List[str]: ...
|
||||||
|
def check_dependencies(**kwargs: Any) -> List[Error]: ...
|
||||||
|
|
||||||
class BaseModelAdminChecks:
|
class BaseModelAdminChecks:
|
||||||
def check(
|
def check(
|
||||||
self, admin_obj: Union[ModelAdmin, InlineModelAdmin], **kwargs: Any
|
self, admin_obj: BaseModelAdmin, **kwargs: Any
|
||||||
) -> List[Error]: ...
|
) -> List[Error]: ...
|
||||||
def _check_autocomplete_fields(
|
|
||||||
self, obj: Union[ModelAdmin, InlineModelAdmin]
|
|
||||||
) -> List[Any]: ...
|
|
||||||
def _check_autocomplete_fields_item(
|
|
||||||
self,
|
|
||||||
obj: Union[ModelAdmin, InlineModelAdmin],
|
|
||||||
model: Type[Model],
|
|
||||||
field_name: str,
|
|
||||||
label: str,
|
|
||||||
) -> List[Any]: ...
|
|
||||||
def _check_raw_id_fields(
|
|
||||||
self, obj: Union[ModelAdmin, InlineModelAdmin]
|
|
||||||
) -> List[Any]: ...
|
|
||||||
def _check_raw_id_fields_item(
|
|
||||||
self, obj: ModelAdmin, model: Type[Model], field_name: str, label: str
|
|
||||||
) -> List[Any]: ...
|
|
||||||
def _check_fields(self, obj: Union[ModelAdmin, InlineModelAdmin]) -> List[Any]: ...
|
|
||||||
def _check_fieldsets(self, obj: Union[ModelAdmin, InlineModelAdmin]) -> List[Any]: ...
|
|
||||||
def _check_fieldsets_item(
|
|
||||||
self,
|
|
||||||
obj: Union[ModelAdmin, InlineModelAdmin],
|
|
||||||
model: Type[Model],
|
|
||||||
fieldset: Any,
|
|
||||||
label: str,
|
|
||||||
seen_fields: List[str],
|
|
||||||
) -> List[Any]: ...
|
|
||||||
def _check_field_spec(
|
|
||||||
self,
|
|
||||||
obj: Union[ModelAdmin, InlineModelAdmin],
|
|
||||||
model: Type[Model],
|
|
||||||
fields: Union[str, Tuple[str, str, str, str], Tuple[str, str]],
|
|
||||||
label: str,
|
|
||||||
) -> List[Any]: ...
|
|
||||||
def _check_field_spec_item(
|
|
||||||
self,
|
|
||||||
obj: Union[ModelAdmin, TabularInline],
|
|
||||||
model: Type[Model],
|
|
||||||
field_name: str,
|
|
||||||
label: str,
|
|
||||||
) -> List[Any]: ...
|
|
||||||
def _check_exclude(self, obj: Union[ModelAdmin, InlineModelAdmin]) -> List[Any]: ...
|
|
||||||
def _check_form(self, obj: Union[ModelAdmin, InlineModelAdmin]) -> List[Any]: ...
|
|
||||||
def _check_filter_vertical(
|
|
||||||
self, obj: Union[ModelAdmin, InlineModelAdmin]
|
|
||||||
) -> List[Any]: ...
|
|
||||||
def _check_filter_horizontal(
|
|
||||||
self, obj: Union[ModelAdmin, InlineModelAdmin]
|
|
||||||
) -> List[Any]: ...
|
|
||||||
def _check_filter_item(
|
|
||||||
self, obj: ModelAdmin, model: Type[Union[Group, User]], field_name: str, label: str
|
|
||||||
) -> List[Any]: ...
|
|
||||||
def _check_radio_fields(
|
|
||||||
self, obj: Union[ModelAdmin, InlineModelAdmin]
|
|
||||||
) -> List[Any]: ...
|
|
||||||
def _check_radio_fields_key(
|
|
||||||
self, obj: Any, model: Any, field_name: Any, label: Any
|
|
||||||
): ...
|
|
||||||
def _check_radio_fields_value(self, obj: Any, val: Any, label: Any): ...
|
|
||||||
def _check_view_on_site_url(
|
|
||||||
self, obj: Union[ModelAdmin, InlineModelAdmin]
|
|
||||||
) -> List[Any]: ...
|
|
||||||
def _check_prepopulated_fields(
|
|
||||||
self, obj: Union[ModelAdmin, InlineModelAdmin]
|
|
||||||
) -> List[Any]: ...
|
|
||||||
def _check_prepopulated_fields_key(
|
|
||||||
self,
|
|
||||||
obj: Union[ModelAdmin, InlineModelAdmin],
|
|
||||||
model: Type[Model],
|
|
||||||
field_name: str,
|
|
||||||
label: str,
|
|
||||||
) -> List[Any]: ...
|
|
||||||
def _check_prepopulated_fields_value(
|
|
||||||
self,
|
|
||||||
obj: Union[ModelAdmin, InlineModelAdmin],
|
|
||||||
model: Type[Model],
|
|
||||||
val: Union[List[str], Tuple[str]],
|
|
||||||
label: str,
|
|
||||||
) -> List[Any]: ...
|
|
||||||
def _check_prepopulated_fields_value_item(
|
|
||||||
self,
|
|
||||||
obj: Union[ModelAdmin, TabularInline],
|
|
||||||
model: Type[Model],
|
|
||||||
field_name: str,
|
|
||||||
label: str,
|
|
||||||
) -> List[Any]: ...
|
|
||||||
def _check_ordering(self, obj: Union[ModelAdmin, InlineModelAdmin]) -> List[Any]: ...
|
|
||||||
def _check_ordering_item(
|
|
||||||
self, obj: ModelAdmin, model: Type[Model], field_name: str, label: str
|
|
||||||
) -> List[Any]: ...
|
|
||||||
def _check_readonly_fields(
|
|
||||||
self, obj: Union[ModelAdmin, InlineModelAdmin]
|
|
||||||
) -> List[Any]: ...
|
|
||||||
def _check_readonly_fields_item(
|
|
||||||
self,
|
|
||||||
obj: Union[ModelAdmin, TabularInline],
|
|
||||||
model: Type[Model],
|
|
||||||
field_name: str,
|
|
||||||
label: str,
|
|
||||||
) -> List[Any]: ...
|
|
||||||
|
|
||||||
class ModelAdminChecks(BaseModelAdminChecks):
|
class ModelAdminChecks(BaseModelAdminChecks):
|
||||||
def check(self, admin_obj: Any, **kwargs: Any): ...
|
def check(self, admin_obj: ModelAdmin, **kwargs: Any) -> List[Error]: ...
|
||||||
def _check_save_as(self, obj: Any): ...
|
|
||||||
def _check_save_on_top(self, obj: Any): ...
|
|
||||||
def _check_inlines(self, obj: Any): ...
|
|
||||||
def _check_inlines_item(self, obj: Any, model: Any, inline: Any, label: Any): ...
|
|
||||||
def _check_list_display(self, obj: Any): ...
|
|
||||||
def _check_list_display_item(self, obj: Any, model: Any, item: Any, label: Any): ...
|
|
||||||
def _check_list_display_links(self, obj: Any): ...
|
|
||||||
def _check_list_display_links_item(self, obj: Any, field_name: Any, label: Any): ...
|
|
||||||
def _check_list_filter(self, obj: Any): ...
|
|
||||||
def _check_list_filter_item(self, obj: Any, model: Any, item: Any, label: Any): ...
|
|
||||||
def _check_list_select_related(self, obj: Any): ...
|
|
||||||
def _check_list_per_page(self, obj: Any): ...
|
|
||||||
def _check_list_max_show_all(self, obj: Any): ...
|
|
||||||
def _check_list_editable(self, obj: Any): ...
|
|
||||||
def _check_list_editable_item(
|
|
||||||
self, obj: Any, model: Any, field_name: Any, label: Any
|
|
||||||
): ...
|
|
||||||
def _check_search_fields(self, obj: Any): ...
|
|
||||||
def _check_date_hierarchy(self, obj: Any): ...
|
|
||||||
def _check_action_permission_methods(self, obj: Any): ...
|
|
||||||
|
|
||||||
class InlineModelAdminChecks(BaseModelAdminChecks):
|
class InlineModelAdminChecks(BaseModelAdminChecks):
|
||||||
def check(self, inline_obj: Any, **kwargs: Any): ...
|
def check(
|
||||||
def _check_exclude_of_parent_model(
|
self, inline_obj: InlineModelAdmin, **kwargs: Any
|
||||||
self, obj: InlineModelAdmin, parent_model: Type[Model]
|
|
||||||
) -> List[Any]: ...
|
) -> List[Any]: ...
|
||||||
def _check_relation(
|
|
||||||
self, obj: InlineModelAdmin, parent_model: Type[Model]
|
|
||||||
) -> List[Any]: ...
|
|
||||||
def _check_extra(self, obj: InlineModelAdmin) -> List[Any]: ...
|
|
||||||
def _check_max_num(self, obj: InlineModelAdmin) -> List[Any]: ...
|
|
||||||
def _check_min_num(self, obj: InlineModelAdmin) -> List[Any]: ...
|
|
||||||
def _check_formset(self, obj: InlineModelAdmin) -> List[Any]: ...
|
|
||||||
def _check_has_add_permission(self, obj: InlineModelAdmin) -> None: ...
|
|
||||||
|
|
||||||
def must_be(type: Any, option: Any, obj: Any, id: Any): ...
|
def must_be(type: Any, option: Any, obj: Any, id: Any): ...
|
||||||
def must_inherit_from(parent: Any, option: Any, obj: Any, id: Any): ...
|
def must_inherit_from(parent: Any, option: Any, obj: Any, id: Any): ...
|
||||||
def refer_to_missing_field(field: Any, option: Any, model: Any, obj: Any, id: Any): ...
|
def refer_to_missing_field(
|
||||||
|
field: Any, option: Any, model: Any, obj: Any, id: Any
|
||||||
|
): ...
|
||||||
|
|||||||
@@ -1,9 +1,4 @@
|
|||||||
# Stubs for django.contrib.admin.decorators (Python 3.6)
|
from typing import Any, Callable, Optional
|
||||||
#
|
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
||||||
|
|
||||||
from typing import Any, Optional
|
|
||||||
|
|
||||||
from typing import Callable
|
|
||||||
|
|
||||||
def register(*models: Any, site: Optional[Any] = ...) -> Callable: ...
|
def register(*models: Any, site: Optional[Any] = ...) -> Callable: ...
|
||||||
|
|||||||
@@ -1,17 +1,14 @@
|
|||||||
# Stubs for django.contrib.admin.filters (Python 3.6)
|
from typing import Any, Callable, Dict, List, Optional, Tuple, Type, Union
|
||||||
#
|
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
||||||
|
|
||||||
from typing import Any
|
|
||||||
|
|
||||||
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 import BooleanField, DateField, Field
|
||||||
from django.db.models.fields.related import ForeignKey, ManyToManyField
|
from django.db.models.fields.mixins import FieldCacheMixin
|
||||||
|
from django.db.models.fields.related import RelatedField
|
||||||
from django.db.models.fields.reverse_related import ForeignObjectRel
|
from django.db.models.fields.reverse_related import ForeignObjectRel
|
||||||
from django.db.models.query import QuerySet
|
from django.db.models.query import QuerySet
|
||||||
from typing import Callable, Dict, List, Optional, Tuple, Type, Union
|
|
||||||
|
|
||||||
class ListFilter:
|
class ListFilter:
|
||||||
title: Any = ...
|
title: Any = ...
|
||||||
@@ -46,14 +43,12 @@ class SimpleListFilter(ListFilter):
|
|||||||
def choices(self, changelist: Any) -> None: ...
|
def choices(self, changelist: Any) -> None: ...
|
||||||
|
|
||||||
class FieldListFilter(ListFilter):
|
class FieldListFilter(ListFilter):
|
||||||
_field_list_filters: Any = ...
|
|
||||||
_take_priority_index: int = ...
|
|
||||||
field: Any = ...
|
field: Any = ...
|
||||||
field_path: Any = ...
|
field_path: Any = ...
|
||||||
title: Any = ...
|
title: Any = ...
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
field: Union[ForeignObjectRel, Field],
|
field: Union[Field, reverse_related.ForeignObjectRel],
|
||||||
request: WSGIRequest,
|
request: WSGIRequest,
|
||||||
params: Dict[str, str],
|
params: Dict[str, str],
|
||||||
model: Type[Model],
|
model: Type[Model],
|
||||||
@@ -61,18 +56,28 @@ class FieldListFilter(ListFilter):
|
|||||||
field_path: str,
|
field_path: str,
|
||||||
) -> None: ...
|
) -> None: ...
|
||||||
def has_output(self) -> bool: ...
|
def has_output(self) -> bool: ...
|
||||||
def queryset(self, request: WSGIRequest, queryset: QuerySet) -> QuerySet: ...
|
def queryset(
|
||||||
|
self, request: WSGIRequest, queryset: QuerySet
|
||||||
|
) -> QuerySet: ...
|
||||||
@classmethod
|
@classmethod
|
||||||
def register(
|
def register(
|
||||||
cls,
|
cls,
|
||||||
test: Callable,
|
test: Callable,
|
||||||
list_filter_class: Type[FieldListFilter],
|
list_filter_class: Type[
|
||||||
|
Union[
|
||||||
|
BooleanFieldListFilter,
|
||||||
|
AllValuesFieldListFilter,
|
||||||
|
DateFieldListFilter,
|
||||||
|
RelatedFieldListFilter,
|
||||||
|
ChoicesFieldListFilter,
|
||||||
|
]
|
||||||
|
],
|
||||||
take_priority: bool = ...,
|
take_priority: bool = ...,
|
||||||
) -> None: ...
|
) -> None: ...
|
||||||
@classmethod
|
@classmethod
|
||||||
def create(
|
def create(
|
||||||
cls,
|
cls,
|
||||||
field: Union[ForeignObjectRel, Field],
|
field: Union[Field, reverse_related.ForeignObjectRel],
|
||||||
request: WSGIRequest,
|
request: WSGIRequest,
|
||||||
params: Dict[str, str],
|
params: Dict[str, str],
|
||||||
model: Type[Model],
|
model: Type[Model],
|
||||||
@@ -81,17 +86,20 @@ class FieldListFilter(ListFilter):
|
|||||||
) -> FieldListFilter: ...
|
) -> FieldListFilter: ...
|
||||||
|
|
||||||
class RelatedFieldListFilter(FieldListFilter):
|
class RelatedFieldListFilter(FieldListFilter):
|
||||||
lookup_kwarg: Any = ...
|
field: django.db.models.fields.related.ForeignKey
|
||||||
lookup_kwarg_isnull: Any = ...
|
field_path: str
|
||||||
lookup_val: Any = ...
|
used_parameters: Dict[Any, Any]
|
||||||
lookup_val_isnull: Any = ...
|
lookup_kwarg: str = ...
|
||||||
|
lookup_kwarg_isnull: str = ...
|
||||||
|
lookup_val: None = ...
|
||||||
|
lookup_val_isnull: None = ...
|
||||||
lookup_choices: Any = ...
|
lookup_choices: Any = ...
|
||||||
lookup_title: Any = ...
|
lookup_title: Any = ...
|
||||||
title: Any = ...
|
title: str = ...
|
||||||
empty_value_display: Any = ...
|
empty_value_display: Any = ...
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
field: Union[ForeignObjectRel, ManyToManyField, ForeignKey],
|
field: FieldCacheMixin,
|
||||||
request: WSGIRequest,
|
request: WSGIRequest,
|
||||||
params: Dict[str, str],
|
params: Dict[str, str],
|
||||||
model: Type[Model],
|
model: Type[Model],
|
||||||
@@ -104,7 +112,7 @@ class RelatedFieldListFilter(FieldListFilter):
|
|||||||
def expected_parameters(self) -> List[str]: ...
|
def expected_parameters(self) -> List[str]: ...
|
||||||
def field_choices(
|
def field_choices(
|
||||||
self,
|
self,
|
||||||
field: Union[ForeignObjectRel, ManyToManyField, ForeignKey],
|
field: FieldCacheMixin,
|
||||||
request: WSGIRequest,
|
request: WSGIRequest,
|
||||||
model_admin: ModelAdmin,
|
model_admin: ModelAdmin,
|
||||||
) -> Union[List[Tuple[str, str]], List[Tuple[int, str]]]: ...
|
) -> Union[List[Tuple[str, str]], List[Tuple[int, str]]]: ...
|
||||||
@@ -128,10 +136,14 @@ class BooleanFieldListFilter(FieldListFilter):
|
|||||||
def choices(self, changelist: Any) -> None: ...
|
def choices(self, changelist: Any) -> None: ...
|
||||||
|
|
||||||
class ChoicesFieldListFilter(FieldListFilter):
|
class ChoicesFieldListFilter(FieldListFilter):
|
||||||
lookup_kwarg: Any = ...
|
field: django.db.models.fields.IntegerField
|
||||||
lookup_kwarg_isnull: Any = ...
|
field_path: str
|
||||||
lookup_val: Any = ...
|
title: str
|
||||||
lookup_val_isnull: Any = ...
|
used_parameters: Dict[Any, Any]
|
||||||
|
lookup_kwarg: str = ...
|
||||||
|
lookup_kwarg_isnull: str = ...
|
||||||
|
lookup_val: None = ...
|
||||||
|
lookup_val_isnull: None = ...
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
field: Field,
|
field: Field,
|
||||||
@@ -164,12 +176,16 @@ class DateFieldListFilter(FieldListFilter):
|
|||||||
def choices(self, changelist: Any) -> None: ...
|
def choices(self, changelist: Any) -> None: ...
|
||||||
|
|
||||||
class AllValuesFieldListFilter(FieldListFilter):
|
class AllValuesFieldListFilter(FieldListFilter):
|
||||||
lookup_kwarg: Any = ...
|
field: django.db.models.fields.CharField
|
||||||
lookup_kwarg_isnull: Any = ...
|
field_path: str
|
||||||
lookup_val: Any = ...
|
title: str
|
||||||
lookup_val_isnull: Any = ...
|
used_parameters: Dict[Any, Any]
|
||||||
empty_value_display: Any = ...
|
lookup_kwarg: str = ...
|
||||||
lookup_choices: Any = ...
|
lookup_kwarg_isnull: str = ...
|
||||||
|
lookup_val: None = ...
|
||||||
|
lookup_val_isnull: None = ...
|
||||||
|
empty_value_display: django.utils.safestring.SafeText = ...
|
||||||
|
lookup_choices: django.db.models.query.QuerySet = ...
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
field: Field,
|
field: Field,
|
||||||
@@ -183,9 +199,14 @@ class AllValuesFieldListFilter(FieldListFilter):
|
|||||||
def choices(self, changelist: Any) -> None: ...
|
def choices(self, changelist: Any) -> None: ...
|
||||||
|
|
||||||
class RelatedOnlyFieldListFilter(RelatedFieldListFilter):
|
class RelatedOnlyFieldListFilter(RelatedFieldListFilter):
|
||||||
|
field: django.db.models.fields.related.ForeignKey
|
||||||
|
field_path: str
|
||||||
|
lookup_kwarg: str
|
||||||
|
lookup_kwarg_isnull: str
|
||||||
|
lookup_val: None
|
||||||
|
lookup_val_isnull: None
|
||||||
|
title: str
|
||||||
|
used_parameters: Dict[Any, Any]
|
||||||
def field_choices(
|
def field_choices(
|
||||||
self,
|
self, field: RelatedField, request: WSGIRequest, model_admin: ModelAdmin
|
||||||
field: Union[ManyToManyField, ForeignKey],
|
|
||||||
request: WSGIRequest,
|
|
||||||
model_admin: ModelAdmin,
|
|
||||||
) -> Union[List[Tuple[str, str]], List[Tuple[int, str]]]: ...
|
) -> Union[List[Tuple[str, str]], List[Tuple[int, str]]]: ...
|
||||||
|
|||||||
@@ -1,4 +1,34 @@
|
|||||||
|
from typing import Any, Optional
|
||||||
|
|
||||||
|
from django.contrib.auth.forms import AuthenticationForm, PasswordChangeForm
|
||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User
|
||||||
|
|
||||||
class AdminAuthenticationForm:
|
|
||||||
|
class AdminAuthenticationForm(AuthenticationForm):
|
||||||
|
auto_id: str
|
||||||
|
data: Dict[str, str]
|
||||||
|
empty_permitted: bool
|
||||||
|
error_class: Type[django.forms.utils.ErrorList]
|
||||||
|
fields: collections.OrderedDict
|
||||||
|
files: Dict[Any, Any]
|
||||||
|
initial: Dict[Any, Any]
|
||||||
|
is_bound: bool
|
||||||
|
label_suffix: str
|
||||||
|
request: None
|
||||||
|
user_cache: None
|
||||||
|
error_messages: Any = ...
|
||||||
|
required_css_class: str = ...
|
||||||
def confirm_login_allowed(self, user: User) -> None: ...
|
def confirm_login_allowed(self, user: User) -> None: ...
|
||||||
|
|
||||||
|
class AdminPasswordChangeForm(PasswordChangeForm):
|
||||||
|
auto_id: str
|
||||||
|
data: Dict[Any, Any]
|
||||||
|
empty_permitted: bool
|
||||||
|
error_class: Type[django.forms.utils.ErrorList]
|
||||||
|
fields: collections.OrderedDict
|
||||||
|
files: Dict[Any, Any]
|
||||||
|
initial: Dict[Any, Any]
|
||||||
|
is_bound: bool
|
||||||
|
label_suffix: str
|
||||||
|
user: django.utils.functional.SimpleLazyObject
|
||||||
|
required_css_class: str = ...
|
||||||
|
|||||||
@@ -1,20 +1,24 @@
|
|||||||
# Stubs for django.contrib.admin.helpers (Python 3.6)
|
from typing import Any, Callable, Dict, Iterator, List, Optional, Tuple, Union
|
||||||
#
|
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
||||||
|
|
||||||
from django import forms
|
from django import forms
|
||||||
from typing import Any, Optional
|
|
||||||
|
|
||||||
from django.contrib.auth.forms import AdminPasswordChangeForm
|
from django.contrib.auth.forms import AdminPasswordChangeForm
|
||||||
from django.db.models.fields import AutoField
|
from django.db.models.fields import AutoField
|
||||||
from django.forms.utils import ErrorDict
|
from django.forms.utils import ErrorDict
|
||||||
from django.forms.widgets import Media
|
from django.forms.widgets import Media
|
||||||
from django.utils.safestring import SafeText
|
from django.utils.safestring import SafeText
|
||||||
from typing import Any, Callable, Dict, Iterator, List, Tuple, Union
|
|
||||||
|
|
||||||
ACTION_CHECKBOX_NAME: str
|
ACTION_CHECKBOX_NAME: str
|
||||||
|
|
||||||
class ActionForm(forms.Form):
|
class ActionForm(forms.Form):
|
||||||
|
auto_id: None
|
||||||
|
data: Dict[Any, Any]
|
||||||
|
empty_permitted: bool
|
||||||
|
error_class: Type[django.forms.utils.ErrorList]
|
||||||
|
fields: collections.OrderedDict
|
||||||
|
files: Dict[Any, Any]
|
||||||
|
initial: Dict[Any, Any]
|
||||||
|
is_bound: bool
|
||||||
|
label_suffix: str
|
||||||
action: Any = ...
|
action: Any = ...
|
||||||
select_across: Any = ...
|
select_across: Any = ...
|
||||||
|
|
||||||
@@ -73,13 +77,13 @@ class Fieldline:
|
|||||||
readonly_fields: Optional[Any] = ...,
|
readonly_fields: Optional[Any] = ...,
|
||||||
model_admin: Optional[Any] = ...,
|
model_admin: Optional[Any] = ...,
|
||||||
) -> None: ...
|
) -> None: ...
|
||||||
def __iter__(self) -> Iterator[Union[AdminField, AdminReadonlyField]]: ...
|
def __iter__(self) -> Iterator[Union[AdminReadonlyField, AdminField]]: ...
|
||||||
def errors(self) -> SafeText: ...
|
def errors(self) -> SafeText: ...
|
||||||
|
|
||||||
class AdminField:
|
class AdminField:
|
||||||
field: Any = ...
|
field: django.forms.boundfield.BoundField = ...
|
||||||
is_first: Any = ...
|
is_first: bool = ...
|
||||||
is_checkbox: Any = ...
|
is_checkbox: bool = ...
|
||||||
is_readonly: bool = ...
|
is_readonly: bool = ...
|
||||||
def __init__(self, form: Any, field: Any, is_first: Any) -> None: ...
|
def __init__(self, form: Any, field: Any, is_first: Any) -> None: ...
|
||||||
def label_tag(self) -> SafeText: ...
|
def label_tag(self) -> SafeText: ...
|
||||||
@@ -94,7 +98,11 @@ class AdminReadonlyField:
|
|||||||
is_readonly: bool = ...
|
is_readonly: bool = ...
|
||||||
empty_value_display: Any = ...
|
empty_value_display: Any = ...
|
||||||
def __init__(
|
def __init__(
|
||||||
self, form: Any, field: Any, is_first: Any, model_admin: Optional[Any] = ...
|
self,
|
||||||
|
form: Any,
|
||||||
|
field: Any,
|
||||||
|
is_first: Any,
|
||||||
|
model_admin: Optional[Any] = ...,
|
||||||
) -> None: ...
|
) -> None: ...
|
||||||
def label_tag(self) -> SafeText: ...
|
def label_tag(self) -> SafeText: ...
|
||||||
def contents(self) -> SafeText: ...
|
def contents(self) -> SafeText: ...
|
||||||
@@ -130,7 +138,7 @@ class InlineAdminFormSet:
|
|||||||
@property
|
@property
|
||||||
def forms(self): ...
|
def forms(self): ...
|
||||||
@property
|
@property
|
||||||
def non_form_errors(self): ...
|
def non_form_errors(self) -> Callable: ...
|
||||||
@property
|
@property
|
||||||
def media(self) -> Media: ...
|
def media(self) -> Media: ...
|
||||||
|
|
||||||
@@ -164,4 +172,6 @@ class InlineFieldset(Fieldset):
|
|||||||
def __iter__(self) -> Iterator[Fieldline]: ...
|
def __iter__(self) -> Iterator[Fieldline]: ...
|
||||||
|
|
||||||
class AdminErrorList(forms.utils.ErrorList):
|
class AdminErrorList(forms.utils.ErrorList):
|
||||||
|
data: List[Any]
|
||||||
|
error_class: str
|
||||||
def __init__(self, form: Any, inline_formsets: Any) -> None: ...
|
def __init__(self, form: Any, inline_formsets: Any) -> None: ...
|
||||||
|
|||||||
@@ -1,20 +1,58 @@
|
|||||||
from typing import Any
|
from typing import Any, Dict, List, Optional, Union
|
||||||
|
from uuid import UUID
|
||||||
|
|
||||||
class LogEntry:
|
from django.db import models
|
||||||
def __str__(self) -> str: ...
|
from django.db.models.base import Model
|
||||||
def get_admin_url(self) -> str: ...
|
|
||||||
def get_change_message(self) -> str: ...
|
|
||||||
def is_addition(self) -> bool: ...
|
|
||||||
def is_change(self) -> bool: ...
|
|
||||||
def is_deletion(self) -> bool: ...
|
|
||||||
|
|
||||||
class LogEntryManager:
|
ADDITION: int
|
||||||
|
CHANGE: int
|
||||||
|
DELETION: int
|
||||||
|
ACTION_FLAG_CHOICES: Any
|
||||||
|
|
||||||
|
class LogEntryManager(models.Manager):
|
||||||
|
creation_counter: int
|
||||||
|
model: None
|
||||||
|
name: None
|
||||||
|
use_in_migrations: bool = ...
|
||||||
def log_action(
|
def log_action(
|
||||||
self,
|
self,
|
||||||
user_id: int,
|
user_id: int,
|
||||||
content_type_id: int,
|
content_type_id: int,
|
||||||
object_id: int,
|
object_id: Union[str, UUID, int],
|
||||||
object_repr: str,
|
object_repr: str,
|
||||||
action_flag: int,
|
action_flag: int,
|
||||||
change_message: Any = ...,
|
change_message: Union[
|
||||||
|
List[Dict[str, Dict[str, Union[str, List[str]]]]],
|
||||||
|
Dict[str, Dict[str, List[str]]],
|
||||||
|
str,
|
||||||
|
List[
|
||||||
|
Union[
|
||||||
|
Dict[str, Dict[str, List[str]]], Dict[str, Dict[str, str]]
|
||||||
|
]
|
||||||
|
],
|
||||||
|
] = ...,
|
||||||
) -> LogEntry: ...
|
) -> LogEntry: ...
|
||||||
|
|
||||||
|
class LogEntry(models.Model):
|
||||||
|
content_type_id: int
|
||||||
|
id: None
|
||||||
|
user_id: int
|
||||||
|
action_time: datetime.datetime = ...
|
||||||
|
user: Any = ...
|
||||||
|
content_type: Any = ...
|
||||||
|
object_id: str = ...
|
||||||
|
object_repr: str = ...
|
||||||
|
action_flag: int = ...
|
||||||
|
change_message: str = ...
|
||||||
|
objects: Any = ...
|
||||||
|
class Meta:
|
||||||
|
verbose_name: Any = ...
|
||||||
|
verbose_name_plural: Any = ...
|
||||||
|
db_table: str = ...
|
||||||
|
ordering: Any = ...
|
||||||
|
def is_addition(self) -> bool: ...
|
||||||
|
def is_change(self) -> bool: ...
|
||||||
|
def is_deletion(self) -> bool: ...
|
||||||
|
def get_change_message(self) -> str: ...
|
||||||
|
def get_edited_object(self) -> Model: ...
|
||||||
|
def get_admin_url(self) -> Optional[str]: ...
|
||||||
|
|||||||
@@ -1,26 +1,32 @@
|
|||||||
# Stubs for django.contrib.admin.options (Python 3.6)
|
from collections import OrderedDict
|
||||||
#
|
from typing import Any, Dict, List, Optional, Set, Tuple, Type, Union
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
||||||
|
|
||||||
from typing import Any, Optional
|
|
||||||
|
|
||||||
|
from django.contrib.admin.models import LogEntry
|
||||||
|
from django.contrib.admin.views.main import ChangeList
|
||||||
|
from django.contrib.auth.models import User
|
||||||
|
from django.contrib.contenttypes.models import ContentType
|
||||||
from django.core.checks.messages import Error
|
from django.core.checks.messages import Error
|
||||||
from django.core.handlers.wsgi import WSGIRequest
|
from django.core.handlers.wsgi import WSGIRequest
|
||||||
|
from django.core.paginator import Paginator
|
||||||
from django.db.models.base import Model
|
from django.db.models.base import Model
|
||||||
from django.db.models.fields import Field
|
from django.db.models.fields import CharField, Field
|
||||||
from django.db.models.fields.related import ForeignKey, ManyToManyField
|
from django.db.models.fields.related import ForeignKey
|
||||||
from django.db.models.query import QuerySet
|
from django.db.models.query import QuerySet
|
||||||
from django.forms.fields import Field, TypedChoiceField
|
from django.forms.fields import Field, TypedChoiceField
|
||||||
from django.forms.models import ModelChoiceField, ModelMultipleChoiceField
|
from django.forms.models import ModelChoiceField
|
||||||
|
from django.forms.widgets import Media
|
||||||
|
from django.http.response import HttpResponse, HttpResponseRedirect
|
||||||
|
from django.template.response import TemplateResponse
|
||||||
from django.utils.safestring import SafeText
|
from django.utils.safestring import SafeText
|
||||||
from typing import Any, Callable, Dict, List, Optional, Tuple, Union
|
|
||||||
|
|
||||||
IS_POPUP_VAR: str
|
IS_POPUP_VAR: str
|
||||||
TO_FIELD_VAR: str
|
TO_FIELD_VAR: str
|
||||||
HORIZONTAL: Any
|
HORIZONTAL: Any
|
||||||
VERTICAL: Any
|
VERTICAL: Any
|
||||||
|
|
||||||
def get_content_type_for_model(obj: Any): ...
|
def get_content_type_for_model(
|
||||||
|
obj: Union[Type[Model], Model]
|
||||||
|
) -> ContentType: ...
|
||||||
def get_ul_class(radio_style: Any): ...
|
def get_ul_class(radio_style: Any): ...
|
||||||
|
|
||||||
class IncorrectLookupParameters(Exception): ...
|
class IncorrectLookupParameters(Exception): ...
|
||||||
@@ -49,52 +55,88 @@ class BaseModelAdmin:
|
|||||||
def check(self, **kwargs: Any) -> List[Error]: ...
|
def check(self, **kwargs: Any) -> List[Error]: ...
|
||||||
def __init__(self) -> None: ...
|
def __init__(self) -> None: ...
|
||||||
def formfield_for_dbfield(
|
def formfield_for_dbfield(
|
||||||
self, db_field: Field, request: object, **kwargs: Any
|
self, db_field: Field, request: WSGIRequest, **kwargs: Any
|
||||||
) -> Optional[Field]: ...
|
) -> Optional[Field]: ...
|
||||||
def formfield_for_choice_field(
|
def formfield_for_choice_field(
|
||||||
self, db_field: Field, request: object, **kwargs: Any
|
self, db_field: CharField, request: WSGIRequest, **kwargs: Any
|
||||||
) -> TypedChoiceField: ...
|
) -> TypedChoiceField: ...
|
||||||
def get_field_queryset(
|
def get_field_queryset(
|
||||||
self, db: None, db_field: Union[ManyToManyField, ForeignKey], request: object
|
self, db: None, db_field: ForeignKey, request: WSGIRequest
|
||||||
) -> Optional[QuerySet]: ...
|
) -> None: ...
|
||||||
def formfield_for_foreignkey(
|
def formfield_for_foreignkey(
|
||||||
self, db_field: ForeignKey, request: object, **kwargs: Any
|
self, db_field: ForeignKey, request: WSGIRequest, **kwargs: Any
|
||||||
) -> Optional[ModelChoiceField]: ...
|
) -> Optional[ModelChoiceField]: ...
|
||||||
def formfield_for_manytomany(
|
def formfield_for_manytomany(
|
||||||
self, db_field: ManyToManyField, request: WSGIRequest, **kwargs: Any
|
self, db_field: Any, request: Any, **kwargs: Any
|
||||||
) -> ModelMultipleChoiceField: ...
|
): ...
|
||||||
def get_autocomplete_fields(self, request: object) -> Tuple: ...
|
def get_autocomplete_fields(self, request: WSGIRequest) -> Tuple: ...
|
||||||
def get_view_on_site_url(self, obj: Optional[Model] = ...) -> Optional[str]: ...
|
def get_view_on_site_url(self, obj: Optional[Model] = ...) -> None: ...
|
||||||
def get_empty_value_display(self) -> SafeText: ...
|
def get_empty_value_display(self) -> SafeText: ...
|
||||||
def get_exclude(self, request: object, obj: Optional[Model] = ...) -> None: ...
|
def get_exclude(
|
||||||
|
self, request: WSGIRequest, obj: Optional[Model] = ...
|
||||||
|
) -> None: ...
|
||||||
def get_fields(
|
def get_fields(
|
||||||
self, request: object, obj: Optional[Model] = ...
|
self, request: WSGIRequest, obj: Optional[Model] = ...
|
||||||
) -> Union[List[str], List[Union[str, Callable]]]: ...
|
) -> List[str]: ...
|
||||||
def get_fieldsets(self, request: WSGIRequest, obj: Optional[Model] = ...) -> Any: ...
|
def get_fieldsets(
|
||||||
def get_ordering(self, request: WSGIRequest) -> Union[List[str], Tuple]: ...
|
self, request: WSGIRequest, obj: Optional[Model] = ...
|
||||||
|
) -> Union[
|
||||||
|
Tuple[Tuple[None, Dict[str, Tuple[Tuple[str, str]]]]],
|
||||||
|
List[Tuple[None, Dict[str, List[str]]]],
|
||||||
|
]: ...
|
||||||
|
def get_ordering(self, request: WSGIRequest) -> Tuple: ...
|
||||||
def get_readonly_fields(
|
def get_readonly_fields(
|
||||||
self, request: object, obj: Optional[Model] = ...
|
self, request: WSGIRequest, obj: Optional[Model] = ...
|
||||||
) -> Union[List[str], Tuple]: ...
|
) -> Tuple: ...
|
||||||
def get_prepopulated_fields(
|
def get_prepopulated_fields(
|
||||||
self, request: WSGIRequest, obj: Optional[Model] = ...
|
self, request: WSGIRequest, obj: Optional[Model] = ...
|
||||||
) -> Dict[str, Tuple[str]]: ...
|
) -> Dict[Any, Any]: ...
|
||||||
def get_queryset(self, request: object) -> QuerySet: ...
|
def get_queryset(self, request: WSGIRequest) -> QuerySet: ...
|
||||||
def get_sortable_by(self, request: WSGIRequest) -> Union[List[str], Tuple]: ...
|
def get_sortable_by(self, request: WSGIRequest) -> Tuple[str]: ...
|
||||||
def lookup_allowed(self, lookup: Any, value: Any): ...
|
def lookup_allowed(self, lookup: Any, value: Any): ...
|
||||||
def to_field_allowed(self, request: Any, to_field: Any): ...
|
def to_field_allowed(self, request: WSGIRequest, to_field: str) -> bool: ...
|
||||||
def has_add_permission(self, request: WSGIRequest) -> bool: ...
|
def has_add_permission(self, request: WSGIRequest) -> bool: ...
|
||||||
def has_change_permission(
|
def has_change_permission(
|
||||||
self, request: object, obj: Optional[Model] = ...
|
self, request: WSGIRequest, obj: Optional[Model] = ...
|
||||||
) -> bool: ...
|
) -> bool: ...
|
||||||
def has_delete_permission(
|
def has_delete_permission(
|
||||||
self, request: object, obj: Optional[Model] = ...
|
self, request: WSGIRequest, obj: Optional[Model] = ...
|
||||||
) -> bool: ...
|
) -> bool: ...
|
||||||
def has_view_permission(
|
def has_view_permission(
|
||||||
self, request: WSGIRequest, obj: Optional[Model] = ...
|
self, request: WSGIRequest, obj: Optional[Model] = ...
|
||||||
) -> bool: ...
|
) -> bool: ...
|
||||||
def has_module_permission(self, request: object) -> bool: ...
|
def has_module_permission(self, request: Any): ...
|
||||||
|
|
||||||
class ModelAdmin(BaseModelAdmin):
|
class ModelAdmin(BaseModelAdmin):
|
||||||
|
formfield_overrides: Dict[
|
||||||
|
Type[
|
||||||
|
Union[
|
||||||
|
django.db.models.fields.DateField,
|
||||||
|
django.db.models.fields.TimeField,
|
||||||
|
django.db.models.fields.TextField,
|
||||||
|
django.db.models.fields.IntegerField,
|
||||||
|
django.db.models.fields.CharField,
|
||||||
|
django.db.models.fields.files.FileField,
|
||||||
|
]
|
||||||
|
],
|
||||||
|
Dict[
|
||||||
|
str,
|
||||||
|
Type[
|
||||||
|
Union[
|
||||||
|
django.forms.fields.SplitDateTimeField,
|
||||||
|
django.contrib.admin.widgets.AdminSplitDateTime,
|
||||||
|
django.contrib.admin.widgets.AdminDateWidget,
|
||||||
|
django.contrib.admin.widgets.AdminTimeWidget,
|
||||||
|
django.contrib.admin.widgets.AdminTextareaWidget,
|
||||||
|
django.contrib.admin.widgets.AdminURLFieldWidget,
|
||||||
|
django.contrib.admin.widgets.AdminIntegerFieldWidget,
|
||||||
|
django.contrib.admin.widgets.AdminTextInputWidget,
|
||||||
|
django.contrib.admin.widgets.AdminFileWidget,
|
||||||
|
django.contrib.admin.widgets.AdminEmailInputWidget,
|
||||||
|
]
|
||||||
|
],
|
||||||
|
],
|
||||||
|
]
|
||||||
list_display: Any = ...
|
list_display: Any = ...
|
||||||
list_display_links: Any = ...
|
list_display_links: Any = ...
|
||||||
list_filter: Any = ...
|
list_filter: Any = ...
|
||||||
@@ -123,69 +165,101 @@ class ModelAdmin(BaseModelAdmin):
|
|||||||
actions_on_bottom: bool = ...
|
actions_on_bottom: bool = ...
|
||||||
actions_selection_counter: bool = ...
|
actions_selection_counter: bool = ...
|
||||||
checks_class: Any = ...
|
checks_class: Any = ...
|
||||||
model: Any = ...
|
model: Type[django.db.models.base.Model] = ...
|
||||||
opts: Any = ...
|
opts: django.db.models.options.Options = ...
|
||||||
admin_site: Any = ...
|
admin_site: django.contrib.admin.sites.AdminSite = ...
|
||||||
def __init__(self, model: Any, admin_site: Any) -> None: ...
|
def __init__(self, model: Any, admin_site: Any) -> None: ...
|
||||||
def __str__(self): ...
|
def get_inline_instances(
|
||||||
def get_inline_instances(self, request: Any, obj: Optional[Any] = ...): ...
|
self, request: WSGIRequest, obj: Optional[Model] = ...
|
||||||
|
) -> List[InlineModelAdmin]: ...
|
||||||
def get_urls(self): ...
|
def get_urls(self): ...
|
||||||
@property
|
@property
|
||||||
def urls(self): ...
|
def urls(self): ...
|
||||||
@property
|
@property
|
||||||
def media(self): ...
|
def media(self) -> Media: ...
|
||||||
def get_model_perms(self, request: Any): ...
|
def get_model_perms(self, request: Any): ...
|
||||||
def _get_form_for_get_fields(self, request: Any, obj: Any): ...
|
|
||||||
def get_form(
|
def get_form(
|
||||||
self, request: Any, obj: Optional[Any] = ..., change: bool = ..., **kwargs: Any
|
|
||||||
): ...
|
|
||||||
def get_changelist(self, request: Any, **kwargs: Any): ...
|
|
||||||
def get_changelist_instance(self, request: Any): ...
|
|
||||||
def get_object(self, request: Any, object_id: Any, from_field: Optional[Any] = ...): ...
|
|
||||||
def get_changelist_form(self, request: Any, **kwargs: Any): ...
|
|
||||||
def get_changelist_formset(self, request: Any, **kwargs: Any): ...
|
|
||||||
def get_formsets_with_inlines(self, request: Any, obj: Optional[Any] = ...) -> None: ...
|
|
||||||
def get_paginator(
|
|
||||||
self,
|
self,
|
||||||
request: Any,
|
request: Any,
|
||||||
queryset: Any,
|
obj: Optional[Any] = ...,
|
||||||
per_page: Any,
|
change: bool = ...,
|
||||||
|
**kwargs: Any
|
||||||
|
): ...
|
||||||
|
def get_changelist(
|
||||||
|
self, request: WSGIRequest, **kwargs: Any
|
||||||
|
) -> Type[ChangeList]: ...
|
||||||
|
def get_changelist_instance(self, request: WSGIRequest) -> ChangeList: ...
|
||||||
|
def get_object(
|
||||||
|
self, request: WSGIRequest, object_id: str, from_field: None = ...
|
||||||
|
) -> Optional[Model]: ...
|
||||||
|
def get_changelist_form(self, request: Any, **kwargs: Any): ...
|
||||||
|
def get_changelist_formset(self, request: Any, **kwargs: Any): ...
|
||||||
|
def get_formsets_with_inlines(
|
||||||
|
self, request: WSGIRequest, obj: Optional[Model] = ...
|
||||||
|
) -> None: ...
|
||||||
|
def get_paginator(
|
||||||
|
self,
|
||||||
|
request: WSGIRequest,
|
||||||
|
queryset: QuerySet,
|
||||||
|
per_page: int,
|
||||||
orphans: int = ...,
|
orphans: int = ...,
|
||||||
allow_empty_first_page: bool = ...,
|
allow_empty_first_page: bool = ...,
|
||||||
): ...
|
) -> Paginator: ...
|
||||||
def log_addition(self, request: Any, object: Any, message: Any): ...
|
def log_addition(
|
||||||
def log_change(self, request: Any, object: Any, message: Any): ...
|
self,
|
||||||
def log_deletion(self, request: Any, object: Any, object_repr: Any): ...
|
request: WSGIRequest,
|
||||||
def action_checkbox(self, obj: Any): ...
|
object: Model,
|
||||||
def _get_base_actions(self): ...
|
message: List[Dict[str, Dict[str, str]]],
|
||||||
def _filter_actions_by_permissions(self, request: Any, actions: Any): ...
|
) -> LogEntry: ...
|
||||||
def get_actions(self, request: Any): ...
|
def log_change(
|
||||||
def get_action_choices(self, request: Any, default_choices: Any = ...): ...
|
self,
|
||||||
|
request: WSGIRequest,
|
||||||
|
object: Model,
|
||||||
|
message: List[Dict[str, Dict[str, Union[str, List[str]]]]],
|
||||||
|
) -> LogEntry: ...
|
||||||
|
def log_deletion(
|
||||||
|
self, request: WSGIRequest, object: Model, object_repr: str
|
||||||
|
) -> LogEntry: ...
|
||||||
|
def action_checkbox(self, obj: Model) -> SafeText: ...
|
||||||
|
def get_actions(self, request: WSGIRequest) -> OrderedDict: ...
|
||||||
|
def get_action_choices(
|
||||||
|
self, request: WSGIRequest, default_choices: List[Tuple[str, str]] = ...
|
||||||
|
) -> List[Tuple[str, str]]: ...
|
||||||
def get_action(self, action: Any): ...
|
def get_action(self, action: Any): ...
|
||||||
def get_list_display(self, request: Any): ...
|
def get_list_display(self, request: WSGIRequest) -> Tuple[str]: ...
|
||||||
def get_list_display_links(self, request: Any, list_display: Any): ...
|
def get_list_display_links(
|
||||||
def get_list_filter(self, request: Any): ...
|
self, request: WSGIRequest, list_display: Tuple[str]
|
||||||
def get_list_select_related(self, request: Any): ...
|
) -> List[str]: ...
|
||||||
def get_search_fields(self, request: Any): ...
|
def get_list_filter(self, request: WSGIRequest) -> Tuple: ...
|
||||||
def get_search_results(self, request: Any, queryset: Any, search_term: Any): ...
|
def get_list_select_related(self, request: WSGIRequest) -> bool: ...
|
||||||
def get_preserved_filters(self, request: Any): ...
|
def get_search_fields(self, request: WSGIRequest) -> Tuple: ...
|
||||||
|
def get_search_results(
|
||||||
|
self, request: WSGIRequest, queryset: QuerySet, search_term: str
|
||||||
|
) -> Tuple[QuerySet, bool]: ...
|
||||||
|
def get_preserved_filters(self, request: WSGIRequest) -> str: ...
|
||||||
def construct_change_message(
|
def construct_change_message(
|
||||||
self, request: Any, form: Any, formsets: Any, add: bool = ...
|
self, request: Any, form: Any, formsets: Any, add: bool = ...
|
||||||
): ...
|
): ...
|
||||||
def message_user(
|
def message_user(
|
||||||
self,
|
self,
|
||||||
request: Any,
|
request: WSGIRequest,
|
||||||
message: Any,
|
message: str,
|
||||||
level: Any = ...,
|
level: int = ...,
|
||||||
extra_tags: str = ...,
|
extra_tags: str = ...,
|
||||||
fail_silently: bool = ...,
|
fail_silently: bool = ...,
|
||||||
) -> None: ...
|
) -> None: ...
|
||||||
def save_form(self, request: Any, form: Any, change: Any): ...
|
def save_form(self, request: Any, form: Any, change: Any): ...
|
||||||
def save_model(self, request: Any, obj: Any, form: Any, change: Any) -> None: ...
|
def save_model(
|
||||||
def delete_model(self, request: Any, obj: Any) -> None: ...
|
self, request: Any, obj: Any, form: Any, change: Any
|
||||||
|
) -> None: ...
|
||||||
|
def delete_model(self, request: WSGIRequest, obj: Model) -> None: ...
|
||||||
def delete_queryset(self, request: Any, queryset: Any) -> None: ...
|
def delete_queryset(self, request: Any, queryset: Any) -> None: ...
|
||||||
def save_formset(self, request: Any, form: Any, formset: Any, change: Any) -> None: ...
|
def save_formset(
|
||||||
def save_related(self, request: Any, form: Any, formsets: Any, change: Any) -> None: ...
|
self, request: Any, form: Any, formset: Any, change: Any
|
||||||
|
) -> None: ...
|
||||||
|
def save_related(
|
||||||
|
self, request: Any, form: Any, formsets: Any, change: Any
|
||||||
|
) -> None: ...
|
||||||
def render_change_form(
|
def render_change_form(
|
||||||
self,
|
self,
|
||||||
request: Any,
|
request: Any,
|
||||||
@@ -196,52 +270,69 @@ class ModelAdmin(BaseModelAdmin):
|
|||||||
obj: Optional[Any] = ...,
|
obj: Optional[Any] = ...,
|
||||||
): ...
|
): ...
|
||||||
def response_add(
|
def response_add(
|
||||||
self, request: Any, obj: Any, post_url_continue: Optional[Any] = ...
|
self, request: WSGIRequest, obj: Model, post_url_continue: None = ...
|
||||||
): ...
|
) -> HttpResponse: ...
|
||||||
def response_change(self, request: Any, obj: Any): ...
|
def response_change(
|
||||||
def response_post_save_add(self, request: Any, obj: Any): ...
|
self, request: WSGIRequest, obj: Model
|
||||||
def response_post_save_change(self, request: Any, obj: Any): ...
|
) -> HttpResponse: ...
|
||||||
def response_action(self, request: Any, queryset: Any): ...
|
def response_post_save_add(
|
||||||
def response_delete(self, request: Any, obj_display: Any, obj_id: Any): ...
|
self, request: WSGIRequest, obj: Model
|
||||||
|
) -> HttpResponseRedirect: ...
|
||||||
|
def response_post_save_change(
|
||||||
|
self, request: WSGIRequest, obj: User
|
||||||
|
) -> HttpResponseRedirect: ...
|
||||||
|
def response_action(
|
||||||
|
self, request: WSGIRequest, queryset: QuerySet
|
||||||
|
) -> Optional[TemplateResponse]: ...
|
||||||
|
def response_delete(
|
||||||
|
self, request: WSGIRequest, obj_display: str, obj_id: int
|
||||||
|
) -> HttpResponse: ...
|
||||||
def render_delete_form(self, request: Any, context: Any): ...
|
def render_delete_form(self, request: Any, context: Any): ...
|
||||||
def get_inline_formsets(
|
def get_inline_formsets(
|
||||||
self, request: Any, formsets: Any, inline_instances: Any, obj: Optional[Any] = ...
|
self,
|
||||||
): ...
|
request: WSGIRequest,
|
||||||
def get_changeform_initial_data(self, request: Any): ...
|
formsets: List[Any],
|
||||||
def _get_obj_does_not_exist_redirect(self, request: Any, opts: Any, object_id: Any): ...
|
inline_instances: List[Any],
|
||||||
|
obj: Optional[Model] = ...,
|
||||||
|
) -> List[Any]: ...
|
||||||
|
def get_changeform_initial_data(
|
||||||
|
self, request: WSGIRequest
|
||||||
|
) -> Dict[Any, Any]: ...
|
||||||
def changeform_view(
|
def changeform_view(
|
||||||
self,
|
self,
|
||||||
request: Any,
|
request: WSGIRequest,
|
||||||
object_id: Optional[Any] = ...,
|
object_id: Optional[str] = ...,
|
||||||
form_url: str = ...,
|
form_url: str = ...,
|
||||||
extra_context: Optional[Any] = ...,
|
extra_context: None = ...,
|
||||||
): ...
|
) -> Any: ...
|
||||||
def _changeform_view(
|
|
||||||
self, request: Any, object_id: Any, form_url: Any, extra_context: Any
|
|
||||||
): ...
|
|
||||||
def autocomplete_view(self, request: Any): ...
|
def autocomplete_view(self, request: Any): ...
|
||||||
def add_view(
|
def add_view(
|
||||||
self, request: Any, form_url: str = ..., extra_context: Optional[Any] = ...
|
self,
|
||||||
): ...
|
request: WSGIRequest,
|
||||||
|
form_url: str = ...,
|
||||||
|
extra_context: None = ...,
|
||||||
|
) -> HttpResponse: ...
|
||||||
def change_view(
|
def change_view(
|
||||||
self,
|
self,
|
||||||
request: Any,
|
request: WSGIRequest,
|
||||||
object_id: Any,
|
object_id: str,
|
||||||
form_url: str = ...,
|
form_url: str = ...,
|
||||||
extra_context: Optional[Any] = ...,
|
extra_context: None = ...,
|
||||||
): ...
|
) -> HttpResponse: ...
|
||||||
def _get_edited_object_pks(self, request: Any, prefix: Any): ...
|
def changelist_view(
|
||||||
def _get_list_editable_queryset(self, request: Any, prefix: Any): ...
|
self,
|
||||||
def changelist_view(self, request: Any, extra_context: Optional[Any] = ...): ...
|
request: WSGIRequest,
|
||||||
def get_deleted_objects(self, objs: Any, request: Any): ...
|
extra_context: Optional[Dict[str, str]] = ...,
|
||||||
|
) -> HttpResponse: ...
|
||||||
|
def get_deleted_objects(
|
||||||
|
self, objs: QuerySet, request: WSGIRequest
|
||||||
|
) -> Tuple[List[Any], Dict[Any, Any], Set[Any], List[Any]]: ...
|
||||||
def delete_view(
|
def delete_view(
|
||||||
self, request: Any, object_id: Any, extra_context: Optional[Any] = ...
|
self, request: WSGIRequest, object_id: str, extra_context: None = ...
|
||||||
): ...
|
) -> Any: ...
|
||||||
def _delete_view(self, request: Any, object_id: Any, extra_context: Any): ...
|
|
||||||
def history_view(
|
def history_view(
|
||||||
self, request: Any, object_id: Any, extra_context: Optional[Any] = ...
|
self, request: WSGIRequest, object_id: str, extra_context: None = ...
|
||||||
): ...
|
) -> TemplateResponse: ...
|
||||||
def _create_formsets(self, request: Any, obj: Any, change: Any): ...
|
|
||||||
|
|
||||||
class InlineModelAdmin(BaseModelAdmin):
|
class InlineModelAdmin(BaseModelAdmin):
|
||||||
model: Any = ...
|
model: Any = ...
|
||||||
@@ -263,18 +354,33 @@ class InlineModelAdmin(BaseModelAdmin):
|
|||||||
has_registered_model: Any = ...
|
has_registered_model: Any = ...
|
||||||
def __init__(self, parent_model: Any, admin_site: Any) -> None: ...
|
def __init__(self, parent_model: Any, admin_site: Any) -> None: ...
|
||||||
@property
|
@property
|
||||||
def media(self): ...
|
def media(self) -> Media: ...
|
||||||
def get_extra(self, request: Any, obj: Optional[Any] = ..., **kwargs: Any): ...
|
def get_extra(
|
||||||
def get_min_num(self, request: Any, obj: Optional[Any] = ..., **kwargs: Any): ...
|
self, request: WSGIRequest, obj: Optional[Model] = ..., **kwargs: Any
|
||||||
def get_max_num(self, request: Any, obj: Optional[Any] = ..., **kwargs: Any): ...
|
) -> int: ...
|
||||||
|
def get_min_num(
|
||||||
|
self, request: WSGIRequest, obj: Optional[Model] = ..., **kwargs: Any
|
||||||
|
) -> None: ...
|
||||||
|
def get_max_num(
|
||||||
|
self, request: WSGIRequest, obj: Optional[Model] = ..., **kwargs: Any
|
||||||
|
) -> None: ...
|
||||||
fields: Any = ...
|
fields: Any = ...
|
||||||
def get_formset(self, request: Any, obj: Optional[Any] = ..., **kwargs: Any): ...
|
def get_formset(
|
||||||
def _get_form_for_get_fields(self, request: Any, obj: Optional[Any] = ...): ...
|
self, request: Any, obj: Optional[Any] = ..., **kwargs: Any
|
||||||
def get_queryset(self, request: Any): ...
|
): ...
|
||||||
def has_add_permission(self, request: Any, obj: Any): ...
|
def get_queryset(self, request: WSGIRequest) -> QuerySet: ...
|
||||||
def has_change_permission(self, request: Any, obj: Optional[Any] = ...): ...
|
def has_add_permission(
|
||||||
def has_delete_permission(self, request: Any, obj: Optional[Any] = ...): ...
|
self, request: WSGIRequest, obj: Optional[Model]
|
||||||
def has_view_permission(self, request: Any, obj: Optional[Any] = ...): ...
|
) -> bool: ...
|
||||||
|
def has_change_permission(
|
||||||
|
self, request: WSGIRequest, obj: Optional[Model] = ...
|
||||||
|
) -> bool: ...
|
||||||
|
def has_delete_permission(
|
||||||
|
self, request: WSGIRequest, obj: Optional[Model] = ...
|
||||||
|
) -> bool: ...
|
||||||
|
def has_view_permission(
|
||||||
|
self, request: WSGIRequest, obj: Optional[Model] = ...
|
||||||
|
) -> bool: ...
|
||||||
|
|
||||||
class StackedInline(InlineModelAdmin):
|
class StackedInline(InlineModelAdmin):
|
||||||
template: str = ...
|
template: str = ...
|
||||||
|
|||||||
@@ -1,16 +1,12 @@
|
|||||||
# Stubs for django.contrib.admin.sites (Python 3.6)
|
from typing import Any, Callable, Dict, List, Optional, Tuple, Type, Union
|
||||||
#
|
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
||||||
|
|
||||||
from django.utils.functional import LazyObject
|
|
||||||
from typing import Any, Optional
|
|
||||||
|
|
||||||
|
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.http.response import HttpResponse, HttpResponseRedirect
|
from django.http.response import HttpResponse
|
||||||
from django.template.response import TemplateResponse
|
from django.template.response import TemplateResponse
|
||||||
from django.urls.resolvers import URLPattern, URLResolver
|
from django.urls.resolvers import URLPattern, URLResolver
|
||||||
from typing import Any, Callable, Dict, List, Tuple, Type, Union
|
from django.utils.functional import LazyObject
|
||||||
|
|
||||||
all_sites: Any
|
all_sites: Any
|
||||||
|
|
||||||
@@ -22,7 +18,6 @@ class AdminSite:
|
|||||||
site_header: Any = ...
|
site_header: Any = ...
|
||||||
index_title: Any = ...
|
index_title: Any = ...
|
||||||
site_url: str = ...
|
site_url: str = ...
|
||||||
_empty_value_display: str = ...
|
|
||||||
login_form: Any = ...
|
login_form: Any = ...
|
||||||
index_template: Any = ...
|
index_template: Any = ...
|
||||||
app_index_template: Any = ...
|
app_index_template: Any = ...
|
||||||
@@ -30,19 +25,21 @@ class AdminSite:
|
|||||||
logout_template: Any = ...
|
logout_template: Any = ...
|
||||||
password_change_template: Any = ...
|
password_change_template: Any = ...
|
||||||
password_change_done_template: Any = ...
|
password_change_done_template: Any = ...
|
||||||
_registry: Any = ...
|
name: str = ...
|
||||||
name: Any = ...
|
|
||||||
_actions: Any = ...
|
|
||||||
_global_actions: Any = ...
|
|
||||||
def __init__(self, name: str = ...) -> None: ...
|
def __init__(self, name: str = ...) -> None: ...
|
||||||
def check(self, app_configs: None) -> List[Any]: ...
|
def check(self, app_configs: None) -> List[str]: ...
|
||||||
def register(
|
def register(
|
||||||
self, model_or_iterable: Any, admin_class: Any = ..., **options: Any
|
self,
|
||||||
|
model_or_iterable: Union[
|
||||||
|
Tuple[Type[Model]], Type[Model], List[Type[Model]]
|
||||||
|
],
|
||||||
|
admin_class: Optional[Type[ModelAdmin]] = ...,
|
||||||
|
**options: Any
|
||||||
) -> None: ...
|
) -> None: ...
|
||||||
def unregister(self, model_or_iterable: Type[Model]) -> None: ...
|
def unregister(self, model_or_iterable: Type[Model]) -> None: ...
|
||||||
def is_registered(self, model: Type[Model]) -> bool: ...
|
def is_registered(self, model: Type[Model]) -> bool: ...
|
||||||
def add_action(self, action: Callable, name: None = ...) -> None: ...
|
def add_action(self, action: Callable, name: None = ...) -> None: ...
|
||||||
def disable_action(self, name: Any) -> None: ...
|
def disable_action(self, name: str) -> None: ...
|
||||||
def get_action(self, name: str) -> Callable: ...
|
def get_action(self, name: str) -> Callable: ...
|
||||||
@property
|
@property
|
||||||
def actions(self): ...
|
def actions(self): ...
|
||||||
@@ -54,12 +51,7 @@ class AdminSite:
|
|||||||
def admin_view(self, view: Callable, cacheable: bool = ...) -> Callable: ...
|
def admin_view(self, view: Callable, cacheable: bool = ...) -> Callable: ...
|
||||||
def get_urls(self) -> List[Union[URLPattern, URLResolver]]: ...
|
def get_urls(self) -> List[Union[URLPattern, URLResolver]]: ...
|
||||||
@property
|
@property
|
||||||
def urls(
|
def urls(self) -> Tuple[List[Union[URLPattern, URLResolver]], str, str]: ...
|
||||||
self
|
|
||||||
) -> Union[
|
|
||||||
Tuple[List[URLPattern], str, str],
|
|
||||||
Tuple[List[Union[URLPattern, URLResolver]], str, str],
|
|
||||||
]: ...
|
|
||||||
def each_context(self, request: Any): ...
|
def each_context(self, request: Any): ...
|
||||||
def password_change(
|
def password_change(
|
||||||
self, request: WSGIRequest, extra_context: Dict[str, str] = ...
|
self, request: WSGIRequest, extra_context: Dict[str, str] = ...
|
||||||
@@ -68,27 +60,26 @@ class AdminSite:
|
|||||||
self, request: WSGIRequest, extra_context: None = ...
|
self, request: WSGIRequest, extra_context: None = ...
|
||||||
) -> TemplateResponse: ...
|
) -> TemplateResponse: ...
|
||||||
def i18n_javascript(
|
def i18n_javascript(
|
||||||
self, request: WSGIRequest, extra_context: None = ...
|
self,
|
||||||
|
request: WSGIRequest,
|
||||||
|
extra_context: Optional[Dict[Any, Any]] = ...,
|
||||||
) -> HttpResponse: ...
|
) -> HttpResponse: ...
|
||||||
def logout(
|
def logout(
|
||||||
self, request: WSGIRequest, extra_context: None = ...
|
self, request: WSGIRequest, extra_context: None = ...
|
||||||
) -> TemplateResponse: ...
|
) -> TemplateResponse: ...
|
||||||
def login(
|
def login(
|
||||||
self, request: WSGIRequest, extra_context: None = ...
|
self, request: WSGIRequest, extra_context: None = ...
|
||||||
) -> Union[TemplateResponse, HttpResponseRedirect]: ...
|
) -> HttpResponse: ...
|
||||||
def _build_app_dict(
|
|
||||||
self, request: WSGIRequest, label: None = ...
|
|
||||||
) -> Dict[Any, Any]: ...
|
|
||||||
def get_app_list(self, request: WSGIRequest) -> List[Any]: ...
|
def get_app_list(self, request: WSGIRequest) -> List[Any]: ...
|
||||||
def index(
|
def index(
|
||||||
self, request: WSGIRequest, extra_context: None = ...
|
self,
|
||||||
|
request: WSGIRequest,
|
||||||
|
extra_context: Optional[Dict[str, str]] = ...,
|
||||||
) -> TemplateResponse: ...
|
) -> TemplateResponse: ...
|
||||||
def app_index(
|
def app_index(
|
||||||
self, request: WSGIRequest, app_label: str, extra_context: None = ...
|
self, request: WSGIRequest, app_label: str, extra_context: None = ...
|
||||||
) -> TemplateResponse: ...
|
) -> TemplateResponse: ...
|
||||||
|
|
||||||
class DefaultAdminSite(LazyObject):
|
class DefaultAdminSite(LazyObject): ...
|
||||||
_wrapped: Any = ...
|
|
||||||
def _setup(self) -> None: ...
|
|
||||||
|
|
||||||
site: Any
|
site: Any
|
||||||
|
|||||||
@@ -1,9 +1,4 @@
|
|||||||
# Stubs for django.contrib.admin.templatetags.admin_list (Python 3.6)
|
from typing import Any, Dict, Iterator, List, Optional, Union
|
||||||
#
|
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
||||||
|
|
||||||
from .base import InclusionAdminNode
|
|
||||||
from typing import Any
|
|
||||||
|
|
||||||
from django.contrib.admin.filters import FieldListFilter
|
from django.contrib.admin.filters import FieldListFilter
|
||||||
from django.contrib.admin.templatetags.base import InclusionAdminNode
|
from django.contrib.admin.templatetags.base import InclusionAdminNode
|
||||||
@@ -13,7 +8,8 @@ from django.forms.boundfield import BoundField
|
|||||||
from django.template.base import Parser, Token
|
from django.template.base import Parser, Token
|
||||||
from django.template.context import RequestContext
|
from django.template.context import RequestContext
|
||||||
from django.utils.safestring import SafeText
|
from django.utils.safestring import SafeText
|
||||||
from typing import Any, Callable, Dict, Iterator, Optional, Union
|
|
||||||
|
from .base import InclusionAdminNode
|
||||||
|
|
||||||
register: Any
|
register: Any
|
||||||
DOT: str
|
DOT: str
|
||||||
@@ -21,24 +17,35 @@ DOT: str
|
|||||||
def paginator_number(cl: ChangeList, i: int) -> SafeText: ...
|
def paginator_number(cl: ChangeList, i: int) -> SafeText: ...
|
||||||
def pagination(cl: ChangeList) -> Dict[str, Any]: ...
|
def pagination(cl: ChangeList) -> Dict[str, Any]: ...
|
||||||
def pagination_tag(parser: Parser, token: Token) -> InclusionAdminNode: ...
|
def pagination_tag(parser: Parser, token: Token) -> InclusionAdminNode: ...
|
||||||
def result_headers(cl: ChangeList) -> Iterator[Dict[str, Optional[Union[int, str]]]]: ...
|
def result_headers(
|
||||||
def _boolean_icon(field_val: Optional[bool]) -> SafeText: ...
|
cl: ChangeList
|
||||||
def _coerce_field_name(field_name: Union[str, Callable], field_index: int) -> str: ...
|
) -> Iterator[Dict[str, Optional[Union[int, str]]]]: ...
|
||||||
def items_for_result(cl: ChangeList, result: Model, form: None) -> Iterator[SafeText]: ...
|
def items_for_result(
|
||||||
|
cl: ChangeList, result: Model, form: None
|
||||||
|
) -> Iterator[SafeText]: ...
|
||||||
|
|
||||||
class ResultList(list):
|
class ResultList(list):
|
||||||
form: Any = ...
|
form: None = ...
|
||||||
def __init__(self, form: None, *items: Any) -> None: ...
|
def __init__(self, form: None, *items: Any) -> None: ...
|
||||||
|
|
||||||
def results(cl: ChangeList) -> Iterator[ResultList]: ...
|
def results(cl: ChangeList) -> Iterator[ResultList]: ...
|
||||||
def result_hidden_fields(cl: ChangeList) -> Iterator[BoundField]: ...
|
def result_hidden_fields(cl: ChangeList) -> Iterator[BoundField]: ...
|
||||||
def result_list(cl: ChangeList) -> Dict[str, Any]: ...
|
def result_list(cl: ChangeList) -> Dict[str, Any]: ...
|
||||||
def result_list_tag(parser: Parser, token: Token) -> InclusionAdminNode: ...
|
def result_list_tag(parser: Parser, token: Token) -> InclusionAdminNode: ...
|
||||||
def date_hierarchy(cl: ChangeList) -> Any: ...
|
def date_hierarchy(
|
||||||
|
cl: ChangeList
|
||||||
|
) -> Optional[
|
||||||
|
Union[
|
||||||
|
Dict[str, Union[bool, Dict[str, str], List[Any]]],
|
||||||
|
Dict[str, Union[bool, Dict[str, str], List[Dict[str, str]]]],
|
||||||
|
]
|
||||||
|
]: ...
|
||||||
def date_hierarchy_tag(parser: Parser, token: Token) -> InclusionAdminNode: ...
|
def date_hierarchy_tag(parser: Parser, token: Token) -> InclusionAdminNode: ...
|
||||||
def search_form(cl: ChangeList) -> Dict[str, Union[ChangeList, bool, str]]: ...
|
def search_form(cl: ChangeList) -> Dict[str, Union[ChangeList, bool, str]]: ...
|
||||||
def search_form_tag(parser: Parser, token: Token) -> InclusionAdminNode: ...
|
def search_form_tag(parser: Parser, token: Token) -> InclusionAdminNode: ...
|
||||||
def admin_list_filter(cl: ChangeList, spec: FieldListFilter) -> SafeText: ...
|
def admin_list_filter(cl: ChangeList, spec: FieldListFilter) -> SafeText: ...
|
||||||
def admin_actions(context: RequestContext) -> RequestContext: ...
|
def admin_actions(context: RequestContext) -> RequestContext: ...
|
||||||
def admin_actions_tag(parser: Parser, token: Token) -> InclusionAdminNode: ...
|
def admin_actions_tag(parser: Parser, token: Token) -> InclusionAdminNode: ...
|
||||||
def change_list_object_tools_tag(parser: Parser, token: Token) -> InclusionAdminNode: ...
|
def change_list_object_tools_tag(
|
||||||
|
parser: Parser, token: Token
|
||||||
|
) -> InclusionAdminNode: ...
|
||||||
|
|||||||
@@ -1,20 +1,21 @@
|
|||||||
# Stubs for django.contrib.admin.templatetags.admin_modify (Python 3.6)
|
from typing import Any, Optional
|
||||||
#
|
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
||||||
|
|
||||||
from .base import InclusionAdminNode
|
|
||||||
from typing import Any
|
|
||||||
|
|
||||||
from django.contrib.admin.helpers import InlineAdminForm
|
from django.contrib.admin.helpers import InlineAdminForm
|
||||||
from django.contrib.admin.templatetags.base import InclusionAdminNode
|
from django.contrib.admin.templatetags.base import InclusionAdminNode
|
||||||
from django.template.base import Parser, Token
|
from django.template.base import Parser, Token
|
||||||
from django.template.context import Context, RequestContext
|
from django.template.context import Context, RequestContext
|
||||||
|
|
||||||
|
from .base import InclusionAdminNode
|
||||||
|
|
||||||
register: Any
|
register: Any
|
||||||
|
|
||||||
def prepopulated_fields_js(context: RequestContext) -> RequestContext: ...
|
def prepopulated_fields_js(context: RequestContext) -> RequestContext: ...
|
||||||
def prepopulated_fields_js_tag(parser: Parser, token: Token) -> InclusionAdminNode: ...
|
def prepopulated_fields_js_tag(
|
||||||
|
parser: Parser, token: Token
|
||||||
|
) -> InclusionAdminNode: ...
|
||||||
def submit_row(context: RequestContext) -> Context: ...
|
def submit_row(context: RequestContext) -> Context: ...
|
||||||
def submit_row_tag(parser: Parser, token: Token) -> InclusionAdminNode: ...
|
def submit_row_tag(parser: Parser, token: Token) -> InclusionAdminNode: ...
|
||||||
def change_form_object_tools_tag(parser: Parser, token: Token) -> InclusionAdminNode: ...
|
def change_form_object_tools_tag(
|
||||||
|
parser: Parser, token: Token
|
||||||
|
) -> InclusionAdminNode: ...
|
||||||
def cell_count(inline_admin_form: InlineAdminForm) -> int: ...
|
def cell_count(inline_admin_form: InlineAdminForm) -> int: ...
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
# Stubs for django.contrib.admin.templatetags.admin_static (Python 3.6)
|
from typing import Any, Optional
|
||||||
#
|
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
||||||
|
|
||||||
from typing import Any
|
|
||||||
|
|
||||||
register: Any
|
register: Any
|
||||||
|
|
||||||
|
|||||||
@@ -1,19 +1,14 @@
|
|||||||
# Stubs for django.contrib.admin.templatetags.admin_urls (Python 3.6)
|
from typing import Any, Dict, Optional, Union
|
||||||
#
|
from uuid import UUID
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
||||||
|
|
||||||
from typing import Any, Optional
|
|
||||||
|
|
||||||
from django.db.models.options import Options
|
from django.db.models.options import Options
|
||||||
from django.template.context import RequestContext
|
from django.template.context import RequestContext
|
||||||
from django.utils.safestring import SafeText
|
from django.utils.safestring import SafeText
|
||||||
from typing import Dict, Optional, Union
|
|
||||||
from uuid import UUID
|
|
||||||
|
|
||||||
register: Any
|
register: Any
|
||||||
|
|
||||||
def admin_urlname(value: Options, arg: SafeText) -> str: ...
|
def admin_urlname(value: Options, arg: SafeText) -> str: ...
|
||||||
def admin_urlquote(value: Union[str, int, UUID]) -> Union[str, int, UUID]: ...
|
def admin_urlquote(value: Union[str, UUID, int]) -> Union[str, UUID, int]: ...
|
||||||
def add_preserved_filters(
|
def add_preserved_filters(
|
||||||
context: Union[Dict[str, Union[str, Options]], RequestContext],
|
context: Union[Dict[str, Union[str, Options]], RequestContext],
|
||||||
url: str,
|
url: str,
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
# Stubs for django.contrib.admin.templatetags.base (Python 3.6)
|
from typing import Any, Callable, Optional
|
||||||
#
|
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
||||||
|
|
||||||
from django.template.library import InclusionNode
|
|
||||||
from typing import Any
|
|
||||||
|
|
||||||
from django.template.base import Parser, Token
|
from django.template.base import Parser, Token
|
||||||
from django.template.context import Context
|
from django.template.context import Context
|
||||||
|
from django.template.library import InclusionNode
|
||||||
from django.utils.safestring import SafeText
|
from django.utils.safestring import SafeText
|
||||||
from typing import Callable
|
|
||||||
|
|
||||||
class InclusionAdminNode(InclusionNode):
|
class InclusionAdminNode(InclusionNode):
|
||||||
template_name: Any = ...
|
args: List[Any]
|
||||||
|
func: Callable
|
||||||
|
kwargs: Dict[Any, Any]
|
||||||
|
takes_context: bool
|
||||||
|
template_name: str = ...
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
parser: Parser,
|
parser: Parser,
|
||||||
|
|||||||
@@ -1,8 +1,18 @@
|
|||||||
|
from typing import Any, Optional
|
||||||
|
|
||||||
|
from django import template
|
||||||
from django.template.base import Parser, Token
|
from django.template.base import Parser, Token
|
||||||
from django.template.context import Context
|
from django.template.context import Context
|
||||||
|
|
||||||
def get_admin_log(parser: Parser, token: Token) -> AdminLogNode: ...
|
register: Any
|
||||||
|
|
||||||
class AdminLogNode:
|
class AdminLogNode(template.Node):
|
||||||
def __init__(self, limit: str, varname: str, user: str) -> None: ...
|
limit: str
|
||||||
|
user: str
|
||||||
|
varname: str
|
||||||
|
def __init__(
|
||||||
|
self, limit: str, varname: str, user: Optional[str]
|
||||||
|
) -> None: ...
|
||||||
def render(self, context: Context) -> str: ...
|
def render(self, context: Context) -> str: ...
|
||||||
|
|
||||||
|
def get_admin_log(parser: Parser, token: Token) -> AdminLogNode: ...
|
||||||
|
|||||||
@@ -1,26 +1,19 @@
|
|||||||
# Stubs for django.contrib.admin.utils (Python 3.6)
|
from datetime import date, datetime
|
||||||
#
|
from typing import Any, Callable, Dict, List, Optional, Set, Tuple, Type, Union
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
||||||
|
|
||||||
from django.db.models.deletion import Collector
|
from django.contrib.admin.options import BaseModelAdmin
|
||||||
from typing import Any, Optional
|
from django.contrib.admin.sites import AdminSite
|
||||||
|
from django.contrib.contenttypes.fields import GenericForeignKey
|
||||||
from datetime import datetime
|
from django.core.handlers.wsgi import WSGIRequest
|
||||||
from django.contrib.admin.options import ModelAdmin, TabularInline
|
|
||||||
from django.contrib.auth.forms import AdminPasswordChangeForm
|
|
||||||
from django.contrib.auth.models import User
|
|
||||||
from django.db.models.base import Model
|
from django.db.models.base import Model
|
||||||
|
from django.db.models.deletion import Collector
|
||||||
from django.db.models.fields import Field
|
from django.db.models.fields import Field
|
||||||
from django.db.models.fields.reverse_related import (
|
from django.db.models.fields.mixins import FieldCacheMixin
|
||||||
ForeignObjectRel,
|
from django.db.models.fields.reverse_related import ManyToOneRel, OneToOneRel
|
||||||
ManyToManyRel,
|
|
||||||
ManyToOneRel,
|
|
||||||
OneToOneRel,
|
|
||||||
)
|
|
||||||
from django.db.models.options import Options
|
from django.db.models.options import Options
|
||||||
from django.db.models.query import QuerySet
|
from django.db.models.query import QuerySet
|
||||||
from typing import Any, Callable, Dict, List, Optional, Set, Tuple, Type, Union
|
from django.utils.safestring import SafeText
|
||||||
from uuid import UUID
|
|
||||||
|
|
||||||
class FieldIsAForeignKeyColumnName(Exception): ...
|
class FieldIsAForeignKeyColumnName(Exception): ...
|
||||||
|
|
||||||
@@ -28,15 +21,37 @@ def lookup_needs_distinct(opts: Options, lookup_path: str) -> bool: ...
|
|||||||
def prepare_lookup_value(
|
def prepare_lookup_value(
|
||||||
key: str, value: Union[str, datetime]
|
key: str, value: Union[str, datetime]
|
||||||
) -> Union[bool, datetime, str]: ...
|
) -> Union[bool, datetime, str]: ...
|
||||||
def quote(s: Union[str, UUID, int]) -> Union[str, UUID, int]: ...
|
def quote(s: Union[str, int]) -> Union[str, int]: ...
|
||||||
def unquote(s: str) -> str: ...
|
def unquote(s: str) -> str: ...
|
||||||
def flatten(
|
def flatten(
|
||||||
fields: Union[Tuple, List[Union[str, Callable]], List[str]]
|
fields: Union[
|
||||||
) -> Union[List[Union[str, Callable]], List[str]]: ...
|
List[Union[str, Callable]], Tuple[Tuple[str, str]], Tuple[str, str]
|
||||||
def flatten_fieldsets(fieldsets: Any) -> Union[List[str], List[Union[str, Callable]]]: ...
|
]
|
||||||
def get_deleted_objects(objs: Any, request: Any, admin_site: Any): ...
|
) -> List[Union[str, Callable]]: ...
|
||||||
|
def flatten_fieldsets(
|
||||||
|
fieldsets: Union[
|
||||||
|
List[Tuple[None, Dict[str, List[Union[str, Callable]]]]],
|
||||||
|
Tuple[
|
||||||
|
Union[
|
||||||
|
Tuple[None, Dict[str, Tuple[Tuple[str, str]]]],
|
||||||
|
Tuple[None, Dict[str, Tuple[str]]],
|
||||||
|
]
|
||||||
|
],
|
||||||
|
Tuple[
|
||||||
|
Tuple[str, Dict[str, Tuple[str]]], Tuple[str, Dict[str, Tuple[str]]]
|
||||||
|
],
|
||||||
|
]
|
||||||
|
) -> List[Union[str, Callable]]: ...
|
||||||
|
def get_deleted_objects(
|
||||||
|
objs: QuerySet, request: WSGIRequest, admin_site: AdminSite
|
||||||
|
) -> Tuple[List[Any], Dict[Any, Any], Set[Any], List[Any]]: ...
|
||||||
|
|
||||||
class NestedObjects(Collector):
|
class NestedObjects(Collector):
|
||||||
|
data: collections.OrderedDict
|
||||||
|
dependencies: Dict[Any, Any]
|
||||||
|
fast_deletes: List[Any]
|
||||||
|
field_updates: Dict[Any, Any]
|
||||||
|
using: str
|
||||||
edges: Any = ...
|
edges: Any = ...
|
||||||
protected: Any = ...
|
protected: Any = ...
|
||||||
model_objs: Any = ...
|
model_objs: Any = ...
|
||||||
@@ -44,47 +59,66 @@ class NestedObjects(Collector):
|
|||||||
def add_edge(self, source: Optional[Model], target: Model) -> None: ...
|
def add_edge(self, source: Optional[Model], target: Model) -> None: ...
|
||||||
def collect(
|
def collect(
|
||||||
self,
|
self,
|
||||||
objs: Union[List[Model], QuerySet],
|
objs: Union[QuerySet, List[Model]],
|
||||||
source: Optional[Type[Model]] = ...,
|
source: Optional[Type[Model]] = ...,
|
||||||
source_attr: Optional[str] = ...,
|
source_attr: Optional[str] = ...,
|
||||||
**kwargs: Any,
|
**kwargs: Any
|
||||||
) -> None: ...
|
) -> None: ...
|
||||||
def related_objects(
|
def related_objects(
|
||||||
self, related: ManyToOneRel, objs: Union[List[User], List[Model]]
|
self, related: ManyToOneRel, objs: List[Model]
|
||||||
) -> QuerySet: ...
|
) -> QuerySet: ...
|
||||||
def _nested(self, obj: Model, seen: Set[Model], format_callback: Callable) -> Any: ...
|
def nested(
|
||||||
def nested(self, format_callback: Callable = ...) -> Any: ...
|
self, format_callback: Callable = ...
|
||||||
|
) -> Union[
|
||||||
|
List[Union[List[str], str]], List[Union[SafeText, List[SafeText]]]
|
||||||
|
]: ...
|
||||||
def can_fast_delete(self, *args: Any, **kwargs: Any) -> bool: ...
|
def can_fast_delete(self, *args: Any, **kwargs: Any) -> bool: ...
|
||||||
|
|
||||||
def model_format_dict(obj: Any): ...
|
def model_format_dict(obj: Any): ...
|
||||||
def model_ngettext(obj: QuerySet, n: None = ...) -> str: ...
|
def model_ngettext(obj: QuerySet, n: None = ...) -> str: ...
|
||||||
def lookup_field(
|
def lookup_field(
|
||||||
name: Union[str, Callable],
|
name: Union[str, Callable], obj: Model, model_admin: BaseModelAdmin = ...
|
||||||
obj: Model,
|
) -> Union[
|
||||||
model_admin: Union[ModelAdmin, TabularInline] = ...,
|
Tuple[
|
||||||
) -> Any: ...
|
Union[str, Model, date, int, None],
|
||||||
def _get_non_gfk_field(
|
Union[str, Model, date, int, None],
|
||||||
opts: Options, name: Union[str, Callable]
|
Union[str, Model, date, int, None],
|
||||||
) -> Union[Field, reverse_related.ManyToManyRel, reverse_related.OneToOneRel]: ...
|
],
|
||||||
|
Tuple[None, Callable, Callable],
|
||||||
|
]: ...
|
||||||
def label_for_field(
|
def label_for_field(
|
||||||
name: Union[str, Callable],
|
name: Union[str, Callable],
|
||||||
model: Type[Model],
|
model: Type[Model],
|
||||||
model_admin: Optional[Union[ModelAdmin, TabularInline]] = ...,
|
model_admin: BaseModelAdmin = ...,
|
||||||
return_attr: bool = ...,
|
return_attr: bool = ...,
|
||||||
) -> Any: ...
|
) -> Union[
|
||||||
|
Tuple[
|
||||||
|
Union[Type[str], None, Callable, GenericForeignKey],
|
||||||
|
Union[Type[str], None, Callable, GenericForeignKey],
|
||||||
|
],
|
||||||
|
str,
|
||||||
|
]: ...
|
||||||
def help_text_for_field(name: str, model: Type[Model]) -> str: ...
|
def help_text_for_field(name: str, model: Type[Model]) -> str: ...
|
||||||
def display_for_field(
|
def display_for_field(
|
||||||
value: Any, field: Union[Field, reverse_related.OneToOneRel], empty_value_display: str
|
value: Optional[Union[int, str, date, Model]],
|
||||||
|
field: Union[Field, reverse_related.OneToOneRel],
|
||||||
|
empty_value_display: SafeText,
|
||||||
|
) -> str: ...
|
||||||
|
def display_for_value(
|
||||||
|
value: Optional[Union[Callable, Model, int, str]],
|
||||||
|
empty_value_display: SafeText,
|
||||||
|
boolean: bool = ...,
|
||||||
) -> str: ...
|
) -> str: ...
|
||||||
def display_for_value(value: Any, empty_value_display: str, boolean: bool = ...) -> str: ...
|
|
||||||
|
|
||||||
class NotRelationField(Exception): ...
|
class NotRelationField(Exception): ...
|
||||||
|
|
||||||
def get_model_from_relation(field: Union[ForeignObjectRel, Field]) -> Type[Model]: ...
|
def get_model_from_relation(
|
||||||
|
field: Union[Field, reverse_related.ManyToOneRel]
|
||||||
|
) -> Type[Model]: ...
|
||||||
def reverse_field_path(
|
def reverse_field_path(
|
||||||
model: Type[Model], path: str
|
model: Type[Model], path: str
|
||||||
) -> Union[Tuple[Type[Model], str], Tuple[Type[User], str]]: ...
|
) -> Tuple[Type[Model], str]: ...
|
||||||
def get_fields_from_path(model: Type[Model], path: str) -> Any: ...
|
def get_fields_from_path(
|
||||||
def construct_change_message(
|
model: Type[Model], path: str
|
||||||
form: AdminPasswordChangeForm, formsets: None, add: bool
|
) -> List[Union[FieldCacheMixin, Field]]: ...
|
||||||
) -> List[Dict[str, Dict[str, List[str]]]]: ...
|
def construct_change_message(form: Any, formsets: Any, add: Any): ...
|
||||||
|
|||||||
@@ -1,22 +1,21 @@
|
|||||||
# Stubs for django.contrib.admin.views.autocomplete (Python 3.6)
|
|
||||||
#
|
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
||||||
|
|
||||||
from django.views.generic.list import BaseListView
|
|
||||||
from typing import Any, Optional
|
from typing import Any, Optional
|
||||||
|
|
||||||
from django.core.handlers.wsgi import WSGIRequest
|
from django.core.handlers.wsgi import WSGIRequest
|
||||||
from django.core.paginator import Paginator
|
from django.core.paginator import Paginator
|
||||||
from django.db.models.query import QuerySet
|
from django.db.models.query import QuerySet
|
||||||
from django.http.response import JsonResponse
|
from django.http.response import JsonResponse
|
||||||
|
from django.views.generic.list import BaseListView
|
||||||
|
|
||||||
|
|
||||||
class AutocompleteJsonView(BaseListView):
|
class AutocompleteJsonView(BaseListView):
|
||||||
paginate_by: int = ...
|
paginate_by: int = ...
|
||||||
model_admin: Any = ...
|
model_admin: django.contrib.admin.options.ModelAdmin = ...
|
||||||
term: Any = ...
|
term: Any = ...
|
||||||
paginator_class: Any = ...
|
paginator_class: Any = ...
|
||||||
object_list: Any = ...
|
object_list: Any = ...
|
||||||
def get(self, request: WSGIRequest, *args: Any, **kwargs: Any) -> JsonResponse: ...
|
def get(
|
||||||
|
self, request: WSGIRequest, *args: Any, **kwargs: Any
|
||||||
|
) -> JsonResponse: ...
|
||||||
def get_paginator(self, *args: Any, **kwargs: Any) -> Paginator: ...
|
def get_paginator(self, *args: Any, **kwargs: Any) -> Paginator: ...
|
||||||
def get_queryset(self) -> QuerySet: ...
|
def get_queryset(self) -> QuerySet: ...
|
||||||
def has_perm(self, request: WSGIRequest, obj: None = ...) -> bool: ...
|
def has_perm(self, request: WSGIRequest, obj: None = ...) -> bool: ...
|
||||||
|
|||||||
@@ -1,11 +1,8 @@
|
|||||||
# Stubs for django.contrib.admin.views.decorators (Python 3.6)
|
from typing import Any, Callable, Optional
|
||||||
#
|
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
||||||
|
|
||||||
from typing import Any, Optional
|
|
||||||
|
|
||||||
from typing import Callable
|
|
||||||
|
|
||||||
def staff_member_required(
|
def staff_member_required(
|
||||||
view_func: None = ..., redirect_field_name: str = ..., login_url: str = ...
|
view_func: Optional[Callable] = ...,
|
||||||
|
redirect_field_name: str = ...,
|
||||||
|
login_url: str = ...,
|
||||||
) -> Callable: ...
|
) -> Callable: ...
|
||||||
|
|||||||
@@ -1,17 +1,13 @@
|
|||||||
# Stubs for django.contrib.admin.views.main (Python 3.6)
|
|
||||||
#
|
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
||||||
|
|
||||||
from typing import Any, Optional
|
|
||||||
|
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
from django.contrib.admin.filters import SimpleListFilter
|
from typing import Any, Callable, Dict, List, Optional, Tuple, Type, Union
|
||||||
|
|
||||||
|
from django.contrib.admin.filters import ListFilter, SimpleListFilter
|
||||||
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.expressions import CombinedExpression
|
from django.db.models.expressions import (Combinable, CombinedExpression,
|
||||||
|
OrderBy)
|
||||||
from django.db.models.query import QuerySet
|
from django.db.models.query import QuerySet
|
||||||
from typing import Any, Callable, Dict, List, Optional, Tuple, Type, Union
|
|
||||||
|
|
||||||
ALL_VAR: str
|
ALL_VAR: str
|
||||||
ORDER_VAR: str
|
ORDER_VAR: str
|
||||||
@@ -22,28 +18,28 @@ ERROR_FLAG: str
|
|||||||
IGNORED_PARAMS: Any
|
IGNORED_PARAMS: Any
|
||||||
|
|
||||||
class ChangeList:
|
class ChangeList:
|
||||||
model: Any = ...
|
model: Type[django.db.models.base.Model] = ...
|
||||||
opts: Any = ...
|
opts: django.db.models.options.Options = ...
|
||||||
lookup_opts: Any = ...
|
lookup_opts: django.db.models.options.Options = ...
|
||||||
root_queryset: Any = ...
|
root_queryset: django.db.models.query.QuerySet = ...
|
||||||
list_display: Any = ...
|
list_display: List[str] = ...
|
||||||
list_display_links: Any = ...
|
list_display_links: List[str] = ...
|
||||||
list_filter: Any = ...
|
list_filter: Tuple = ...
|
||||||
date_hierarchy: Any = ...
|
date_hierarchy: None = ...
|
||||||
search_fields: Any = ...
|
search_fields: Tuple = ...
|
||||||
list_select_related: Any = ...
|
list_select_related: bool = ...
|
||||||
list_per_page: Any = ...
|
list_per_page: int = ...
|
||||||
list_max_show_all: Any = ...
|
list_max_show_all: int = ...
|
||||||
model_admin: Any = ...
|
model_admin: django.contrib.admin.options.ModelAdmin = ...
|
||||||
preserved_filters: Any = ...
|
preserved_filters: str = ...
|
||||||
sortable_by: Any = ...
|
sortable_by: Tuple[str] = ...
|
||||||
page_num: Any = ...
|
page_num: int = ...
|
||||||
show_all: Any = ...
|
show_all: bool = ...
|
||||||
is_popup: Any = ...
|
is_popup: bool = ...
|
||||||
to_field: Any = ...
|
to_field: None = ...
|
||||||
params: Any = ...
|
params: Dict[Any, Any] = ...
|
||||||
list_editable: Any = ...
|
list_editable: Tuple = ...
|
||||||
query: Any = ...
|
query: str = ...
|
||||||
queryset: Any = ...
|
queryset: Any = ...
|
||||||
title: Any = ...
|
title: Any = ...
|
||||||
pk_attname: Any = ...
|
pk_attname: Any = ...
|
||||||
@@ -51,24 +47,30 @@ class ChangeList:
|
|||||||
self,
|
self,
|
||||||
request: WSGIRequest,
|
request: WSGIRequest,
|
||||||
model: Type[Model],
|
model: Type[Model],
|
||||||
list_display: Union[
|
list_display: Union[List[Union[str, Callable]], Tuple[str]],
|
||||||
List[str], List[Union[str, Callable]], Tuple[str, str, str, str]
|
list_display_links: Optional[
|
||||||
|
Union[List[str], Tuple[str], List[Callable]]
|
||||||
],
|
],
|
||||||
list_display_links: Union[List[str], Tuple[str, str]],
|
list_filter: Union[Tuple, List[Type[SimpleListFilter]], List[str]],
|
||||||
list_filter: Union[List[Type[SimpleListFilter]], List[str], Tuple],
|
|
||||||
date_hierarchy: Optional[str],
|
date_hierarchy: Optional[str],
|
||||||
search_fields: Union[List[str], Tuple],
|
search_fields: Union[Tuple, List[str]],
|
||||||
list_select_related: bool,
|
list_select_related: Union[bool, Tuple],
|
||||||
list_per_page: int,
|
list_per_page: int,
|
||||||
list_max_show_all: int,
|
list_max_show_all: int,
|
||||||
list_editable: Union[List[str], Tuple],
|
list_editable: Union[List[str], Tuple],
|
||||||
model_admin: ModelAdmin,
|
model_admin: ModelAdmin,
|
||||||
sortable_by: Any,
|
sortable_by: Union[Tuple, List[Callable], List[str]],
|
||||||
) -> None: ...
|
) -> None: ...
|
||||||
def get_filters_params(self, params: None = ...) -> Dict[str, str]: ...
|
def get_filters_params(self, params: None = ...) -> Dict[str, str]: ...
|
||||||
def get_filters(self, request: WSGIRequest) -> Any: ...
|
def get_filters(
|
||||||
|
self, request: WSGIRequest
|
||||||
|
) -> Tuple[List[ListFilter], bool, bool, bool]: ...
|
||||||
def get_query_string(
|
def get_query_string(
|
||||||
self, new_params: Any = ..., remove: Optional[List[str]] = ...
|
self,
|
||||||
|
new_params: Optional[
|
||||||
|
Union[Dict[str, Union[str, int]], Dict[str, None]]
|
||||||
|
] = ...,
|
||||||
|
remove: Optional[List[str]] = ...,
|
||||||
) -> str: ...
|
) -> str: ...
|
||||||
result_count: Any = ...
|
result_count: Any = ...
|
||||||
show_full_result_count: Any = ...
|
show_full_result_count: Any = ...
|
||||||
@@ -79,11 +81,12 @@ class ChangeList:
|
|||||||
multi_page: Any = ...
|
multi_page: Any = ...
|
||||||
paginator: Any = ...
|
paginator: Any = ...
|
||||||
def get_results(self, request: WSGIRequest) -> None: ...
|
def get_results(self, request: WSGIRequest) -> None: ...
|
||||||
def _get_default_ordering(self) -> Union[List[str], Tuple[str], Tuple[str, str]]: ...
|
|
||||||
def get_ordering_field(
|
def get_ordering_field(
|
||||||
self, field_name: Union[str, Callable]
|
self, field_name: Union[str, Callable]
|
||||||
) -> Optional[Union[str, CombinedExpression]]: ...
|
) -> Optional[Union[CombinedExpression, str]]: ...
|
||||||
def get_ordering(self, request: WSGIRequest, queryset: QuerySet) -> List[str]: ...
|
def get_ordering(
|
||||||
|
self, request: WSGIRequest, queryset: QuerySet
|
||||||
|
) -> Union[List[Union[Combinable, str]], List[Union[OrderBy, str]]]: ...
|
||||||
def get_ordering_field_columns(self) -> OrderedDict: ...
|
def get_ordering_field_columns(self) -> OrderedDict: ...
|
||||||
def get_queryset(self, request: WSGIRequest) -> QuerySet: ...
|
def get_queryset(self, request: WSGIRequest) -> QuerySet: ...
|
||||||
def apply_select_related(self, qs: QuerySet) -> QuerySet: ...
|
def apply_select_related(self, qs: QuerySet) -> QuerySet: ...
|
||||||
|
|||||||
@@ -1,68 +1,40 @@
|
|||||||
# Stubs for django.contrib.admin.widgets (Python 3.6)
|
|
||||||
#
|
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
||||||
|
|
||||||
from django import forms
|
|
||||||
from typing import Any, Optional
|
from typing import Any, Optional
|
||||||
|
|
||||||
from datetime import datetime
|
from django import forms
|
||||||
from django.contrib.admin.sites import AdminSite
|
|
||||||
from django.db.models.fields.reverse_related import ForeignObjectRel, ManyToOneRel
|
|
||||||
from django.forms.widgets import Media, Select
|
|
||||||
from django.http.request import QueryDict
|
|
||||||
from django.utils.datastructures import MultiValueDict
|
|
||||||
from typing import Any, Dict, List, Optional, Set, Tuple, Union
|
|
||||||
|
|
||||||
class FilteredSelectMultiple(forms.SelectMultiple):
|
class FilteredSelectMultiple(forms.SelectMultiple):
|
||||||
@property
|
@property
|
||||||
def media(self) -> Media: ...
|
def media(self): ...
|
||||||
verbose_name: Any = ...
|
verbose_name: Any = ...
|
||||||
is_stacked: Any = ...
|
is_stacked: Any = ...
|
||||||
def __init__(
|
def __init__(
|
||||||
self, verbose_name: str, is_stacked: bool, attrs: None = ..., choices: Tuple = ...
|
self,
|
||||||
|
verbose_name: Any,
|
||||||
|
is_stacked: Any,
|
||||||
|
attrs: Optional[Any] = ...,
|
||||||
|
choices: Any = ...,
|
||||||
) -> None: ...
|
) -> None: ...
|
||||||
def get_context(self, name: Any, value: Any, attrs: Any): ...
|
def get_context(self, name: Any, value: Any, attrs: Any): ...
|
||||||
|
|
||||||
class AdminDateWidget(forms.DateInput):
|
class AdminDateWidget(forms.DateInput):
|
||||||
@property
|
@property
|
||||||
def media(self) -> Media: ...
|
def media(self): ...
|
||||||
def __init__(self, attrs: None = ..., format: None = ...) -> None: ...
|
def __init__(
|
||||||
|
self, attrs: Optional[Any] = ..., format: Optional[Any] = ...
|
||||||
|
) -> None: ...
|
||||||
|
|
||||||
class AdminTimeWidget(forms.TimeInput):
|
class AdminTimeWidget(forms.TimeInput):
|
||||||
@property
|
@property
|
||||||
def media(self) -> Media: ...
|
def media(self): ...
|
||||||
def __init__(self, attrs: None = ..., format: None = ...) -> None: ...
|
def __init__(
|
||||||
|
self, attrs: Optional[Any] = ..., format: Optional[Any] = ...
|
||||||
|
) -> None: ...
|
||||||
|
|
||||||
class AdminSplitDateTime(forms.SplitDateTimeWidget):
|
class AdminSplitDateTime(forms.SplitDateTimeWidget):
|
||||||
template_name: str = ...
|
template_name: str = ...
|
||||||
def __init__(self, attrs: None = ...) -> None: ...
|
def __init__(self, attrs: Optional[Any] = ...) -> None: ...
|
||||||
def get_context(
|
def get_context(self, name: Any, value: Any, attrs: Any): ...
|
||||||
self, name: str, value: Optional[datetime], attrs: Dict[str, Union[bool, str]]
|
|
||||||
) -> Dict[
|
|
||||||
str,
|
|
||||||
Union[
|
|
||||||
Dict[str, Any],
|
|
||||||
str,
|
|
||||||
Dict[
|
|
||||||
str,
|
|
||||||
Union[
|
|
||||||
str,
|
|
||||||
bool,
|
|
||||||
Dict[str, Union[bool, str]],
|
|
||||||
List[Dict[str, Union[str, bool, Dict[str, Union[bool, str]]]]],
|
|
||||||
],
|
|
||||||
],
|
|
||||||
Dict[
|
|
||||||
str,
|
|
||||||
Union[
|
|
||||||
str,
|
|
||||||
bool,
|
|
||||||
Dict[str, str],
|
|
||||||
List[Dict[str, Union[str, bool, Dict[str, str]]]],
|
|
||||||
],
|
|
||||||
],
|
|
||||||
],
|
|
||||||
]: ...
|
|
||||||
|
|
||||||
class AdminRadioSelect(forms.RadioSelect):
|
class AdminRadioSelect(forms.RadioSelect):
|
||||||
template_name: str = ...
|
template_name: str = ...
|
||||||
@@ -70,7 +42,7 @@ class AdminRadioSelect(forms.RadioSelect):
|
|||||||
class AdminFileWidget(forms.ClearableFileInput):
|
class AdminFileWidget(forms.ClearableFileInput):
|
||||||
template_name: str = ...
|
template_name: str = ...
|
||||||
|
|
||||||
def url_params_from_lookup_dict(lookups: Dict[str, Union[str, int]]) -> Dict[str, str]: ...
|
def url_params_from_lookup_dict(lookups: Any): ...
|
||||||
|
|
||||||
class ForeignKeyRawIdWidget(forms.TextInput):
|
class ForeignKeyRawIdWidget(forms.TextInput):
|
||||||
template_name: str = ...
|
template_name: str = ...
|
||||||
@@ -78,15 +50,15 @@ class ForeignKeyRawIdWidget(forms.TextInput):
|
|||||||
admin_site: Any = ...
|
admin_site: Any = ...
|
||||||
db: Any = ...
|
db: Any = ...
|
||||||
def __init__(
|
def __init__(
|
||||||
self, rel: ManyToOneRel, admin_site: AdminSite, attrs: None = ..., using: None = ...
|
self,
|
||||||
|
rel: Any,
|
||||||
|
admin_site: Any,
|
||||||
|
attrs: Optional[Any] = ...,
|
||||||
|
using: Optional[Any] = ...,
|
||||||
) -> None: ...
|
) -> None: ...
|
||||||
def get_context(
|
def get_context(self, name: Any, value: Any, attrs: Any): ...
|
||||||
self, name: str, value: None, attrs: Dict[str, Union[bool, str]]
|
def base_url_parameters(self): ...
|
||||||
) -> Dict[
|
def url_parameters(self): ...
|
||||||
str, Union[Dict[str, Union[str, bool, None, Dict[str, Union[bool, str]]]], str]
|
|
||||||
]: ...
|
|
||||||
def base_url_parameters(self) -> Dict[str, str]: ...
|
|
||||||
def url_parameters(self) -> Dict[str, str]: ...
|
|
||||||
def label_and_url_for_value(self, value: Any): ...
|
def label_and_url_for_value(self, value: Any): ...
|
||||||
|
|
||||||
class ManyToManyRawIdWidget(ForeignKeyRawIdWidget):
|
class ManyToManyRawIdWidget(ForeignKeyRawIdWidget):
|
||||||
@@ -111,48 +83,42 @@ class RelatedFieldWidgetWrapper(forms.Widget):
|
|||||||
admin_site: Any = ...
|
admin_site: Any = ...
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
widget: Union[Select, AdminRadioSelect],
|
widget: Any,
|
||||||
rel: ForeignObjectRel,
|
rel: Any,
|
||||||
admin_site: AdminSite,
|
admin_site: Any,
|
||||||
can_add_related: Optional[bool] = ...,
|
can_add_related: Optional[Any] = ...,
|
||||||
can_change_related: bool = ...,
|
can_change_related: bool = ...,
|
||||||
can_delete_related: bool = ...,
|
can_delete_related: bool = ...,
|
||||||
can_view_related: bool = ...,
|
can_view_related: bool = ...,
|
||||||
) -> None: ...
|
) -> None: ...
|
||||||
def __deepcopy__(self, memo: Dict[int, Any]) -> RelatedFieldWidgetWrapper: ...
|
def __deepcopy__(self, memo: Any): ...
|
||||||
@property
|
@property
|
||||||
def is_hidden(self) -> bool: ...
|
def is_hidden(self): ...
|
||||||
@property
|
@property
|
||||||
def media(self) -> Media: ...
|
def media(self): ...
|
||||||
def get_related_url(self, info: Tuple[str, str], action: str, *args: Any) -> str: ...
|
def get_related_url(self, info: Any, action: Any, *args: Any): ...
|
||||||
def get_context(
|
def get_context(self, name: Any, value: Any, attrs: Any): ...
|
||||||
self, name: str, value: Optional[Union[str, int]], attrs: Dict[str, str]
|
def value_from_datadict(self, data: Any, files: Any, name: Any): ...
|
||||||
) -> Dict[str, Union[bool, str]]: ...
|
|
||||||
def value_from_datadict(
|
|
||||||
self, data: QueryDict, files: MultiValueDict, name: str
|
|
||||||
) -> Optional[str]: ...
|
|
||||||
def value_omitted_from_data(self, data: Any, files: Any, name: Any): ...
|
def value_omitted_from_data(self, data: Any, files: Any, name: Any): ...
|
||||||
def id_for_label(self, id_: str) -> str: ...
|
def id_for_label(self, id_: Any): ...
|
||||||
|
|
||||||
class AdminTextareaWidget(forms.Textarea):
|
class AdminTextareaWidget(forms.Textarea):
|
||||||
def __init__(self, attrs: None = ...) -> None: ...
|
def __init__(self, attrs: Optional[Any] = ...) -> None: ...
|
||||||
|
|
||||||
class AdminTextInputWidget(forms.TextInput):
|
class AdminTextInputWidget(forms.TextInput):
|
||||||
def __init__(self, attrs: None = ...) -> None: ...
|
def __init__(self, attrs: Optional[Any] = ...) -> None: ...
|
||||||
|
|
||||||
class AdminEmailInputWidget(forms.EmailInput):
|
class AdminEmailInputWidget(forms.EmailInput):
|
||||||
def __init__(self, attrs: None = ...) -> None: ...
|
def __init__(self, attrs: Optional[Any] = ...) -> None: ...
|
||||||
|
|
||||||
class AdminURLFieldWidget(forms.URLInput):
|
class AdminURLFieldWidget(forms.URLInput):
|
||||||
template_name: str = ...
|
template_name: str = ...
|
||||||
def __init__(self, attrs: None = ...) -> None: ...
|
def __init__(self, attrs: Optional[Any] = ...) -> None: ...
|
||||||
def get_context(
|
def get_context(self, name: Any, value: Any, attrs: Any): ...
|
||||||
self, name: str, value: None, attrs: Dict[str, str]
|
|
||||||
) -> Dict[str, Union[Dict[str, Union[str, bool, None, Dict[str, str]]], str]]: ...
|
|
||||||
|
|
||||||
class AdminIntegerFieldWidget(forms.NumberInput):
|
class AdminIntegerFieldWidget(forms.NumberInput):
|
||||||
class_name: str = ...
|
class_name: str = ...
|
||||||
def __init__(self, attrs: None = ...) -> None: ...
|
def __init__(self, attrs: Optional[Any] = ...) -> None: ...
|
||||||
|
|
||||||
class AdminBigIntegerFieldWidget(AdminIntegerFieldWidget):
|
class AdminBigIntegerFieldWidget(AdminIntegerFieldWidget):
|
||||||
class_name: str = ...
|
class_name: str = ...
|
||||||
@@ -168,24 +134,19 @@ class AutocompleteMixin:
|
|||||||
attrs: Any = ...
|
attrs: Any = ...
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
rel: ManyToOneRel,
|
rel: Any,
|
||||||
admin_site: AdminSite,
|
admin_site: Any,
|
||||||
attrs: None = ...,
|
attrs: Optional[Any] = ...,
|
||||||
choices: Tuple = ...,
|
choices: Any = ...,
|
||||||
using: None = ...,
|
using: Optional[Any] = ...,
|
||||||
) -> None: ...
|
) -> None: ...
|
||||||
def get_url(self) -> str: ...
|
def get_url(self): ...
|
||||||
def build_attrs(
|
def build_attrs(
|
||||||
self, base_attrs: Dict[Any, Any], extra_attrs: Dict[str, str] = ...
|
self, base_attrs: Any, extra_attrs: Optional[Any] = ...
|
||||||
) -> Dict[str, str]: ...
|
): ...
|
||||||
def optgroups(
|
def optgroups(self, name: Any, value: Any, attr: Optional[Any] = ...): ...
|
||||||
self, name: str, value: List[str], attr: Dict[str, str] = ...
|
|
||||||
) -> Union[
|
|
||||||
List[Tuple[None, List[Dict[str, Union[str, int, Set[str], Dict[str, bool]]]], int]],
|
|
||||||
List[Tuple[None, List[Dict[str, Union[bool, str]]], int]],
|
|
||||||
]: ...
|
|
||||||
@property
|
@property
|
||||||
def media(self) -> Media: ...
|
def media(self): ...
|
||||||
|
|
||||||
class AutocompleteSelect(AutocompleteMixin, forms.Select): ...
|
class AutocompleteSelect(AutocompleteMixin, forms.Select): ...
|
||||||
class AutocompleteSelectMultiple(AutocompleteMixin, forms.SelectMultiple): ...
|
class AutocompleteSelectMultiple(AutocompleteMixin, forms.SelectMultiple): ...
|
||||||
|
|||||||
@@ -1,16 +1,14 @@
|
|||||||
# Stubs for django.contrib.admindocs.middleware (Python 3.6)
|
from typing import Any, Callable, Dict, Optional, Tuple
|
||||||
#
|
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
||||||
|
|
||||||
from .utils import get_view_name
|
|
||||||
from django.utils.deprecation import MiddlewareMixin
|
|
||||||
from typing import Any
|
|
||||||
|
|
||||||
from django.core.handlers.wsgi import WSGIRequest
|
from django.core.handlers.wsgi import WSGIRequest
|
||||||
from django.http.response import HttpResponse
|
from django.http.response import HttpResponse
|
||||||
from typing import Any, Callable, Dict, Optional, Tuple
|
from django.utils.deprecation import MiddlewareMixin
|
||||||
|
|
||||||
|
from .utils import get_view_name
|
||||||
|
|
||||||
|
|
||||||
class XViewMiddleware(MiddlewareMixin):
|
class XViewMiddleware(MiddlewareMixin):
|
||||||
|
get_response: None
|
||||||
def process_view(
|
def process_view(
|
||||||
self,
|
self,
|
||||||
request: WSGIRequest,
|
request: WSGIRequest,
|
||||||
|
|||||||
@@ -1,10 +1,4 @@
|
|||||||
# Stubs for django.contrib.admindocs.utils (Python 3.6)
|
from typing import Any, Callable, Optional
|
||||||
#
|
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
||||||
|
|
||||||
from typing import Any, Optional
|
|
||||||
|
|
||||||
from typing import Callable
|
|
||||||
|
|
||||||
docutils_is_available: bool
|
docutils_is_available: bool
|
||||||
|
|
||||||
@@ -12,7 +6,9 @@ def get_view_name(view_func: Callable) -> str: ...
|
|||||||
def trim_docstring(docstring: Any): ...
|
def trim_docstring(docstring: Any): ...
|
||||||
def parse_docstring(docstring: Any): ...
|
def parse_docstring(docstring: Any): ...
|
||||||
def parse_rst(
|
def parse_rst(
|
||||||
text: Any, default_reference_context: Any, thing_being_parsed: Optional[Any] = ...
|
text: Any,
|
||||||
|
default_reference_context: Any,
|
||||||
|
thing_being_parsed: Optional[Any] = ...,
|
||||||
): ...
|
): ...
|
||||||
|
|
||||||
ROLES: Any
|
ROLES: Any
|
||||||
|
|||||||
@@ -1,12 +1,9 @@
|
|||||||
# Stubs for django.contrib.admindocs.views (Python 3.6)
|
from typing import Any, Optional, Union
|
||||||
#
|
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
||||||
|
|
||||||
from .utils import get_view_name
|
|
||||||
from django.views.generic import TemplateView
|
|
||||||
from typing import Any, Optional
|
|
||||||
|
|
||||||
from django.db.models.fields import Field
|
from django.db.models.fields import Field
|
||||||
|
from django.views.generic import TemplateView
|
||||||
|
|
||||||
|
from .utils import get_view_name
|
||||||
|
|
||||||
MODEL_METHODS_EXCLUDE: Any
|
MODEL_METHODS_EXCLUDE: Any
|
||||||
|
|
||||||
@@ -33,8 +30,6 @@ class ViewIndexView(BaseAdminDocsView):
|
|||||||
|
|
||||||
class ViewDetailView(BaseAdminDocsView):
|
class ViewDetailView(BaseAdminDocsView):
|
||||||
template_name: str = ...
|
template_name: str = ...
|
||||||
@staticmethod
|
|
||||||
def _get_view_func(view: Any): ...
|
|
||||||
def get_context_data(self, **kwargs: Any): ...
|
def get_context_data(self, **kwargs: Any): ...
|
||||||
|
|
||||||
class ModelIndexView(BaseAdminDocsView):
|
class ModelIndexView(BaseAdminDocsView):
|
||||||
@@ -50,8 +45,8 @@ class TemplateDetailView(BaseAdminDocsView):
|
|||||||
def get_context_data(self, **kwargs: Any): ...
|
def get_context_data(self, **kwargs: Any): ...
|
||||||
|
|
||||||
def get_return_data_type(func_name: Any): ...
|
def get_return_data_type(func_name: Any): ...
|
||||||
def get_readable_field_data_type(field: Field) -> str: ...
|
def get_readable_field_data_type(field: Union[str, Field]) -> str: ...
|
||||||
def extract_views_from_urlpatterns(
|
def extract_views_from_urlpatterns(
|
||||||
urlpatterns: Any, base: str = ..., namespace: Optional[Any] = ...
|
urlpatterns: Any, base: str = ..., namespace: Optional[Any] = ...
|
||||||
): ...
|
): ...
|
||||||
def simplify_regex(pattern: Any): ...
|
def simplify_regex(pattern: str) -> str: ...
|
||||||
|
|||||||
@@ -1,44 +1,39 @@
|
|||||||
# Stubs for django.contrib.auth (Python 3.6)
|
from typing import Any, List, Optional, Type, Union
|
||||||
#
|
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
||||||
|
|
||||||
from .signals import user_logged_in, user_logged_out, user_login_failed
|
|
||||||
from typing import Any, Optional
|
|
||||||
|
|
||||||
from django.contrib.auth.backends import ModelBackend
|
from django.contrib.auth.backends import ModelBackend
|
||||||
from django.contrib.auth.base_user import AbstractBaseUser
|
from django.contrib.auth.base_user import AbstractBaseUser
|
||||||
from django.contrib.auth.models import AnonymousUser, User
|
from django.contrib.auth.models import AbstractUser, AnonymousUser
|
||||||
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.options import Options
|
from django.db.models.options import Options
|
||||||
from django.http.request import HttpRequest
|
from django.http.request import HttpRequest
|
||||||
from django.utils.functional import SimpleLazyObject
|
from django.utils.functional import SimpleLazyObject
|
||||||
from typing import Any, Dict, List, Optional, Type, Union
|
|
||||||
|
from .signals import user_logged_in, user_logged_out, user_login_failed
|
||||||
|
|
||||||
SESSION_KEY: str
|
SESSION_KEY: str
|
||||||
BACKEND_SESSION_KEY: str
|
BACKEND_SESSION_KEY: str
|
||||||
HASH_SESSION_KEY: str
|
HASH_SESSION_KEY: str
|
||||||
REDIRECT_FIELD_NAME: str
|
REDIRECT_FIELD_NAME: str
|
||||||
|
|
||||||
def load_backend(path: str) -> object: ...
|
def load_backend(path: str) -> ModelBackend: ...
|
||||||
def _get_backends(return_tuples: bool = ...) -> Any: ...
|
|
||||||
def get_backends() -> List[ModelBackend]: ...
|
def get_backends() -> List[ModelBackend]: ...
|
||||||
def _clean_credentials(
|
|
||||||
credentials: Dict[str, Optional[str]]
|
|
||||||
) -> Dict[str, Optional[str]]: ...
|
|
||||||
def _get_user_session_key(request: HttpRequest) -> int: ...
|
|
||||||
def authenticate(
|
def authenticate(
|
||||||
request: Optional[HttpRequest] = ..., **credentials: Any
|
request: Any = ..., **credentials: Any
|
||||||
) -> Optional[AbstractBaseUser]: ...
|
) -> Optional[AbstractBaseUser]: ...
|
||||||
def login(
|
def login(
|
||||||
request: HttpRequest,
|
request: HttpRequest,
|
||||||
user: User,
|
user: AbstractBaseUser,
|
||||||
backend: Optional[Union[str, Type[ModelBackend]]] = ...,
|
backend: Optional[Union[str, Type[ModelBackend]]] = ...,
|
||||||
) -> None: ...
|
) -> None: ...
|
||||||
def logout(request: HttpRequest) -> None: ...
|
def logout(request: HttpRequest) -> None: ...
|
||||||
def get_user_model() -> Type[Model]: ...
|
def get_user_model() -> Type[Model]: ...
|
||||||
def get_user(request: HttpRequest) -> Union[AnonymousUser, AbstractBaseUser]: ...
|
def get_user(
|
||||||
|
request: HttpRequest
|
||||||
|
) -> Union[AbstractBaseUser, AnonymousUser]: ...
|
||||||
def get_permission_codename(action: str, opts: Options) -> str: ...
|
def get_permission_codename(action: str, opts: Options) -> str: ...
|
||||||
def update_session_auth_hash(request: WSGIRequest, user: SimpleLazyObject) -> None: ...
|
def update_session_auth_hash(
|
||||||
|
request: WSGIRequest, user: Union[SimpleLazyObject, AbstractUser]
|
||||||
|
) -> None: ...
|
||||||
|
|
||||||
default_app_config: str
|
default_app_config: str
|
||||||
|
|||||||
@@ -1,32 +1,121 @@
|
|||||||
|
from typing import Any, Dict, List, Optional, Tuple
|
||||||
|
|
||||||
|
from django.contrib import admin
|
||||||
from django.contrib.auth.models import User
|
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 HttpResponseRedirect
|
from django.http.response import HttpResponse
|
||||||
from django.template.response import TemplateResponse
|
|
||||||
from django.urls.resolvers import URLPattern
|
from django.urls.resolvers import URLPattern
|
||||||
from typing import Dict, List, Tuple, Union
|
|
||||||
|
|
||||||
class GroupAdmin:
|
csrf_protect_m: Any
|
||||||
|
sensitive_post_parameters_m: Any
|
||||||
|
|
||||||
|
class GroupAdmin(admin.ModelAdmin):
|
||||||
|
admin_site: django.contrib.admin.sites.AdminSite
|
||||||
|
formfield_overrides: Dict[
|
||||||
|
Type[
|
||||||
|
Union[
|
||||||
|
django.db.models.fields.DateField,
|
||||||
|
django.db.models.fields.TimeField,
|
||||||
|
django.db.models.fields.TextField,
|
||||||
|
django.db.models.fields.IntegerField,
|
||||||
|
django.db.models.fields.CharField,
|
||||||
|
django.db.models.fields.files.FileField,
|
||||||
|
]
|
||||||
|
],
|
||||||
|
Dict[
|
||||||
|
str,
|
||||||
|
Type[
|
||||||
|
Union[
|
||||||
|
django.forms.fields.SplitDateTimeField,
|
||||||
|
django.contrib.admin.widgets.AdminSplitDateTime,
|
||||||
|
django.contrib.admin.widgets.AdminDateWidget,
|
||||||
|
django.contrib.admin.widgets.AdminTimeWidget,
|
||||||
|
django.contrib.admin.widgets.AdminTextareaWidget,
|
||||||
|
django.contrib.admin.widgets.AdminURLFieldWidget,
|
||||||
|
django.contrib.admin.widgets.AdminIntegerFieldWidget,
|
||||||
|
django.contrib.admin.widgets.AdminTextInputWidget,
|
||||||
|
django.contrib.admin.widgets.AdminFileWidget,
|
||||||
|
django.contrib.admin.widgets.AdminEmailInputWidget,
|
||||||
|
]
|
||||||
|
],
|
||||||
|
],
|
||||||
|
]
|
||||||
|
model: Type[django.contrib.auth.models.Group]
|
||||||
|
opts: django.db.models.options.Options
|
||||||
|
search_fields: Any = ...
|
||||||
|
ordering: Any = ...
|
||||||
|
filter_horizontal: Any = ...
|
||||||
def formfield_for_manytomany(
|
def formfield_for_manytomany(
|
||||||
self, db_field: ManyToManyField, request: WSGIRequest = ..., **kwargs
|
self,
|
||||||
|
db_field: ManyToManyField,
|
||||||
|
request: WSGIRequest = ...,
|
||||||
|
**kwargs: Any
|
||||||
) -> ModelMultipleChoiceField: ...
|
) -> ModelMultipleChoiceField: ...
|
||||||
|
|
||||||
class UserAdmin:
|
class UserAdmin(admin.ModelAdmin):
|
||||||
def _add_view(
|
admin_site: django.contrib.admin.sites.AdminSite
|
||||||
self, request: WSGIRequest, form_url: str = ..., extra_context: None = ...
|
formfield_overrides: Dict[
|
||||||
) -> Union[TemplateResponse, HttpResponseRedirect]: ...
|
Type[
|
||||||
def add_view(
|
Union[
|
||||||
self, request: WSGIRequest, form_url: str = ..., extra_context: None = ...
|
django.db.models.fields.DateField,
|
||||||
): ...
|
django.db.models.fields.TimeField,
|
||||||
|
django.db.models.fields.TextField,
|
||||||
|
django.db.models.fields.IntegerField,
|
||||||
|
django.db.models.fields.CharField,
|
||||||
|
django.db.models.fields.files.FileField,
|
||||||
|
]
|
||||||
|
],
|
||||||
|
Dict[
|
||||||
|
str,
|
||||||
|
Type[
|
||||||
|
Union[
|
||||||
|
django.forms.fields.SplitDateTimeField,
|
||||||
|
django.contrib.admin.widgets.AdminSplitDateTime,
|
||||||
|
django.contrib.admin.widgets.AdminDateWidget,
|
||||||
|
django.contrib.admin.widgets.AdminTimeWidget,
|
||||||
|
django.contrib.admin.widgets.AdminTextareaWidget,
|
||||||
|
django.contrib.admin.widgets.AdminURLFieldWidget,
|
||||||
|
django.contrib.admin.widgets.AdminIntegerFieldWidget,
|
||||||
|
django.contrib.admin.widgets.AdminTextInputWidget,
|
||||||
|
django.contrib.admin.widgets.AdminFileWidget,
|
||||||
|
django.contrib.admin.widgets.AdminEmailInputWidget,
|
||||||
|
]
|
||||||
|
],
|
||||||
|
],
|
||||||
|
]
|
||||||
|
model: Type[django.contrib.auth.models.User]
|
||||||
|
opts: django.db.models.options.Options
|
||||||
|
add_form_template: str = ...
|
||||||
|
change_user_password_template: Any = ...
|
||||||
|
fieldsets: Any = ...
|
||||||
|
add_fieldsets: Any = ...
|
||||||
|
form: Any = ...
|
||||||
|
add_form: Any = ...
|
||||||
|
change_password_form: Any = ...
|
||||||
|
list_display: Any = ...
|
||||||
|
list_filter: Any = ...
|
||||||
|
search_fields: Any = ...
|
||||||
|
ordering: Any = ...
|
||||||
|
filter_horizontal: Any = ...
|
||||||
def get_fieldsets(
|
def get_fieldsets(
|
||||||
self, request: WSGIRequest, obj: None = ...
|
self, request: WSGIRequest, obj: None = ...
|
||||||
) -> Tuple[Tuple[None, Dict[str, Union[Tuple[str], Tuple[str, str, str]]]]]: ...
|
) -> Tuple[Tuple[None, Dict[str, Tuple[str]]]]: ...
|
||||||
|
def get_form(
|
||||||
|
self, request: Any, obj: Optional[Any] = ..., **kwargs: Any
|
||||||
|
): ...
|
||||||
def get_urls(self) -> List[URLPattern]: ...
|
def get_urls(self) -> List[URLPattern]: ...
|
||||||
def lookup_allowed(self, lookup: str, value: str) -> bool: ...
|
def lookup_allowed(self, lookup: str, value: str) -> bool: ...
|
||||||
def response_add(
|
def add_view(
|
||||||
self, request: WSGIRequest, obj: User, post_url_continue: None = ...
|
self,
|
||||||
) -> HttpResponseRedirect: ...
|
request: WSGIRequest,
|
||||||
|
form_url: str = ...,
|
||||||
|
extra_context: None = ...,
|
||||||
|
) -> Any: ...
|
||||||
def user_change_password(
|
def user_change_password(
|
||||||
self, request: WSGIRequest, id: str, form_url: str = ...
|
self, request: WSGIRequest, id: str, form_url: str = ...
|
||||||
) -> Union[TemplateResponse, HttpResponseRedirect]: ...
|
) -> HttpResponse: ...
|
||||||
|
def response_add(
|
||||||
|
self, request: WSGIRequest, obj: User, post_url_continue: None = ...
|
||||||
|
) -> HttpResponse: ...
|
||||||
|
|||||||
@@ -1,14 +1,19 @@
|
|||||||
# Stubs for django.contrib.auth.apps (Python 3.6)
|
from typing import Any, Optional
|
||||||
#
|
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
from django.apps import AppConfig
|
||||||
|
|
||||||
from .checks import check_models_permissions, check_user_model
|
from .checks import check_models_permissions, check_user_model
|
||||||
from .management import create_permissions
|
from .management import create_permissions
|
||||||
from .signals import user_logged_in
|
from .signals import user_logged_in
|
||||||
from django.apps import AppConfig
|
|
||||||
from typing import Any
|
|
||||||
|
|
||||||
class AuthConfig(AppConfig):
|
class AuthConfig(AppConfig):
|
||||||
|
apps: None
|
||||||
|
label: str
|
||||||
|
models: None
|
||||||
|
models_module: None
|
||||||
|
module: Any
|
||||||
|
path: str
|
||||||
name: str = ...
|
name: str = ...
|
||||||
verbose_name: Any = ...
|
verbose_name: Any = ...
|
||||||
def ready(self) -> None: ...
|
def ready(self) -> None: ...
|
||||||
|
|||||||
@@ -1,42 +1,52 @@
|
|||||||
|
from typing import Any, Optional, Set, Union
|
||||||
|
|
||||||
from django.contrib.auth.base_user import AbstractBaseUser
|
from django.contrib.auth.base_user import AbstractBaseUser
|
||||||
from django.contrib.auth.models import AnonymousUser, User
|
from django.contrib.auth.models import AnonymousUser, User
|
||||||
from django.core.handlers.wsgi import WSGIRequest
|
from django.core.handlers.wsgi import WSGIRequest
|
||||||
from django.db.models.query import QuerySet
|
|
||||||
from django.http.request import HttpRequest
|
|
||||||
from typing import Optional, Set, Union
|
|
||||||
|
|
||||||
class AllowAllUsersModelBackend:
|
UserModel: Any
|
||||||
def user_can_authenticate(self, user: User) -> bool: ...
|
|
||||||
|
|
||||||
class AllowAllUsersRemoteUserBackend:
|
|
||||||
def user_can_authenticate(self, user: User) -> bool: ...
|
|
||||||
|
|
||||||
class ModelBackend:
|
class ModelBackend:
|
||||||
def _get_group_permissions(self, user_obj: User) -> QuerySet: ...
|
|
||||||
def _get_permissions(self, user_obj: User, obj: None, from_name: str) -> Set[str]: ...
|
|
||||||
def _get_user_permissions(self, user_obj: User) -> QuerySet: ...
|
|
||||||
def authenticate(
|
def authenticate(
|
||||||
self,
|
self,
|
||||||
request: Optional[HttpRequest],
|
request: Any,
|
||||||
username: Optional[str] = ...,
|
username: Optional[Union[str, int]] = ...,
|
||||||
password: Optional[str] = ...,
|
password: Optional[str] = ...,
|
||||||
**kwargs,
|
**kwargs: Any
|
||||||
) -> Optional[User]: ...
|
) -> Optional[AbstractBaseUser]: ...
|
||||||
def get_all_permissions(self, user_obj: User, obj: Optional[str] = ...) -> Set[str]: ...
|
def user_can_authenticate(
|
||||||
def get_group_permissions(self, user_obj: User, obj: None = ...) -> Set[str]: ...
|
self, user: Optional[AbstractBaseUser]
|
||||||
def get_user(self, user_id: int) -> User: ...
|
|
||||||
def get_user_permissions(self, user_obj: User, obj: None = ...) -> Set[str]: ...
|
|
||||||
def has_module_perms(
|
|
||||||
self, user_obj: Union[AnonymousUser, User], app_label: str
|
|
||||||
) -> bool: ...
|
) -> bool: ...
|
||||||
|
def get_user_permissions(
|
||||||
|
self, user_obj: AbstractBaseUser, obj: None = ...
|
||||||
|
) -> Set[str]: ...
|
||||||
|
def get_group_permissions(
|
||||||
|
self, user_obj: AbstractBaseUser, obj: None = ...
|
||||||
|
) -> Set[str]: ...
|
||||||
|
def get_all_permissions(
|
||||||
|
self, user_obj: AbstractBaseUser, obj: Optional[str] = ...
|
||||||
|
) -> Set[str]: ...
|
||||||
def has_perm(
|
def has_perm(
|
||||||
self, user_obj: Union[AnonymousUser, User], perm: str, obj: None = ...
|
self,
|
||||||
|
user_obj: Union[AnonymousUser, AbstractBaseUser],
|
||||||
|
perm: str,
|
||||||
|
obj: Optional[str] = ...,
|
||||||
) -> bool: ...
|
) -> bool: ...
|
||||||
def user_can_authenticate(self, user: Optional[AbstractBaseUser]) -> bool: ...
|
def has_module_perms(
|
||||||
|
self, user_obj: Union[AbstractBaseUser, AnonymousUser], app_label: str
|
||||||
|
) -> bool: ...
|
||||||
|
def get_user(self, user_id: int) -> AbstractBaseUser: ...
|
||||||
|
|
||||||
class RemoteUserBackend:
|
class AllowAllUsersModelBackend(ModelBackend):
|
||||||
|
def user_can_authenticate(self, user: AbstractBaseUser) -> bool: ...
|
||||||
|
|
||||||
|
class RemoteUserBackend(ModelBackend):
|
||||||
|
create_unknown_user: bool = ...
|
||||||
def authenticate(
|
def authenticate(
|
||||||
self, request: WSGIRequest, remote_user: Optional[str]
|
self, request: WSGIRequest, remote_user: Optional[str]
|
||||||
) -> Optional[User]: ...
|
) -> Optional[User]: ...
|
||||||
def clean_username(self, username: str) -> str: ...
|
def clean_username(self, username: str) -> str: ...
|
||||||
def configure_user(self, user: User) -> User: ...
|
def configure_user(self, user: User) -> User: ...
|
||||||
|
|
||||||
|
class AllowAllUsersRemoteUserBackend(RemoteUserBackend):
|
||||||
|
def user_can_authenticate(self, user: User) -> bool: ...
|
||||||
|
|||||||
@@ -1,25 +1,44 @@
|
|||||||
from typing import Optional
|
from typing import Any, Optional, Tuple, Union
|
||||||
|
|
||||||
class AbstractBaseUser:
|
from django.db import models
|
||||||
def __str__(self) -> str: ...
|
|
||||||
def check_password(self, raw_password: str) -> bool: ...
|
|
||||||
def clean(self) -> None: ...
|
class BaseUserManager(models.Manager):
|
||||||
|
creation_counter: int
|
||||||
|
model: None
|
||||||
|
name: None
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_email_field_name(cls) -> str: ...
|
def normalize_email(cls, email: Optional[str]) -> str: ...
|
||||||
def get_session_auth_hash(self) -> str: ...
|
def make_random_password(
|
||||||
|
self, length: int = ..., allowed_chars: str = ...
|
||||||
|
) -> str: ...
|
||||||
|
def get_by_natural_key(
|
||||||
|
self, username: Optional[str]
|
||||||
|
) -> AbstractBaseUser: ...
|
||||||
|
|
||||||
|
class AbstractBaseUser(models.Model):
|
||||||
|
password: str = ...
|
||||||
|
last_login: None = ...
|
||||||
|
is_active: bool = ...
|
||||||
|
REQUIRED_FIELDS: Any = ...
|
||||||
|
class Meta:
|
||||||
|
abstract: bool = ...
|
||||||
def get_username(self) -> str: ...
|
def get_username(self) -> str: ...
|
||||||
def has_usable_password(self) -> bool: ...
|
def clean(self) -> None: ...
|
||||||
|
def save(self, *args: Any, **kwargs: Any) -> None: ...
|
||||||
|
def natural_key(self) -> Tuple[str]: ...
|
||||||
@property
|
@property
|
||||||
def is_anonymous(self) -> bool: ...
|
def is_anonymous(self) -> bool: ...
|
||||||
@property
|
@property
|
||||||
def is_authenticated(self) -> bool: ...
|
def is_authenticated(self) -> bool: ...
|
||||||
@classmethod
|
|
||||||
def normalize_username(cls, username: str) -> str: ...
|
|
||||||
def save(self, *args, **kwargs) -> None: ...
|
|
||||||
def set_password(self, raw_password: Optional[str]) -> None: ...
|
def set_password(self, raw_password: Optional[str]) -> None: ...
|
||||||
|
def check_password(self, raw_password: str) -> bool: ...
|
||||||
def set_unusable_password(self) -> None: ...
|
def set_unusable_password(self) -> None: ...
|
||||||
|
def has_usable_password(self) -> bool: ...
|
||||||
class BaseUserManager:
|
def get_session_auth_hash(self) -> str: ...
|
||||||
def get_by_natural_key(self, username: Optional[str]) -> AbstractBaseUser: ...
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def normalize_email(cls, email: Optional[str]) -> str: ...
|
def get_email_field_name(cls) -> str: ...
|
||||||
|
@classmethod
|
||||||
|
def normalize_username(
|
||||||
|
cls, username: Union[str, int]
|
||||||
|
) -> Union[str, int]: ...
|
||||||
|
|||||||
@@ -1,11 +1,13 @@
|
|||||||
# Stubs for django.contrib.auth.checks (Python 3.6)
|
from typing import Any, List, Optional
|
||||||
#
|
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
from django.core.checks.messages import CheckMessage
|
||||||
|
|
||||||
from .management import _get_builtin_permissions
|
from .management import _get_builtin_permissions
|
||||||
from typing import Any, Optional
|
|
||||||
|
|
||||||
from typing import Any, List
|
|
||||||
|
|
||||||
def check_user_model(app_configs: None = ..., **kwargs: Any) -> List[Any]: ...
|
def check_user_model(
|
||||||
def check_models_permissions(app_configs: None = ..., **kwargs: Any) -> List[Any]: ...
|
app_configs: None = ..., **kwargs: Any
|
||||||
|
) -> List[CheckMessage]: ...
|
||||||
|
def check_models_permissions(
|
||||||
|
app_configs: None = ..., **kwargs: Any
|
||||||
|
) -> List[Any]: ...
|
||||||
|
|||||||
@@ -1,25 +1,27 @@
|
|||||||
# Stubs for django.contrib.auth.context_processors (Python 3.6)
|
from typing import Any, Dict, Optional, Union
|
||||||
#
|
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
||||||
|
|
||||||
from typing import Any
|
|
||||||
|
|
||||||
from django.contrib.auth.models import AnonymousUser, User
|
from django.contrib.auth.models import AnonymousUser, User
|
||||||
from django.http.request import HttpRequest
|
from django.http.request import HttpRequest
|
||||||
from typing import Dict, Union
|
from django.utils.functional import SimpleLazyObject
|
||||||
|
|
||||||
|
|
||||||
class PermLookupDict:
|
class PermLookupDict:
|
||||||
def __init__(self, user: object, app_label: str) -> None: ...
|
app_label: django.utils.safestring.SafeText
|
||||||
def __repr__(self): ...
|
user: django.utils.functional.SimpleLazyObject
|
||||||
|
def __init__(self, user: SimpleLazyObject, app_label: str) -> None: ...
|
||||||
def __getitem__(self, perm_name: str) -> bool: ...
|
def __getitem__(self, perm_name: str) -> bool: ...
|
||||||
def __iter__(self) -> None: ...
|
def __iter__(self) -> Any: ...
|
||||||
def __bool__(self) -> bool: ...
|
def __bool__(self) -> bool: ...
|
||||||
|
|
||||||
class PermWrapper:
|
class PermWrapper:
|
||||||
user: Any = ...
|
user: django.utils.functional.SimpleLazyObject = ...
|
||||||
def __init__(self, user: object) -> None: ...
|
def __init__(
|
||||||
|
self, user: Union[SimpleLazyObject, AnonymousUser, User]
|
||||||
|
) -> None: ...
|
||||||
def __getitem__(self, app_label: str) -> PermLookupDict: ...
|
def __getitem__(self, app_label: str) -> PermLookupDict: ...
|
||||||
def __iter__(self) -> None: ...
|
def __iter__(self) -> Any: ...
|
||||||
def __contains__(self, perm_name: str) -> bool: ...
|
def __contains__(self, perm_name: Union[str, bool]) -> bool: ...
|
||||||
|
|
||||||
def auth(request: HttpRequest) -> Dict[str, Union[PermWrapper, AnonymousUser, User]]: ...
|
def auth(
|
||||||
|
request: HttpRequest
|
||||||
|
) -> Dict[str, Union[SimpleLazyObject, PermWrapper, User, AnonymousUser]]: ...
|
||||||
|
|||||||
@@ -1,19 +1,18 @@
|
|||||||
# Stubs for django.contrib.auth.decorators (Python 3.6)
|
from typing import Any, Callable, List, Optional, Set, Union
|
||||||
#
|
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
||||||
|
|
||||||
from typing import Any, Optional
|
|
||||||
|
|
||||||
from typing import Callable, List, Optional, Union
|
|
||||||
|
|
||||||
def user_passes_test(
|
def user_passes_test(
|
||||||
test_func: Callable, login_url: Optional[str] = ..., redirect_field_name: str = ...
|
test_func: Callable,
|
||||||
|
login_url: Optional[str] = ...,
|
||||||
|
redirect_field_name: str = ...,
|
||||||
) -> Callable: ...
|
) -> Callable: ...
|
||||||
def login_required(
|
def login_required(
|
||||||
function: Optional[Callable] = ...,
|
function: Optional[Callable] = ...,
|
||||||
redirect_field_name: str = ...,
|
redirect_field_name: str = ...,
|
||||||
login_url: None = ...,
|
login_url: Optional[str] = ...,
|
||||||
) -> Callable: ...
|
) -> Callable: ...
|
||||||
def permission_required(
|
def permission_required(
|
||||||
perm: Union[str, List[str]], login_url: None = ..., raise_exception: bool = ...
|
perm: Union[str, List[str], Set[str]],
|
||||||
|
login_url: None = ...,
|
||||||
|
raise_exception: bool = ...,
|
||||||
) -> Callable: ...
|
) -> Callable: ...
|
||||||
|
|||||||
@@ -1,75 +1,198 @@
|
|||||||
from django.contrib.auth.models import User
|
from typing import Any, Dict, Iterator, List, Optional, Union
|
||||||
|
|
||||||
|
from django import forms
|
||||||
|
from django.contrib.auth.base_user import AbstractBaseUser
|
||||||
|
from django.contrib.auth.models import AbstractUser, User
|
||||||
from django.contrib.auth.tokens import PasswordResetTokenGenerator
|
from django.contrib.auth.tokens import PasswordResetTokenGenerator
|
||||||
from django.core.exceptions import ValidationError
|
from django.core.exceptions import ValidationError
|
||||||
from django.core.handlers.wsgi import WSGIRequest
|
from django.core.handlers.wsgi import WSGIRequest
|
||||||
from typing import Any, Dict, Iterator, List, Optional, Union
|
from django.utils.functional import SimpleLazyObject
|
||||||
|
|
||||||
class AdminPasswordChangeForm:
|
UserModel: Any
|
||||||
def __init__(self, user: User, *args, **kwargs) -> None: ...
|
|
||||||
@property
|
class ReadOnlyPasswordHashWidget(forms.Widget):
|
||||||
def changed_data(self) -> List[str]: ...
|
attrs: Dict[Any, Any]
|
||||||
|
template_name: str = ...
|
||||||
|
def get_context(
|
||||||
|
self, name: str, value: Optional[str], attrs: Dict[str, str]
|
||||||
|
) -> Dict[
|
||||||
|
str,
|
||||||
|
Union[
|
||||||
|
Dict[str, Union[str, bool, None, Dict[Any, Any]]],
|
||||||
|
List[Dict[str, str]],
|
||||||
|
Dict[str, Union[str, bool, None, Dict[str, str]]],
|
||||||
|
Dict[str, Union[str, bool, Dict[str, str]]],
|
||||||
|
],
|
||||||
|
]: ...
|
||||||
|
|
||||||
|
class ReadOnlyPasswordHashField(forms.Field):
|
||||||
|
widget: Any = ...
|
||||||
|
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
|
||||||
|
def bound_data(self, data: None, initial: str) -> str: ...
|
||||||
|
def has_changed(self, initial: str, data: Optional[str]) -> bool: ...
|
||||||
|
|
||||||
|
class UsernameField(forms.CharField):
|
||||||
|
def to_python(self, value: Optional[str]) -> str: ...
|
||||||
|
|
||||||
|
class UserCreationForm(forms.ModelForm):
|
||||||
|
auto_id: str
|
||||||
|
data: Dict[str, str]
|
||||||
|
empty_permitted: bool
|
||||||
|
error_class: Type[django.forms.utils.ErrorList]
|
||||||
|
fields: collections.OrderedDict
|
||||||
|
files: Dict[Any, Any]
|
||||||
|
initial: Dict[Any, Any]
|
||||||
|
instance: django.contrib.auth.models.User
|
||||||
|
is_bound: bool
|
||||||
|
label_suffix: str
|
||||||
|
error_messages: Any = ...
|
||||||
|
password1: Any = ...
|
||||||
|
password2: Any = ...
|
||||||
|
class Meta:
|
||||||
|
model: Any = ...
|
||||||
|
fields: Any = ...
|
||||||
|
field_classes: Any = ...
|
||||||
|
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
|
||||||
def clean_password2(self) -> str: ...
|
def clean_password2(self) -> str: ...
|
||||||
def save(self, commit: bool = ...) -> User: ...
|
def save(self, commit: bool = ...) -> User: ...
|
||||||
|
|
||||||
class AuthenticationForm:
|
class UserChangeForm(forms.ModelForm):
|
||||||
def __init__(self, request: object = ..., *args, **kwargs) -> None: ...
|
auto_id: str
|
||||||
def clean(self) -> Dict[str, str]: ...
|
data: Dict[Any, Any]
|
||||||
def confirm_login_allowed(self, user: User) -> None: ...
|
empty_permitted: bool
|
||||||
def get_invalid_login_error(self) -> ValidationError: ...
|
error_class: Type[django.forms.utils.ErrorList]
|
||||||
def get_user(self) -> User: ...
|
fields: collections.OrderedDict
|
||||||
|
files: Dict[Any, Any]
|
||||||
|
initial: Dict[str, Optional[Union[int, str, datetime.datetime, List[Any]]]]
|
||||||
|
instance: django.contrib.auth.models.User
|
||||||
|
is_bound: bool
|
||||||
|
label_suffix: str
|
||||||
|
password: Any = ...
|
||||||
|
class Meta:
|
||||||
|
model: Any = ...
|
||||||
|
fields: str = ...
|
||||||
|
field_classes: Any = ...
|
||||||
|
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
|
||||||
|
def clean_password(self) -> str: ...
|
||||||
|
|
||||||
class PasswordChangeForm:
|
class AuthenticationForm(forms.Form):
|
||||||
def clean_old_password(self) -> str: ...
|
auto_id: str
|
||||||
|
data: django.http.request.QueryDict
|
||||||
class PasswordResetForm:
|
empty_permitted: bool
|
||||||
def get_users(self, email: str) -> Iterator[Any]: ...
|
error_class: Type[django.forms.utils.ErrorList]
|
||||||
def save(
|
fields: collections.OrderedDict
|
||||||
self,
|
files: django.utils.datastructures.MultiValueDict
|
||||||
domain_override: None = ...,
|
initial: Dict[Any, Any]
|
||||||
subject_template_name: str = ...,
|
is_bound: bool
|
||||||
email_template_name: str = ...,
|
label_suffix: str
|
||||||
use_https: bool = ...,
|
username: Any = ...
|
||||||
token_generator: PasswordResetTokenGenerator = ...,
|
password: Any = ...
|
||||||
from_email: None = ...,
|
error_messages: Any = ...
|
||||||
request: Optional[WSGIRequest] = ...,
|
request: django.core.handlers.wsgi.WSGIRequest = ...
|
||||||
html_email_template_name: None = ...,
|
user_cache: None = ...
|
||||||
extra_email_context: Optional[Dict[str, str]] = ...,
|
username_field: Any = ...
|
||||||
|
def __init__(
|
||||||
|
self, request: Any = ..., *args: Any, **kwargs: Any
|
||||||
) -> None: ...
|
) -> None: ...
|
||||||
|
def clean(self) -> Dict[str, str]: ...
|
||||||
|
def confirm_login_allowed(self, user: AbstractBaseUser) -> None: ...
|
||||||
|
def get_user(self) -> User: ...
|
||||||
|
def get_invalid_login_error(self) -> ValidationError: ...
|
||||||
|
|
||||||
|
class PasswordResetForm(forms.Form):
|
||||||
|
auto_id: str
|
||||||
|
data: Dict[Any, Any]
|
||||||
|
empty_permitted: bool
|
||||||
|
error_class: Type[django.forms.utils.ErrorList]
|
||||||
|
fields: collections.OrderedDict
|
||||||
|
files: Dict[Any, Any]
|
||||||
|
initial: Dict[Any, Any]
|
||||||
|
is_bound: bool
|
||||||
|
label_suffix: str
|
||||||
|
email: Any = ...
|
||||||
def send_mail(
|
def send_mail(
|
||||||
self,
|
self,
|
||||||
subject_template_name: str,
|
subject_template_name: str,
|
||||||
email_template_name: str,
|
email_template_name: str,
|
||||||
context: Dict[str, Union[str, User]],
|
context: Dict[str, Union[str, AbstractBaseUser]],
|
||||||
from_email: Optional[str],
|
from_email: Optional[str],
|
||||||
to_email: str,
|
to_email: str,
|
||||||
html_email_template_name: None = ...,
|
html_email_template_name: Optional[str] = ...,
|
||||||
|
) -> None: ...
|
||||||
|
def get_users(self, email: str) -> Iterator[Any]: ...
|
||||||
|
def save(
|
||||||
|
self,
|
||||||
|
domain_override: Optional[str] = ...,
|
||||||
|
subject_template_name: str = ...,
|
||||||
|
email_template_name: str = ...,
|
||||||
|
use_https: bool = ...,
|
||||||
|
token_generator: PasswordResetTokenGenerator = ...,
|
||||||
|
from_email: Optional[str] = ...,
|
||||||
|
request: Optional[WSGIRequest] = ...,
|
||||||
|
html_email_template_name: Optional[str] = ...,
|
||||||
|
extra_email_context: Optional[Dict[str, str]] = ...,
|
||||||
) -> None: ...
|
) -> None: ...
|
||||||
|
|
||||||
class ReadOnlyPasswordHashField:
|
class SetPasswordForm(forms.Form):
|
||||||
def __init__(self, *args, **kwargs) -> None: ...
|
auto_id: str
|
||||||
def has_changed(self, initial: str, data: None) -> bool: ...
|
data: Dict[Any, Any]
|
||||||
|
empty_permitted: bool
|
||||||
class ReadOnlyPasswordHashWidget:
|
error_class: Type[django.forms.utils.ErrorList]
|
||||||
def get_context(
|
fields: collections.OrderedDict
|
||||||
self, name: str, value: str, attrs: Dict[str, str]
|
files: Dict[Any, Any]
|
||||||
) -> Dict[
|
initial: Dict[Any, Any]
|
||||||
str, Union[Dict[str, Union[str, bool, Dict[str, str]]], List[Dict[str, str]]]
|
is_bound: bool
|
||||||
]: ...
|
label_suffix: str
|
||||||
|
error_messages: Any = ...
|
||||||
class SetPasswordForm:
|
new_password1: Any = ...
|
||||||
def __init__(self, user: Optional[User], *args, **kwargs) -> None: ...
|
new_password2: Any = ...
|
||||||
|
user: django.contrib.auth.models.User = ...
|
||||||
|
def __init__(
|
||||||
|
self,
|
||||||
|
user: Optional[Union[SimpleLazyObject, AbstractBaseUser]],
|
||||||
|
*args: Any,
|
||||||
|
**kwargs: Any
|
||||||
|
) -> None: ...
|
||||||
def clean_new_password2(self) -> str: ...
|
def clean_new_password2(self) -> str: ...
|
||||||
def save(self, commit: bool = ...) -> User: ...
|
def save(
|
||||||
|
self, commit: bool = ...
|
||||||
|
) -> Union[AbstractBaseUser, SimpleLazyObject]: ...
|
||||||
|
|
||||||
class UserChangeForm:
|
class PasswordChangeForm(SetPasswordForm):
|
||||||
def __init__(self, *args, **kwargs) -> None: ...
|
auto_id: str
|
||||||
def clean_password(self) -> str: ...
|
data: Dict[Any, Any]
|
||||||
|
empty_permitted: bool
|
||||||
|
error_class: Type[django.forms.utils.ErrorList]
|
||||||
|
fields: collections.OrderedDict
|
||||||
|
files: Dict[Any, Any]
|
||||||
|
initial: Dict[Any, Any]
|
||||||
|
is_bound: bool
|
||||||
|
label_suffix: str
|
||||||
|
user: django.contrib.auth.models.User
|
||||||
|
error_messages: Any = ...
|
||||||
|
old_password: Any = ...
|
||||||
|
field_order: Any = ...
|
||||||
|
def clean_old_password(self) -> str: ...
|
||||||
|
|
||||||
class UserCreationForm:
|
class AdminPasswordChangeForm(forms.Form):
|
||||||
def __init__(self, *args, **kwargs) -> None: ...
|
auto_id: str
|
||||||
def _post_clean(self) -> None: ...
|
data: Dict[Any, Any]
|
||||||
|
empty_permitted: bool
|
||||||
|
error_class: Type[django.forms.utils.ErrorList]
|
||||||
|
fields: collections.OrderedDict
|
||||||
|
files: Dict[Any, Any]
|
||||||
|
initial: Dict[Any, Any]
|
||||||
|
is_bound: bool
|
||||||
|
label_suffix: str
|
||||||
|
error_messages: Any = ...
|
||||||
|
required_css_class: str = ...
|
||||||
|
password1: Any = ...
|
||||||
|
password2: Any = ...
|
||||||
|
user: django.contrib.auth.models.User = ...
|
||||||
|
def __init__(
|
||||||
|
self, user: AbstractUser, *args: Any, **kwargs: Any
|
||||||
|
) -> None: ...
|
||||||
def clean_password2(self) -> str: ...
|
def clean_password2(self) -> str: ...
|
||||||
def save(self, commit: bool = ...) -> User: ...
|
def save(self, commit: bool = ...) -> AbstractUser: ...
|
||||||
|
@property
|
||||||
class UsernameField:
|
def changed_data(self) -> List[str]: ...
|
||||||
def to_python(self, value: Optional[str]) -> str: ...
|
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
from typing import Any, Dict
|
from typing import Any, Dict, Optional
|
||||||
|
|
||||||
def check_password(environ: Dict[Any, Any], username: str, password: str): ...
|
UserModel: Any
|
||||||
def groups_for_user(environ: Dict[Any, Any], username: str): ...
|
|
||||||
|
def check_password(
|
||||||
|
environ: Dict[Any, Any], username: str, password: str
|
||||||
|
) -> Any: ...
|
||||||
|
def groups_for_user(environ: Dict[Any, Any], username: str) -> Any: ...
|
||||||
|
|||||||
@@ -1,28 +1,20 @@
|
|||||||
# Stubs for django.contrib.auth.hashers (Python 3.6)
|
|
||||||
#
|
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
||||||
|
|
||||||
from typing import Any, Optional
|
|
||||||
|
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
from typing import Callable, Dict, List, Optional, Union
|
from typing import Any, Callable, Dict, List, Optional
|
||||||
|
|
||||||
UNUSABLE_PASSWORD_PREFIX: str
|
UNUSABLE_PASSWORD_PREFIX: str
|
||||||
UNUSABLE_PASSWORD_SUFFIX_LENGTH: int
|
UNUSABLE_PASSWORD_SUFFIX_LENGTH: int
|
||||||
|
|
||||||
def is_password_usable(encoded: Optional[str]) -> bool: ...
|
def is_password_usable(encoded: Optional[str]) -> bool: ...
|
||||||
def check_password(
|
def check_password(
|
||||||
password: str, encoded: str, setter: Optional[Callable] = ..., preferred: str = ...
|
password: Optional[str],
|
||||||
|
encoded: str,
|
||||||
|
setter: Optional[Callable] = ...,
|
||||||
|
preferred: str = ...,
|
||||||
) -> bool: ...
|
) -> bool: ...
|
||||||
def make_password(
|
def make_password(
|
||||||
password: Optional[str], salt: Optional[str] = ..., hasher: str = ...
|
password: Optional[str], salt: Optional[str] = ..., hasher: str = ...
|
||||||
) -> str: ...
|
) -> str: ...
|
||||||
def get_hashers() -> Union[
|
def get_hashers() -> List[BasePasswordHasher]: ...
|
||||||
List[UnsaltedMD5PasswordHasher],
|
|
||||||
List[MD5PasswordHasher],
|
|
||||||
List[BasePasswordHasher],
|
|
||||||
List[PBKDF2PasswordHasher],
|
|
||||||
]: ...
|
|
||||||
def get_hashers_by_algorithm() -> Dict[str, BasePasswordHasher]: ...
|
def get_hashers_by_algorithm() -> Dict[str, BasePasswordHasher]: ...
|
||||||
def reset_hashers(**kwargs: Any) -> None: ...
|
def reset_hashers(**kwargs: Any) -> None: ...
|
||||||
def get_hasher(algorithm: str = ...) -> BasePasswordHasher: ...
|
def get_hasher(algorithm: str = ...) -> BasePasswordHasher: ...
|
||||||
@@ -32,11 +24,10 @@ def mask_hash(hash: str, show: int = ..., char: str = ...) -> str: ...
|
|||||||
class BasePasswordHasher:
|
class BasePasswordHasher:
|
||||||
algorithm: Any = ...
|
algorithm: Any = ...
|
||||||
library: Any = ...
|
library: Any = ...
|
||||||
def _load_library(self): ...
|
|
||||||
def salt(self) -> str: ...
|
def salt(self) -> str: ...
|
||||||
def verify(self, password: Any, encoded: Any) -> None: ...
|
def verify(self, password: str, encoded: str) -> Any: ...
|
||||||
def encode(self, password: Any, salt: Any) -> None: ...
|
def encode(self, password: str, salt: str) -> Any: ...
|
||||||
def safe_summary(self, encoded: str) -> None: ...
|
def safe_summary(self, encoded: str) -> Any: ...
|
||||||
def must_update(self, encoded: str) -> bool: ...
|
def must_update(self, encoded: str) -> bool: ...
|
||||||
def harden_runtime(self, password: str, encoded: str) -> None: ...
|
def harden_runtime(self, password: str, encoded: str) -> None: ...
|
||||||
|
|
||||||
@@ -44,11 +35,13 @@ class PBKDF2PasswordHasher(BasePasswordHasher):
|
|||||||
algorithm: str = ...
|
algorithm: str = ...
|
||||||
iterations: int = ...
|
iterations: int = ...
|
||||||
digest: Any = ...
|
digest: Any = ...
|
||||||
def encode(self, password: str, salt: str, iterations: Optional[int] = ...) -> str: ...
|
def encode(
|
||||||
|
self, password: str, salt: str, iterations: Optional[int] = ...
|
||||||
|
) -> str: ...
|
||||||
def verify(self, password: str, encoded: str) -> bool: ...
|
def verify(self, password: str, encoded: str) -> bool: ...
|
||||||
def safe_summary(self, encoded: Any): ...
|
def safe_summary(self, encoded: str) -> OrderedDict: ...
|
||||||
def must_update(self, encoded: str) -> bool: ...
|
def must_update(self, encoded: str) -> bool: ...
|
||||||
def harden_runtime(self, password: Any, encoded: Any) -> None: ...
|
def harden_runtime(self, password: str, encoded: str) -> None: ...
|
||||||
|
|
||||||
class PBKDF2SHA1PasswordHasher(PBKDF2PasswordHasher):
|
class PBKDF2SHA1PasswordHasher(PBKDF2PasswordHasher):
|
||||||
algorithm: str = ...
|
algorithm: str = ...
|
||||||
@@ -65,7 +58,6 @@ class Argon2PasswordHasher(BasePasswordHasher):
|
|||||||
def safe_summary(self, encoded: Any): ...
|
def safe_summary(self, encoded: Any): ...
|
||||||
def must_update(self, encoded: Any): ...
|
def must_update(self, encoded: Any): ...
|
||||||
def harden_runtime(self, password: Any, encoded: Any) -> None: ...
|
def harden_runtime(self, password: Any, encoded: Any) -> None: ...
|
||||||
def _decode(self, encoded: Any): ...
|
|
||||||
|
|
||||||
class BCryptSHA256PasswordHasher(BasePasswordHasher):
|
class BCryptSHA256PasswordHasher(BasePasswordHasher):
|
||||||
algorithm: str = ...
|
algorithm: str = ...
|
||||||
@@ -107,7 +99,7 @@ class UnsaltedSHA1PasswordHasher(BasePasswordHasher):
|
|||||||
|
|
||||||
class UnsaltedMD5PasswordHasher(BasePasswordHasher):
|
class UnsaltedMD5PasswordHasher(BasePasswordHasher):
|
||||||
algorithm: str = ...
|
algorithm: str = ...
|
||||||
def salt(self): ...
|
def salt(self) -> str: ...
|
||||||
def encode(self, password: str, salt: str) -> str: ...
|
def encode(self, password: str, salt: str) -> str: ...
|
||||||
def verify(self, password: str, encoded: str) -> bool: ...
|
def verify(self, password: str, encoded: str) -> bool: ...
|
||||||
def safe_summary(self, encoded: Any): ...
|
def safe_summary(self, encoded: Any): ...
|
||||||
|
|||||||
@@ -1,23 +1,16 @@
|
|||||||
# Stubs for django.contrib.auth.management (Python 3.6)
|
from typing import Any, Optional
|
||||||
#
|
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
||||||
|
|
||||||
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
|
||||||
from django.db.models.options import Options
|
|
||||||
from typing import List, Tuple
|
|
||||||
|
|
||||||
def _get_all_permissions(opts: Options) -> List[Tuple[str, str]]: ...
|
|
||||||
def _get_builtin_permissions(opts: Options) -> List[Tuple[str, str]]: ...
|
|
||||||
def create_permissions(
|
def create_permissions(
|
||||||
app_config: AppConfig,
|
app_config: AppConfig,
|
||||||
verbosity: int = ...,
|
verbosity: int = ...,
|
||||||
interactive: bool = ...,
|
interactive: bool = ...,
|
||||||
using: str = ...,
|
using: str = ...,
|
||||||
apps: Apps = ...,
|
apps: Apps = ...,
|
||||||
**kwargs: Any,
|
**kwargs: Any
|
||||||
) -> None: ...
|
) -> None: ...
|
||||||
def get_system_username() -> str: ...
|
def get_system_username() -> str: ...
|
||||||
def get_default_username(check_db: bool = ...) -> str: ...
|
def get_default_username(check_db: bool = ...) -> str: ...
|
||||||
|
|||||||
@@ -1,5 +1,15 @@
|
|||||||
from django.core.management.base import CommandParser
|
from typing import Any, Optional
|
||||||
|
|
||||||
class Command:
|
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 add_arguments(self, parser: CommandParser) -> None: ...
|
||||||
def handle(self, *args, **options) -> str: ...
|
def handle(self, *args: Any, **options: Any) -> str: ...
|
||||||
|
|||||||
@@ -1,16 +1,25 @@
|
|||||||
from django.core.management.base import CommandParser
|
from typing import Any, Optional, Union
|
||||||
from django.db.models.fields import CharField
|
|
||||||
from django.db.models.fields.related import ForeignKey
|
|
||||||
from typing import Optional, Union
|
|
||||||
|
|
||||||
class Command:
|
from django.core.management.base import BaseCommand, CommandParser
|
||||||
def __init__(self, *args, **kwargs) -> None: ...
|
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: ...
|
def add_arguments(self, parser: CommandParser) -> None: ...
|
||||||
def execute(self, *args, **options) -> None: ...
|
stdin: Any = ...
|
||||||
|
def execute(self, *args: Any, **options: Any) -> None: ...
|
||||||
|
def handle(self, *args: Any, **options: Any) -> None: ...
|
||||||
def get_input_data(
|
def get_input_data(
|
||||||
self,
|
self, field: Field, message: str, default: Optional[str] = ...
|
||||||
field: Union[CharField, related.ForeignKey],
|
) -> Optional[Union[str, int]]: ...
|
||||||
message: str,
|
|
||||||
default: Optional[str] = ...,
|
|
||||||
) -> Optional[str]: ...
|
|
||||||
def handle(self, *args, **options) -> None: ...
|
|
||||||
|
|||||||
@@ -1,14 +1,24 @@
|
|||||||
|
from typing import Any, Optional, Union
|
||||||
|
|
||||||
from django.contrib.auth.models import AnonymousUser, User
|
from django.contrib.auth.models import AnonymousUser, User
|
||||||
from django.core.handlers.wsgi import WSGIRequest
|
from django.core.handlers.wsgi import WSGIRequest
|
||||||
from django.http.request import HttpRequest
|
from django.http.request import HttpRequest
|
||||||
from typing import Union
|
from django.utils.deprecation import MiddlewareMixin
|
||||||
|
|
||||||
def get_user(request: HttpRequest) -> Union[AnonymousUser, User]: ...
|
|
||||||
|
|
||||||
class AuthenticationMiddleware:
|
def get_user(request: WSGIRequest) -> Union[AnonymousUser, User]: ...
|
||||||
|
|
||||||
|
class AuthenticationMiddleware(MiddlewareMixin):
|
||||||
|
get_response: Callable
|
||||||
def process_request(self, request: HttpRequest) -> None: ...
|
def process_request(self, request: HttpRequest) -> None: ...
|
||||||
|
|
||||||
class RemoteUserMiddleware:
|
class RemoteUserMiddleware(MiddlewareMixin):
|
||||||
def _remove_invalid_user(self, request: WSGIRequest) -> None: ...
|
get_response: Callable
|
||||||
def clean_username(self, username: str, request: WSGIRequest) -> str: ...
|
header: str = ...
|
||||||
|
force_logout_if_no_header: bool = ...
|
||||||
def process_request(self, request: WSGIRequest) -> None: ...
|
def process_request(self, request: WSGIRequest) -> None: ...
|
||||||
|
def clean_username(self, username: str, request: WSGIRequest) -> str: ...
|
||||||
|
|
||||||
|
class PersistentRemoteUserMiddleware(RemoteUserMiddleware):
|
||||||
|
get_response: Callable
|
||||||
|
force_logout_if_no_header: bool = ...
|
||||||
|
|||||||
@@ -1,18 +1,35 @@
|
|||||||
|
from typing import Any, Callable, List, Optional
|
||||||
|
|
||||||
from django.core.handlers.wsgi import WSGIRequest
|
from django.core.handlers.wsgi import WSGIRequest
|
||||||
from django.http.response import HttpResponse
|
from django.http.response import HttpResponse, HttpResponseRedirect
|
||||||
from typing import Callable, List
|
|
||||||
|
|
||||||
class AccessMixin:
|
class AccessMixin:
|
||||||
|
login_url: Any = ...
|
||||||
|
permission_denied_message: str = ...
|
||||||
|
raise_exception: bool = ...
|
||||||
|
redirect_field_name: Any = ...
|
||||||
|
def get_login_url(self) -> str: ...
|
||||||
def get_permission_denied_message(self) -> str: ...
|
def get_permission_denied_message(self) -> str: ...
|
||||||
def get_redirect_field_name(self) -> str: ...
|
def get_redirect_field_name(self) -> str: ...
|
||||||
def handle_no_permission(self): ...
|
def handle_no_permission(self) -> HttpResponseRedirect: ...
|
||||||
|
|
||||||
class LoginRequiredMixin:
|
class LoginRequiredMixin(AccessMixin):
|
||||||
def dispatch(self, request: WSGIRequest, *args, **kwargs): ...
|
def dispatch(
|
||||||
|
self, request: WSGIRequest, *args: Any, **kwargs: Any
|
||||||
|
) -> HttpResponse: ...
|
||||||
|
|
||||||
class PermissionRequiredMixin:
|
class PermissionRequiredMixin(AccessMixin):
|
||||||
def dispatch(self, request: WSGIRequest, *args, **kwargs) -> HttpResponse: ...
|
permission_required: Any = ...
|
||||||
def get_permission_required(self) -> List[str]: ...
|
def get_permission_required(self) -> List[str]: ...
|
||||||
|
def has_permission(self) -> bool: ...
|
||||||
|
def dispatch(
|
||||||
|
self, request: WSGIRequest, *args: Any, **kwargs: Any
|
||||||
|
) -> HttpResponse: ...
|
||||||
|
|
||||||
class UserPassesTestMixin:
|
class UserPassesTestMixin(AccessMixin):
|
||||||
|
def test_func(self) -> None: ...
|
||||||
def get_test_func(self) -> Callable: ...
|
def get_test_func(self) -> Callable: ...
|
||||||
|
def dispatch(
|
||||||
|
self, request: WSGIRequest, *args: Any, **kwargs: Any
|
||||||
|
) -> HttpResponse: ...
|
||||||
|
|||||||
@@ -1,65 +1,160 @@
|
|||||||
from typing import List, Optional, Set, Tuple, Type, Union
|
from typing import Any, List, Optional, Set, Tuple, Type, Union
|
||||||
|
|
||||||
def _user_get_all_permissions(user: User, obj: Optional[str]) -> Set[str]: ...
|
from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager
|
||||||
def _user_has_module_perms(user: Union[AnonymousUser, User], app_label: str) -> bool: ...
|
from django.db import models
|
||||||
def _user_has_perm(
|
from django.db.models.manager import EmptyManager
|
||||||
user: Union[AnonymousUser, User], perm: str, obj: Optional[str]
|
|
||||||
) -> bool: ...
|
|
||||||
def update_last_login(sender: Type[User], user: User, **kwargs) -> None: ...
|
|
||||||
|
|
||||||
class AbstractUser:
|
from .validators import UnicodeUsernameValidator
|
||||||
def clean(self) -> None: ...
|
|
||||||
def get_short_name(self) -> str: ...
|
|
||||||
|
|
||||||
class AnonymousUser:
|
|
||||||
def __str__(self) -> str: ...
|
|
||||||
def delete(self): ...
|
|
||||||
def get_username(self) -> str: ...
|
|
||||||
def has_module_perms(self, module: str) -> bool: ...
|
|
||||||
def has_perm(self, perm: str, obj: None = ...) -> bool: ...
|
|
||||||
def has_perms(
|
|
||||||
self, perm_list: Union[List[str], Tuple[str]], obj: None = ...
|
|
||||||
) -> bool: ...
|
|
||||||
@property
|
|
||||||
def is_anonymous(self) -> bool: ...
|
|
||||||
@property
|
|
||||||
def is_authenticated(self) -> bool: ...
|
|
||||||
def set_password(self, raw_password: str): ...
|
|
||||||
|
|
||||||
class Group:
|
def update_last_login(
|
||||||
def __str__(self) -> str: ...
|
sender: Type[AbstractBaseUser], user: AbstractBaseUser, **kwargs: Any
|
||||||
|
) -> None: ...
|
||||||
|
|
||||||
class GroupManager:
|
class PermissionManager(models.Manager):
|
||||||
def get_by_natural_key(self, name: str) -> Group: ...
|
creation_counter: int
|
||||||
|
model: None
|
||||||
class Permission:
|
name: None
|
||||||
def __str__(self) -> str: ...
|
use_in_migrations: bool = ...
|
||||||
def natural_key(self) -> Tuple[str, str, str]: ...
|
|
||||||
|
|
||||||
class PermissionManager:
|
|
||||||
def get_by_natural_key(
|
def get_by_natural_key(
|
||||||
self, codename: str, app_label: str, model: str
|
self, codename: str, app_label: str, model: str
|
||||||
) -> Permission: ...
|
) -> Permission: ...
|
||||||
|
|
||||||
class PermissionsMixin:
|
class Permission(models.Model):
|
||||||
def get_all_permissions(self, obj: None = ...) -> Set[str]: ...
|
content_type_id: int
|
||||||
def has_module_perms(self, app_label: str) -> bool: ...
|
id: int
|
||||||
def has_perm(self, perm: str, obj: None = ...) -> bool: ...
|
name: str = ...
|
||||||
def has_perms(
|
content_type: Any = ...
|
||||||
self, perm_list: Union[List[str], Tuple[str]], obj: None = ...
|
codename: str = ...
|
||||||
) -> bool: ...
|
objects: Any = ...
|
||||||
|
class Meta:
|
||||||
|
verbose_name: Any = ...
|
||||||
|
verbose_name_plural: Any = ...
|
||||||
|
unique_together: Any = ...
|
||||||
|
ordering: Any = ...
|
||||||
|
def natural_key(self) -> Tuple[str, str, str]: ...
|
||||||
|
|
||||||
class UserManager:
|
class GroupManager(models.Manager):
|
||||||
def _create_user(
|
creation_counter: int
|
||||||
self, username: str, email: Optional[str], password: Optional[str], **extra_fields
|
model: None
|
||||||
) -> User: ...
|
name: None
|
||||||
def create_superuser(
|
use_in_migrations: bool = ...
|
||||||
self, username: str, email: str, password: Optional[str], **extra_fields
|
def get_by_natural_key(self, name: str) -> Group: ...
|
||||||
) -> User: ...
|
|
||||||
|
class Group(models.Model):
|
||||||
|
id: None
|
||||||
|
name: str = ...
|
||||||
|
permissions: Any = ...
|
||||||
|
objects: Any = ...
|
||||||
|
class Meta:
|
||||||
|
verbose_name: Any = ...
|
||||||
|
verbose_name_plural: Any = ...
|
||||||
|
def natural_key(self): ...
|
||||||
|
|
||||||
|
class UserManager(BaseUserManager):
|
||||||
|
creation_counter: int
|
||||||
|
model: None
|
||||||
|
name: None
|
||||||
|
use_in_migrations: bool = ...
|
||||||
def create_user(
|
def create_user(
|
||||||
self,
|
self,
|
||||||
username: str,
|
username: str,
|
||||||
email: Optional[str] = ...,
|
email: Optional[str] = ...,
|
||||||
password: Optional[str] = ...,
|
password: Optional[str] = ...,
|
||||||
**extra_fields,
|
**extra_fields: Any
|
||||||
) -> User: ...
|
) -> AbstractUser: ...
|
||||||
|
def create_superuser(
|
||||||
|
self,
|
||||||
|
username: str,
|
||||||
|
email: Optional[str],
|
||||||
|
password: Optional[str],
|
||||||
|
**extra_fields: Any
|
||||||
|
) -> AbstractBaseUser: ...
|
||||||
|
|
||||||
|
class PermissionsMixin(models.Model):
|
||||||
|
is_superuser: Any = ...
|
||||||
|
groups: Any = ...
|
||||||
|
user_permissions: Any = ...
|
||||||
|
class Meta:
|
||||||
|
abstract: bool = ...
|
||||||
|
def get_group_permissions(self, obj: None = ...) -> Set[str]: ...
|
||||||
|
def get_all_permissions(self, obj: Optional[str] = ...) -> Set[str]: ...
|
||||||
|
def has_perm(
|
||||||
|
self, perm: Union[str, Tuple[str, Any]], obj: Optional[str] = ...
|
||||||
|
) -> bool: ...
|
||||||
|
def has_perms(
|
||||||
|
self, perm_list: Union[Set[str], List[str], Tuple[str]], obj: None = ...
|
||||||
|
) -> bool: ...
|
||||||
|
def has_module_perms(self, app_label: str) -> bool: ...
|
||||||
|
|
||||||
|
class AbstractUser(AbstractBaseUser, PermissionsMixin):
|
||||||
|
is_superuser: bool
|
||||||
|
last_login: None
|
||||||
|
password: str
|
||||||
|
username_validator: Any = ...
|
||||||
|
username: str = ...
|
||||||
|
first_name: str = ...
|
||||||
|
last_name: str = ...
|
||||||
|
email: str = ...
|
||||||
|
is_staff: bool = ...
|
||||||
|
is_active: bool = ...
|
||||||
|
date_joined: datetime.datetime = ...
|
||||||
|
objects: Any = ...
|
||||||
|
EMAIL_FIELD: str = ...
|
||||||
|
USERNAME_FIELD: str = ...
|
||||||
|
REQUIRED_FIELDS: Any = ...
|
||||||
|
class Meta:
|
||||||
|
verbose_name: Any = ...
|
||||||
|
verbose_name_plural: Any = ...
|
||||||
|
abstract: bool = ...
|
||||||
|
def clean(self) -> None: ...
|
||||||
|
def get_full_name(self) -> str: ...
|
||||||
|
def get_short_name(self) -> str: ...
|
||||||
|
def email_user(
|
||||||
|
self, subject: str, message: str, from_email: str = ..., **kwargs: Any
|
||||||
|
) -> None: ...
|
||||||
|
|
||||||
|
class User(AbstractUser):
|
||||||
|
date_joined: datetime.datetime
|
||||||
|
email: str
|
||||||
|
first_name: str
|
||||||
|
id: None
|
||||||
|
is_active: bool
|
||||||
|
is_staff: bool
|
||||||
|
is_superuser: bool
|
||||||
|
last_login: None
|
||||||
|
last_name: str
|
||||||
|
password: str
|
||||||
|
username: str
|
||||||
|
class Meta(AbstractUser.Meta):
|
||||||
|
swappable: str = ...
|
||||||
|
|
||||||
|
class AnonymousUser:
|
||||||
|
id: Any = ...
|
||||||
|
pk: Any = ...
|
||||||
|
username: str = ...
|
||||||
|
is_staff: bool = ...
|
||||||
|
is_active: bool = ...
|
||||||
|
is_superuser: bool = ...
|
||||||
|
def __eq__(self, other: Union[AnonymousUser, User]) -> bool: ...
|
||||||
|
def __hash__(self) -> int: ...
|
||||||
|
def save(self) -> Any: ...
|
||||||
|
def delete(self) -> Any: ...
|
||||||
|
def set_password(self, raw_password: str) -> Any: ...
|
||||||
|
def check_password(self, raw_password: str) -> Any: ...
|
||||||
|
@property
|
||||||
|
def groups(self) -> EmptyManager: ...
|
||||||
|
@property
|
||||||
|
def user_permissions(self) -> EmptyManager: ...
|
||||||
|
def get_group_permissions(self, obj: None = ...) -> Set[Any]: ...
|
||||||
|
def get_all_permissions(self, obj: Any = ...) -> Set[str]: ...
|
||||||
|
def has_perm(self, perm: str, obj: None = ...) -> bool: ...
|
||||||
|
def has_perms(
|
||||||
|
self, perm_list: Union[List[str], Tuple[str]], obj: None = ...
|
||||||
|
) -> bool: ...
|
||||||
|
def has_module_perms(self, module: str) -> bool: ...
|
||||||
|
@property
|
||||||
|
def is_anonymous(self) -> bool: ...
|
||||||
|
@property
|
||||||
|
def is_authenticated(self) -> bool: ...
|
||||||
|
def get_username(self) -> str: ...
|
||||||
|
|||||||
@@ -1,54 +1,68 @@
|
|||||||
# Stubs for django.contrib.auth.password_validation (Python 3.6)
|
from pathlib import PosixPath
|
||||||
#
|
from typing import Any, Dict, List, Optional, Tuple, Union
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
||||||
|
|
||||||
from typing import Any, Optional
|
|
||||||
|
|
||||||
from django.contrib.auth.base_user import AbstractBaseUser
|
from django.contrib.auth.base_user import AbstractBaseUser
|
||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User
|
||||||
from pathlib import PosixPath
|
from django.utils.functional import SimpleLazyObject
|
||||||
from typing import Dict, List, Optional, Tuple, Union
|
|
||||||
|
|
||||||
def get_default_password_validators() -> Union[
|
def get_default_password_validators() -> Union[
|
||||||
List[NumericPasswordValidator], List[UserAttributeSimilarityValidator]
|
List[Union[CommonPasswordValidator, MinimumLengthValidator]],
|
||||||
|
List[Union[UserAttributeSimilarityValidator, MinimumLengthValidator]],
|
||||||
|
List[NumericPasswordValidator],
|
||||||
]: ...
|
]: ...
|
||||||
def get_password_validators(
|
def get_password_validators(
|
||||||
validator_config: List[Dict[str, str]]
|
validator_config: List[Dict[str, Union[str, Dict[str, int]]]]
|
||||||
) -> Union[List[NumericPasswordValidator], List[UserAttributeSimilarityValidator]]: ...
|
) -> Union[
|
||||||
|
List[Union[CommonPasswordValidator, MinimumLengthValidator]],
|
||||||
|
List[Union[UserAttributeSimilarityValidator, MinimumLengthValidator]],
|
||||||
|
List[NumericPasswordValidator],
|
||||||
|
]: ...
|
||||||
def validate_password(
|
def validate_password(
|
||||||
password: str, user: Optional[User] = ..., password_validators: None = ...
|
password: str,
|
||||||
|
user: Optional[Union[AbstractBaseUser, SimpleLazyObject]] = ...,
|
||||||
|
password_validators: Optional[List[Any]] = ...,
|
||||||
) -> None: ...
|
) -> None: ...
|
||||||
def password_changed(
|
def password_changed(
|
||||||
password: str, user: AbstractBaseUser = ..., password_validators: None = ...
|
password: str,
|
||||||
|
user: Optional[AbstractBaseUser] = ...,
|
||||||
|
password_validators: None = ...,
|
||||||
) -> None: ...
|
) -> None: ...
|
||||||
def password_validators_help_texts(password_validators: None = ...) -> List[str]: ...
|
def password_validators_help_texts(
|
||||||
def _password_validators_help_text_html(password_validators: None = ...) -> str: ...
|
password_validators: Optional[List[Any]] = ...
|
||||||
|
) -> List[str]: ...
|
||||||
|
|
||||||
password_validators_help_text_html: Any
|
password_validators_help_text_html: Any
|
||||||
|
|
||||||
class MinimumLengthValidator:
|
class MinimumLengthValidator:
|
||||||
min_length: Any = ...
|
min_length: int = ...
|
||||||
def __init__(self, min_length: int = ...) -> None: ...
|
def __init__(self, min_length: int = ...) -> None: ...
|
||||||
def validate(self, password: str, user: None = ...) -> None: ...
|
def validate(self, password: str, user: Optional[User] = ...) -> None: ...
|
||||||
def get_help_text(self) -> str: ...
|
def get_help_text(self) -> str: ...
|
||||||
|
|
||||||
class UserAttributeSimilarityValidator:
|
class UserAttributeSimilarityValidator:
|
||||||
DEFAULT_USER_ATTRIBUTES: Any = ...
|
DEFAULT_USER_ATTRIBUTES: Any = ...
|
||||||
user_attributes: Any = ...
|
user_attributes: Tuple[str, str, str, str] = ...
|
||||||
max_similarity: Any = ...
|
max_similarity: float = ...
|
||||||
def __init__(
|
def __init__(
|
||||||
self, user_attributes: Tuple[str, str, str, str] = ..., max_similarity: float = ...
|
self,
|
||||||
|
user_attributes: Union[Tuple[str, str, str, str], List[str]] = ...,
|
||||||
|
max_similarity: float = ...,
|
||||||
) -> None: ...
|
) -> None: ...
|
||||||
def validate(self, password: str, user: None = ...) -> None: ...
|
def validate(self, password: str, user: Optional[User] = ...) -> None: ...
|
||||||
def get_help_text(self) -> str: ...
|
def get_help_text(self) -> str: ...
|
||||||
|
|
||||||
class CommonPasswordValidator:
|
class CommonPasswordValidator:
|
||||||
DEFAULT_PASSWORD_LIST_PATH: Any = ...
|
DEFAULT_PASSWORD_LIST_PATH: Any = ...
|
||||||
passwords: Any = ...
|
passwords: Set[str] = ...
|
||||||
def __init__(self, password_list_path: PosixPath = ...) -> None: ...
|
def __init__(
|
||||||
|
self, password_list_path: Union[str, PosixPath] = ...
|
||||||
|
) -> None: ...
|
||||||
def validate(self, password: str, user: None = ...) -> None: ...
|
def validate(self, password: str, user: None = ...) -> None: ...
|
||||||
def get_help_text(self): ...
|
def get_help_text(self) -> str: ...
|
||||||
|
|
||||||
class NumericPasswordValidator:
|
class NumericPasswordValidator:
|
||||||
def validate(self, password: str, user: User = ...) -> None: ...
|
def validate(
|
||||||
def get_help_text(self): ...
|
self, password: str, user: Optional[AbstractBaseUser] = ...
|
||||||
|
) -> None: ...
|
||||||
|
def get_help_text(self) -> str: ...
|
||||||
|
|||||||
@@ -1,21 +1,14 @@
|
|||||||
# Stubs for django.contrib.auth.tokens (Python 3.6)
|
from typing import Any, Optional
|
||||||
#
|
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
||||||
|
|
||||||
from typing import Any
|
from django.contrib.auth.base_user import AbstractBaseUser
|
||||||
|
|
||||||
from datetime import date
|
|
||||||
from django.contrib.auth.models import User
|
|
||||||
from typing import Optional
|
|
||||||
|
|
||||||
class PasswordResetTokenGenerator:
|
class PasswordResetTokenGenerator:
|
||||||
key_salt: str = ...
|
key_salt: str = ...
|
||||||
secret: Any = ...
|
secret: Any = ...
|
||||||
def make_token(self, user: User) -> str: ...
|
def make_token(self, user: AbstractBaseUser) -> str: ...
|
||||||
def check_token(self, user: User, token: Optional[str]) -> bool: ...
|
def check_token(
|
||||||
def _make_token_with_timestamp(self, user: User, timestamp: int) -> str: ...
|
self, user: Optional[AbstractBaseUser], token: Optional[str]
|
||||||
def _make_hash_value(self, user: User, timestamp: int) -> str: ...
|
) -> bool: ...
|
||||||
def _num_days(self, dt: date) -> int: ...
|
|
||||||
def _today(self) -> date: ...
|
|
||||||
|
|
||||||
default_token_generator: Any
|
default_token_generator: Any
|
||||||
|
|||||||
@@ -1,64 +1,142 @@
|
|||||||
from django.contrib.auth.forms import (
|
|
||||||
AuthenticationForm,
|
|
||||||
PasswordChangeForm,
|
|
||||||
PasswordResetForm,
|
|
||||||
SetPasswordForm,
|
|
||||||
)
|
|
||||||
from django.contrib.auth.models import User
|
|
||||||
from django.core.handlers.wsgi import WSGIRequest
|
|
||||||
from django.http.request import HttpRequest
|
|
||||||
from django.http.response import HttpResponseRedirect
|
|
||||||
from django.template.response import TemplateResponse
|
|
||||||
from django.utils.datastructures import MultiValueDict
|
|
||||||
from typing import Any, Dict, Optional, Set, Type, Union
|
from typing import Any, Dict, Optional, Set, Type, Union
|
||||||
|
|
||||||
def redirect_to_login(
|
from django.contrib.auth.base_user import AbstractBaseUser
|
||||||
next: str, login_url: Optional[str] = ..., redirect_field_name: Optional[str] = ...
|
from django.contrib.auth.forms import (AuthenticationForm, PasswordChangeForm,
|
||||||
) -> HttpResponseRedirect: ...
|
PasswordResetForm, SetPasswordForm)
|
||||||
|
from django.contrib.auth.models import User
|
||||||
|
from django.contrib.sites.models import Site
|
||||||
|
from django.contrib.sites.requests import RequestSite
|
||||||
|
from django.core.handlers.wsgi import WSGIRequest
|
||||||
|
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.utils.functional import SimpleLazyObject
|
||||||
|
from django.views.generic.base import TemplateView
|
||||||
|
from django.views.generic.edit import FormView
|
||||||
|
|
||||||
class LoginView:
|
UserModel: Any
|
||||||
|
|
||||||
|
class SuccessURLAllowedHostsMixin:
|
||||||
|
success_url_allowed_hosts: Any = ...
|
||||||
|
def get_success_url_allowed_hosts(self) -> Set[str]: ...
|
||||||
|
|
||||||
|
class LoginView(SuccessURLAllowedHostsMixin, FormView):
|
||||||
|
form_class: Any = ...
|
||||||
|
authentication_form: Any = ...
|
||||||
|
redirect_field_name: Any = ...
|
||||||
|
template_name: str = ...
|
||||||
|
redirect_authenticated_user: bool = ...
|
||||||
|
extra_context: Any = ...
|
||||||
def dispatch(
|
def dispatch(
|
||||||
self, request: HttpRequest, *args, **kwargs
|
self, request: HttpRequest, *args: Any, **kwargs: Any
|
||||||
) -> Union[TemplateResponse, HttpResponseRedirect]: ...
|
) -> HttpResponse: ...
|
||||||
def form_valid(self, form: AuthenticationForm) -> HttpResponseRedirect: ...
|
def get_success_url(self) -> str: ...
|
||||||
def get_context_data(self, **kwargs) -> Dict[str, Any]: ...
|
def get_redirect_url(self) -> str: ...
|
||||||
def get_form_class(self) -> Type[AuthenticationForm]: ...
|
def get_form_class(self) -> Type[AuthenticationForm]: ...
|
||||||
def get_form_kwargs(
|
def get_form_kwargs(
|
||||||
self
|
self
|
||||||
) -> Dict[str, Optional[Union[MultiValueDict, WSGIRequest]]]: ...
|
) -> Dict[
|
||||||
def get_redirect_url(self) -> str: ...
|
str,
|
||||||
def get_success_url(self) -> str: ...
|
Optional[
|
||||||
|
Union[Dict[Any, Any], Dict[str, str], MultiValueDict, HttpRequest]
|
||||||
|
],
|
||||||
|
]: ...
|
||||||
|
def form_valid(self, form: AuthenticationForm) -> HttpResponseRedirect: ...
|
||||||
|
def get_context_data(
|
||||||
|
self, **kwargs: Any
|
||||||
|
) -> Dict[
|
||||||
|
str, Union[AuthenticationForm, LoginView, str, Site, RequestSite]
|
||||||
|
]: ...
|
||||||
|
|
||||||
class LogoutView:
|
class LogoutView(SuccessURLAllowedHostsMixin, TemplateView):
|
||||||
|
next_page: Any = ...
|
||||||
|
redirect_field_name: Any = ...
|
||||||
|
template_name: str = ...
|
||||||
|
extra_context: Any = ...
|
||||||
def dispatch(
|
def dispatch(
|
||||||
self, request: HttpRequest, *args, **kwargs
|
self, request: HttpRequest, *args: Any, **kwargs: Any
|
||||||
) -> Union[TemplateResponse, HttpResponseRedirect]: ...
|
) -> HttpResponse: ...
|
||||||
|
def post(
|
||||||
|
self, request: WSGIRequest, *args: Any, **kwargs: Any
|
||||||
|
) -> TemplateResponse: ...
|
||||||
def get_next_page(self) -> Optional[str]: ...
|
def get_next_page(self) -> Optional[str]: ...
|
||||||
def post(self, request: WSGIRequest, *args, **kwargs) -> TemplateResponse: ...
|
def get_context_data(self, **kwargs: Any): ...
|
||||||
|
|
||||||
class PasswordChangeDoneView:
|
def logout_then_login(
|
||||||
def dispatch(self, *args, **kwargs) -> TemplateResponse: ...
|
request: HttpRequest, login_url: Optional[str] = ...
|
||||||
|
) -> HttpResponseRedirect: ...
|
||||||
|
def redirect_to_login(
|
||||||
|
next: str,
|
||||||
|
login_url: Optional[str] = ...,
|
||||||
|
redirect_field_name: Optional[str] = ...,
|
||||||
|
) -> HttpResponseRedirect: ...
|
||||||
|
|
||||||
class PasswordChangeView:
|
class PasswordContextMixin:
|
||||||
def dispatch(
|
extra_context: Any = ...
|
||||||
self, *args, **kwargs
|
def get_context_data(self, **kwargs: Any): ...
|
||||||
) -> Union[TemplateResponse, HttpResponseRedirect]: ...
|
|
||||||
def form_valid(self, form: PasswordChangeForm) -> HttpResponseRedirect: ...
|
|
||||||
def get_form_kwargs(self) -> Dict[str, Optional[Union[MultiValueDict, User]]]: ...
|
|
||||||
|
|
||||||
class PasswordResetConfirmView:
|
class PasswordResetView(PasswordContextMixin, FormView):
|
||||||
def dispatch(
|
email_template_name: str = ...
|
||||||
self, *args, **kwargs
|
extra_email_context: Any = ...
|
||||||
) -> Union[TemplateResponse, HttpResponseRedirect]: ...
|
form_class: Any = ...
|
||||||
def form_valid(self, form: SetPasswordForm) -> HttpResponseRedirect: ...
|
from_email: Any = ...
|
||||||
def get_form_kwargs(self) -> Dict[str, Optional[Union[MultiValueDict, User]]]: ...
|
html_email_template_name: Any = ...
|
||||||
def get_user(self, uidb64: str) -> Optional[User]: ...
|
subject_template_name: str = ...
|
||||||
|
success_url: Any = ...
|
||||||
class PasswordResetView:
|
template_name: str = ...
|
||||||
def dispatch(
|
title: Any = ...
|
||||||
self, *args, **kwargs
|
token_generator: Any = ...
|
||||||
) -> Union[TemplateResponse, HttpResponseRedirect]: ...
|
def dispatch(self, *args: Any, **kwargs: Any) -> HttpResponse: ...
|
||||||
def form_valid(self, form: PasswordResetForm) -> HttpResponseRedirect: ...
|
def form_valid(self, form: PasswordResetForm) -> HttpResponseRedirect: ...
|
||||||
|
|
||||||
class SuccessURLAllowedHostsMixin:
|
INTERNAL_RESET_URL_TOKEN: str
|
||||||
def get_success_url_allowed_hosts(self) -> Set[str]: ...
|
INTERNAL_RESET_SESSION_TOKEN: str
|
||||||
|
|
||||||
|
class PasswordResetDoneView(PasswordContextMixin, TemplateView):
|
||||||
|
template_name: str = ...
|
||||||
|
title: Any = ...
|
||||||
|
|
||||||
|
class PasswordResetConfirmView(PasswordContextMixin, FormView):
|
||||||
|
form_class: Any = ...
|
||||||
|
post_reset_login: bool = ...
|
||||||
|
post_reset_login_backend: Any = ...
|
||||||
|
success_url: Any = ...
|
||||||
|
template_name: str = ...
|
||||||
|
title: Any = ...
|
||||||
|
token_generator: Any = ...
|
||||||
|
validlink: bool = ...
|
||||||
|
user: Any = ...
|
||||||
|
def dispatch(self, *args: Any, **kwargs: Any) -> HttpResponse: ...
|
||||||
|
def get_user(self, uidb64: str) -> Optional[AbstractBaseUser]: ...
|
||||||
|
def get_form_kwargs(
|
||||||
|
self
|
||||||
|
) -> Dict[
|
||||||
|
str, Optional[Union[Dict[Any, Any], MultiValueDict, AbstractBaseUser]]
|
||||||
|
]: ...
|
||||||
|
def form_valid(self, form: SetPasswordForm) -> HttpResponseRedirect: ...
|
||||||
|
def get_context_data(self, **kwargs: Any): ...
|
||||||
|
|
||||||
|
class PasswordResetCompleteView(PasswordContextMixin, TemplateView):
|
||||||
|
template_name: str = ...
|
||||||
|
title: Any = ...
|
||||||
|
def get_context_data(self, **kwargs: Any): ...
|
||||||
|
|
||||||
|
class PasswordChangeView(PasswordContextMixin, FormView):
|
||||||
|
form_class: Any = ...
|
||||||
|
success_url: Any = ...
|
||||||
|
template_name: str = ...
|
||||||
|
title: Any = ...
|
||||||
|
def dispatch(self, *args: Any, **kwargs: Any) -> HttpResponse: ...
|
||||||
|
def get_form_kwargs(
|
||||||
|
self
|
||||||
|
) -> Dict[
|
||||||
|
str,
|
||||||
|
Optional[Union[Dict[Any, Any], User, MultiValueDict, SimpleLazyObject]],
|
||||||
|
]: ...
|
||||||
|
def form_valid(self, form: PasswordChangeForm) -> HttpResponseRedirect: ...
|
||||||
|
|
||||||
|
class PasswordChangeDoneView(PasswordContextMixin, TemplateView):
|
||||||
|
template_name: str = ...
|
||||||
|
title: Any = ...
|
||||||
|
def dispatch(self, *args: Any, **kwargs: Any) -> TemplateResponse: ...
|
||||||
|
|||||||
@@ -1,12 +1,18 @@
|
|||||||
# Stubs for django.contrib.contenttypes.apps (Python 3.6)
|
from typing import Any, Optional
|
||||||
#
|
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
||||||
|
|
||||||
from .management import create_contenttypes, inject_rename_contenttypes_operations
|
|
||||||
from django.apps import AppConfig
|
from django.apps import AppConfig
|
||||||
from typing import Any
|
|
||||||
|
from .management import (create_contenttypes,
|
||||||
|
inject_rename_contenttypes_operations)
|
||||||
|
|
||||||
|
|
||||||
class ContentTypesConfig(AppConfig):
|
class ContentTypesConfig(AppConfig):
|
||||||
|
apps: None
|
||||||
|
label: str
|
||||||
|
models: None
|
||||||
|
models_module: None
|
||||||
|
module: Any
|
||||||
|
path: str
|
||||||
name: str = ...
|
name: str = ...
|
||||||
verbose_name: Any = ...
|
verbose_name: Any = ...
|
||||||
def ready(self) -> None: ...
|
def ready(self) -> None: ...
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
# Stubs for django.contrib.contenttypes.checks (Python 3.6)
|
from typing import Any, List, Optional
|
||||||
#
|
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
||||||
|
|
||||||
from typing import Any, Optional
|
|
||||||
|
|
||||||
from typing import Any, List
|
def check_generic_foreign_keys(
|
||||||
|
app_configs: None = ..., **kwargs: Any
|
||||||
def check_generic_foreign_keys(app_configs: None = ..., **kwargs: Any) -> List[Any]: ...
|
) -> List[Any]: ...
|
||||||
def check_model_name_lengths(app_configs: None = ..., **kwargs: Any) -> List[Any]: ...
|
def check_model_name_lengths(
|
||||||
|
app_configs: None = ..., **kwargs: Any
|
||||||
|
) -> List[Any]: ...
|
||||||
|
|||||||
@@ -1,27 +1,50 @@
|
|||||||
|
from typing import Any, Callable, Dict, List, Optional, Tuple, Type, Union
|
||||||
|
|
||||||
from django.contrib.contenttypes.models import ContentType
|
from django.contrib.contenttypes.models import ContentType
|
||||||
from django.core.checks.messages import Error
|
from django.core.checks.messages import Error
|
||||||
from django.db.models.base import Model
|
from django.db.models.base import Model
|
||||||
from django.db.models.fields import AutoField, PositiveIntegerField
|
from django.db.models.fields import Field, PositiveIntegerField
|
||||||
from django.db.models.fields.related import OneToOneField
|
from django.db.models.fields.mixins import FieldCacheMixin
|
||||||
|
from django.db.models.fields.related import (ForeignObject, ForeignObjectRel,
|
||||||
|
ReverseManyToOneDescriptor)
|
||||||
from django.db.models.query import QuerySet
|
from django.db.models.query import QuerySet
|
||||||
from django.db.models.query_utils import FilteredRelation, PathInfo
|
from django.db.models.query_utils import FilteredRelation, PathInfo
|
||||||
from django.db.models.sql.where import WhereNode
|
from django.db.models.sql.where import WhereNode
|
||||||
from typing import Any, Callable, Dict, List, Optional, Tuple, Type, Union
|
|
||||||
|
|
||||||
class GenericForeignKey:
|
|
||||||
def __get__(
|
class GenericForeignKey(FieldCacheMixin):
|
||||||
self, instance: Optional[Model], cls: Type[Model] = ...
|
auto_created: bool = ...
|
||||||
) -> Optional[Union[Model, GenericForeignKey]]: ...
|
concrete: bool = ...
|
||||||
|
editable: bool = ...
|
||||||
|
hidden: bool = ...
|
||||||
|
is_relation: bool = ...
|
||||||
|
many_to_many: bool = ...
|
||||||
|
many_to_one: bool = ...
|
||||||
|
one_to_many: bool = ...
|
||||||
|
one_to_one: bool = ...
|
||||||
|
related_model: Any = ...
|
||||||
|
remote_field: Any = ...
|
||||||
|
ct_field: str = ...
|
||||||
|
fk_field: str = ...
|
||||||
|
for_concrete_model: bool = ...
|
||||||
|
rel: None = ...
|
||||||
|
column: None = ...
|
||||||
def __init__(
|
def __init__(
|
||||||
self, ct_field: str = ..., fk_field: str = ..., for_concrete_model: bool = ...
|
self,
|
||||||
|
ct_field: str = ...,
|
||||||
|
fk_field: str = ...,
|
||||||
|
for_concrete_model: bool = ...,
|
||||||
) -> None: ...
|
) -> None: ...
|
||||||
def __set__(self, instance: Model, value: Optional[Model]) -> None: ...
|
name: Any = ...
|
||||||
def __str__(self) -> str: ...
|
model: Any = ...
|
||||||
def _check_content_type_field(self) -> List[Error]: ...
|
def contribute_to_class(
|
||||||
def _check_field_name(self) -> List[Any]: ...
|
self, cls: Type[Model], name: str, **kwargs: Any
|
||||||
def _check_object_id_field(self) -> List[Any]: ...
|
) -> None: ...
|
||||||
def check(self, **kwargs) -> List[Error]: ...
|
def get_filter_kwargs_for_object(
|
||||||
def contribute_to_class(self, cls: Type[Model], name: str, **kwargs) -> None: ...
|
self, obj: Model
|
||||||
|
) -> Dict[str, Optional[Union[int, ContentType]]]: ...
|
||||||
|
def get_forward_related_filter(self, obj: Model) -> Dict[str, int]: ...
|
||||||
|
def check(self, **kwargs: Any) -> List[Error]: ...
|
||||||
def get_cache_name(self) -> str: ...
|
def get_cache_name(self) -> str: ...
|
||||||
def get_content_type(
|
def get_content_type(
|
||||||
self,
|
self,
|
||||||
@@ -29,15 +52,26 @@ class GenericForeignKey:
|
|||||||
id: Optional[int] = ...,
|
id: Optional[int] = ...,
|
||||||
using: Optional[str] = ...,
|
using: Optional[str] = ...,
|
||||||
) -> ContentType: ...
|
) -> ContentType: ...
|
||||||
def get_filter_kwargs_for_object(
|
|
||||||
self, obj: Model
|
|
||||||
) -> Dict[str, Optional[Union[ContentType, int]]]: ...
|
|
||||||
def get_forward_related_filter(self, obj: Model) -> Dict[str, int]: ...
|
|
||||||
def get_prefetch_queryset(
|
def get_prefetch_queryset(
|
||||||
self, instances: Union[List[Model], QuerySet], queryset: Optional[QuerySet] = ...
|
self,
|
||||||
|
instances: Union[QuerySet, List[Model]],
|
||||||
|
queryset: Optional[QuerySet] = ...,
|
||||||
) -> Tuple[List[Model], Callable, Callable, bool, str, bool]: ...
|
) -> Tuple[List[Model], Callable, Callable, bool, str, bool]: ...
|
||||||
|
def __get__(
|
||||||
|
self, instance: Optional[Model], cls: Type[Model] = ...
|
||||||
|
) -> Optional[Union[Model, GenericForeignKey]]: ...
|
||||||
|
def __set__(self, instance: Model, value: Optional[Model]) -> None: ...
|
||||||
|
|
||||||
class GenericRel:
|
class GenericRel(ForeignObjectRel):
|
||||||
|
field: django.contrib.contenttypes.fields.GenericRelation
|
||||||
|
limit_choices_to: Dict[Any, Any]
|
||||||
|
model: Type[django.db.models.base.Model]
|
||||||
|
multiple: bool
|
||||||
|
on_delete: Callable
|
||||||
|
parent_link: bool
|
||||||
|
related_name: str
|
||||||
|
related_query_name: None
|
||||||
|
symmetrical: bool
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
field: GenericRelation,
|
field: GenericRelation,
|
||||||
@@ -47,7 +81,17 @@ class GenericRel:
|
|||||||
limit_choices_to: None = ...,
|
limit_choices_to: None = ...,
|
||||||
) -> None: ...
|
) -> None: ...
|
||||||
|
|
||||||
class GenericRelation:
|
class GenericRelation(ForeignObject):
|
||||||
|
auto_created: bool = ...
|
||||||
|
many_to_many: bool = ...
|
||||||
|
many_to_one: bool = ...
|
||||||
|
one_to_many: bool = ...
|
||||||
|
one_to_one: bool = ...
|
||||||
|
rel_class: Any = ...
|
||||||
|
mti_inherited: bool = ...
|
||||||
|
object_id_field_name: Any = ...
|
||||||
|
content_type_field_name: Any = ...
|
||||||
|
for_concrete_model: Any = ...
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
to: Union[Type[Model], str],
|
to: Union[Type[Model], str],
|
||||||
@@ -56,29 +100,40 @@ class GenericRelation:
|
|||||||
for_concrete_model: bool = ...,
|
for_concrete_model: bool = ...,
|
||||||
related_query_name: Optional[str] = ...,
|
related_query_name: Optional[str] = ...,
|
||||||
limit_choices_to: None = ...,
|
limit_choices_to: None = ...,
|
||||||
**kwargs,
|
**kwargs: Any
|
||||||
) -> None: ...
|
) -> None: ...
|
||||||
def _check_generic_foreign_key_existence(self) -> List[Any]: ...
|
def check(self, **kwargs: Any) -> List[Error]: ...
|
||||||
def _get_path_info_with_parent(self, filtered_relation: None) -> List[PathInfo]: ...
|
to_fields: Any = ...
|
||||||
def _is_matching_generic_foreign_key(
|
def resolve_related_fields(
|
||||||
self, field: Optional[Union[GenericForeignKey, GenericRelation]]
|
self
|
||||||
) -> bool: ...
|
) -> List[Tuple[PositiveIntegerField, Field]]: ...
|
||||||
def bulk_related_objects(self, objs: List[Model], using: str = ...) -> QuerySet: ...
|
|
||||||
def check(self, **kwargs) -> List[Error]: ...
|
|
||||||
def contribute_to_class(self, cls: Type[Model], name: str, **kwargs) -> None: ...
|
|
||||||
def get_content_type(self) -> ContentType: ...
|
|
||||||
def get_extra_restriction(
|
|
||||||
self, where_class: Type[WhereNode], alias: Optional[str], remote_alias: str
|
|
||||||
) -> WhereNode: ...
|
|
||||||
def get_internal_type(self) -> str: ...
|
|
||||||
def get_path_info(
|
def get_path_info(
|
||||||
self, filtered_relation: Optional[FilteredRelation] = ...
|
self, filtered_relation: Optional[FilteredRelation] = ...
|
||||||
) -> List[PathInfo]: ...
|
) -> List[PathInfo]: ...
|
||||||
def get_reverse_path_info(self, filtered_relation: None = ...) -> List[PathInfo]: ...
|
def get_reverse_path_info(
|
||||||
def resolve_related_fields(
|
self, filtered_relation: None = ...
|
||||||
self
|
) -> List[PathInfo]: ...
|
||||||
) -> Union[
|
def value_to_string(self, obj: Model) -> str: ...
|
||||||
List[Tuple[PositiveIntegerField, related.OneToOneField]],
|
model: Any = ...
|
||||||
List[Tuple[PositiveIntegerField, AutoField]],
|
def contribute_to_class(
|
||||||
]: ...
|
self, cls: Type[Model], name: str, **kwargs: Any
|
||||||
|
) -> None: ...
|
||||||
def set_attributes_from_rel(self) -> None: ...
|
def set_attributes_from_rel(self) -> None: ...
|
||||||
|
def get_internal_type(self) -> str: ...
|
||||||
|
def get_content_type(self) -> ContentType: ...
|
||||||
|
def get_extra_restriction(
|
||||||
|
self,
|
||||||
|
where_class: Type[WhereNode],
|
||||||
|
alias: Optional[str],
|
||||||
|
remote_alias: str,
|
||||||
|
) -> WhereNode: ...
|
||||||
|
def bulk_related_objects(
|
||||||
|
self, objs: List[Model], using: str = ...
|
||||||
|
) -> QuerySet: ...
|
||||||
|
|
||||||
|
class ReverseGenericManyToOneDescriptor(ReverseManyToOneDescriptor):
|
||||||
|
field: django.contrib.contenttypes.fields.GenericRelation
|
||||||
|
rel: django.contrib.contenttypes.fields.GenericRel
|
||||||
|
def related_manager_cls(self): ...
|
||||||
|
|
||||||
|
def create_generic_related_manager(superclass: Any, rel: Any): ...
|
||||||
|
|||||||
@@ -0,0 +1,42 @@
|
|||||||
|
from typing import Any, Optional
|
||||||
|
|
||||||
|
from django.forms.models import BaseModelFormSet
|
||||||
|
|
||||||
|
|
||||||
|
class BaseGenericInlineFormSet(BaseModelFormSet):
|
||||||
|
instance: Any = ...
|
||||||
|
rel_name: Any = ...
|
||||||
|
save_as_new: Any = ...
|
||||||
|
def __init__(
|
||||||
|
self,
|
||||||
|
data: Optional[Any] = ...,
|
||||||
|
files: Optional[Any] = ...,
|
||||||
|
instance: Optional[Any] = ...,
|
||||||
|
save_as_new: bool = ...,
|
||||||
|
prefix: Optional[Any] = ...,
|
||||||
|
queryset: Optional[Any] = ...,
|
||||||
|
**kwargs: Any
|
||||||
|
) -> None: ...
|
||||||
|
def initial_form_count(self): ...
|
||||||
|
@classmethod
|
||||||
|
def get_default_prefix(cls): ...
|
||||||
|
def save_new(self, form: Any, commit: bool = ...): ...
|
||||||
|
|
||||||
|
def generic_inlineformset_factory(
|
||||||
|
model: Any,
|
||||||
|
form: Any = ...,
|
||||||
|
formset: Any = ...,
|
||||||
|
ct_field: str = ...,
|
||||||
|
fk_field: str = ...,
|
||||||
|
fields: Optional[Any] = ...,
|
||||||
|
exclude: Optional[Any] = ...,
|
||||||
|
extra: int = ...,
|
||||||
|
can_order: bool = ...,
|
||||||
|
can_delete: bool = ...,
|
||||||
|
max_num: Optional[Any] = ...,
|
||||||
|
formfield_callback: Optional[Any] = ...,
|
||||||
|
validate_max: bool = ...,
|
||||||
|
for_concrete_model: bool = ...,
|
||||||
|
min_num: Optional[Any] = ...,
|
||||||
|
validate_min: bool = ...,
|
||||||
|
): ...
|
||||||
|
|||||||
@@ -1,29 +1,20 @@
|
|||||||
# Stubs for django.contrib.contenttypes.management (Python 3.6)
|
from typing import Any, Dict, List, Optional, Tuple, Type
|
||||||
#
|
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
||||||
|
|
||||||
from django.db import migrations
|
|
||||||
from typing import Any, Optional
|
|
||||||
|
|
||||||
from django.apps.config import AppConfig
|
from django.apps.config import AppConfig
|
||||||
from django.apps.registry import Apps
|
from django.apps.registry import Apps
|
||||||
from django.contrib.contenttypes.models import ContentType
|
from django.contrib.contenttypes.models import ContentType
|
||||||
|
from django.db import migrations
|
||||||
from django.db.backends.sqlite3.schema import DatabaseSchemaEditor
|
from django.db.backends.sqlite3.schema import DatabaseSchemaEditor
|
||||||
from django.db.migrations.migration import Migration
|
from django.db.migrations.migration import Migration
|
||||||
from django.db.migrations.state import StateApps
|
from django.db.migrations.state import StateApps
|
||||||
from typing import Any, List, Tuple, Type, Union
|
|
||||||
|
|
||||||
class RenameContentType(migrations.RunPython):
|
class RenameContentType(migrations.RunPython):
|
||||||
app_label: Any = ...
|
app_label: Any = ...
|
||||||
old_model: Any = ...
|
old_model: Any = ...
|
||||||
new_model: Any = ...
|
new_model: Any = ...
|
||||||
def __init__(self, app_label: str, old_model: str, new_model: str) -> None: ...
|
def __init__(
|
||||||
def _rename(
|
self, app_label: str, old_model: str, new_model: str
|
||||||
self,
|
|
||||||
apps: StateApps,
|
|
||||||
schema_editor: DatabaseSchemaEditor,
|
|
||||||
old_model: str,
|
|
||||||
new_model: str,
|
|
||||||
) -> None: ...
|
) -> None: ...
|
||||||
def rename_forward(
|
def rename_forward(
|
||||||
self, apps: StateApps, schema_editor: DatabaseSchemaEditor
|
self, apps: StateApps, schema_editor: DatabaseSchemaEditor
|
||||||
@@ -33,19 +24,19 @@ class RenameContentType(migrations.RunPython):
|
|||||||
) -> None: ...
|
) -> None: ...
|
||||||
|
|
||||||
def inject_rename_contenttypes_operations(
|
def inject_rename_contenttypes_operations(
|
||||||
plan: Union[List[Any], List[Tuple[Migration, bool]]] = ...,
|
plan: List[Tuple[Migration, bool]] = ...,
|
||||||
apps: StateApps = ...,
|
apps: StateApps = ...,
|
||||||
using: str = ...,
|
using: str = ...,
|
||||||
**kwargs: Any,
|
**kwargs: Any
|
||||||
) -> None: ...
|
) -> None: ...
|
||||||
def get_contenttypes_and_models(
|
def get_contenttypes_and_models(
|
||||||
app_config: AppConfig, using: str, ContentType: Type[ContentType]
|
app_config: AppConfig, using: str, ContentType: Type[ContentType]
|
||||||
) -> Any: ...
|
) -> Tuple[Dict[str, ContentType], Dict]: ...
|
||||||
def create_contenttypes(
|
def create_contenttypes(
|
||||||
app_config: AppConfig,
|
app_config: AppConfig,
|
||||||
verbosity: int = ...,
|
verbosity: int = ...,
|
||||||
interactive: bool = ...,
|
interactive: bool = ...,
|
||||||
using: str = ...,
|
using: str = ...,
|
||||||
apps: Apps = ...,
|
apps: Apps = ...,
|
||||||
**kwargs: Any,
|
**kwargs: Any
|
||||||
) -> None: ...
|
) -> None: ...
|
||||||
|
|||||||
@@ -1,8 +1,23 @@
|
|||||||
|
from typing import Any, Optional
|
||||||
|
|
||||||
|
from django.core.management import BaseCommand
|
||||||
from django.core.management.base import CommandParser
|
from django.core.management.base import CommandParser
|
||||||
|
from django.db.models.deletion import Collector
|
||||||
|
|
||||||
class Command:
|
from ...management import get_contenttypes_and_models
|
||||||
|
|
||||||
|
|
||||||
|
class Command(BaseCommand):
|
||||||
|
stderr: django.core.management.base.OutputWrapper
|
||||||
|
stdout: django.core.management.base.OutputWrapper
|
||||||
|
style: django.core.management.color.Style
|
||||||
def add_arguments(self, parser: CommandParser) -> None: ...
|
def add_arguments(self, parser: CommandParser) -> None: ...
|
||||||
def handle(self, **options) -> None: ...
|
def handle(self, **options: Any) -> None: ...
|
||||||
|
|
||||||
class NoFastDeleteCollector:
|
class NoFastDeleteCollector(Collector):
|
||||||
def can_fast_delete(self, *args, **kwargs) -> bool: ...
|
data: collections.OrderedDict
|
||||||
|
dependencies: Dict[Any, Any]
|
||||||
|
fast_deletes: List[Any]
|
||||||
|
field_updates: Dict[Any, Any]
|
||||||
|
using: str
|
||||||
|
def can_fast_delete(self, *args: Any, **kwargs: Any) -> bool: ...
|
||||||
|
|||||||
@@ -1,26 +1,36 @@
|
|||||||
from django.db.models.base import Model
|
from typing import Any, Optional, Type, Union
|
||||||
from django.db.models.options import Options
|
|
||||||
from django.db.models.query import QuerySet
|
|
||||||
from typing import Any, Dict, Tuple, Type
|
|
||||||
|
|
||||||
class ContentType:
|
from django.db import models
|
||||||
def __str__(self) -> str: ...
|
from django.db.models.base import Model
|
||||||
def get_all_objects_for_this_type(self, **kwargs) -> QuerySet: ...
|
|
||||||
def get_object_for_this_type(self, **kwargs) -> Model: ...
|
|
||||||
def model_class(self) -> Any: ...
|
class ContentTypeManager(models.Manager):
|
||||||
|
creation_counter: int
|
||||||
|
model: None
|
||||||
|
name: None
|
||||||
|
use_in_migrations: bool = ...
|
||||||
|
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
|
||||||
|
def get_by_natural_key(self, app_label: Any, model: Any): ...
|
||||||
|
def get_for_model(
|
||||||
|
self, model: Union[Type[Model], Model], for_concrete_model: bool = ...
|
||||||
|
) -> ContentType: ...
|
||||||
|
def get_for_models(self, *models: Any, for_concrete_models: bool = ...): ...
|
||||||
|
def get_for_id(self, id: int) -> ContentType: ...
|
||||||
|
def clear_cache(self) -> None: ...
|
||||||
|
|
||||||
|
class ContentType(models.Model):
|
||||||
|
id: int
|
||||||
|
app_label: str = ...
|
||||||
|
model: str = ...
|
||||||
|
objects: Any = ...
|
||||||
|
class Meta:
|
||||||
|
verbose_name: Any = ...
|
||||||
|
verbose_name_plural: Any = ...
|
||||||
|
db_table: str = ...
|
||||||
|
unique_together: Any = ...
|
||||||
@property
|
@property
|
||||||
def name(self) -> str: ...
|
def name(self) -> str: ...
|
||||||
def natural_key(self) -> Tuple[str, str]: ...
|
def model_class(self) -> Type[Model]: ...
|
||||||
|
def get_object_for_this_type(self, **kwargs: Any) -> Model: ...
|
||||||
class ContentTypeManager:
|
def get_all_objects_for_this_type(self, **kwargs: Any): ...
|
||||||
def __init__(self, *args, **kwargs) -> None: ...
|
def natural_key(self): ...
|
||||||
def _add_to_cache(self, using: str, ct: ContentType) -> None: ...
|
|
||||||
def _get_from_cache(self, opts: Options) -> ContentType: ...
|
|
||||||
def _get_opts(self, model: Any, for_concrete_model: bool) -> Options: ...
|
|
||||||
def clear_cache(self) -> None: ...
|
|
||||||
def get_by_natural_key(self, app_label: str, model: str) -> ContentType: ...
|
|
||||||
def get_for_id(self, id: int) -> ContentType: ...
|
|
||||||
def get_for_model(self, model: Any, for_concrete_model: bool = ...) -> ContentType: ...
|
|
||||||
def get_for_models(
|
|
||||||
self, *models, for_concrete_models=...
|
|
||||||
) -> Dict[Type[Model], ContentType]: ...
|
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
|
from typing import Any, Optional, Union
|
||||||
|
|
||||||
from django.http.request import HttpRequest
|
from django.http.request import HttpRequest
|
||||||
from django.http.response import HttpResponseRedirect
|
from django.http.response import HttpResponseRedirect
|
||||||
from typing import Union
|
|
||||||
|
|
||||||
def shortcut(
|
def shortcut(
|
||||||
request: HttpRequest, content_type_id: Union[str, int], object_id: Union[str, int]
|
request: HttpRequest,
|
||||||
|
content_type_id: Union[str, int],
|
||||||
|
object_id: Union[str, int],
|
||||||
) -> HttpResponseRedirect: ...
|
) -> HttpResponseRedirect: ...
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
from typing import Any, Dict, Optional, Union
|
||||||
|
|
||||||
|
from django import forms
|
||||||
|
from django.db.models.query import QuerySet
|
||||||
|
|
||||||
|
|
||||||
|
class FlatpageForm(forms.ModelForm):
|
||||||
|
auto_id: str
|
||||||
|
data: Dict[str, Union[str, List[int]]]
|
||||||
|
empty_permitted: bool
|
||||||
|
error_class: Type[django.forms.utils.ErrorList]
|
||||||
|
fields: collections.OrderedDict
|
||||||
|
files: Dict[Any, Any]
|
||||||
|
initial: Dict[str, Union[int, str, List[django.contrib.sites.models.Site]]]
|
||||||
|
instance: django.contrib.flatpages.models.FlatPage
|
||||||
|
is_bound: bool
|
||||||
|
label_suffix: str
|
||||||
|
url: Any = ...
|
||||||
|
class Meta:
|
||||||
|
model: Any = ...
|
||||||
|
fields: str = ...
|
||||||
|
def clean_url(self) -> str: ...
|
||||||
|
def clean(self) -> Dict[str, Union[str, bool, QuerySet]]: ...
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
from typing import Any, Optional
|
||||||
|
|
||||||
|
from django.core.handlers.wsgi import WSGIRequest
|
||||||
|
from django.http.response import HttpResponse
|
||||||
|
from django.utils.deprecation import MiddlewareMixin
|
||||||
|
|
||||||
|
|
||||||
|
class FlatpageFallbackMiddleware(MiddlewareMixin):
|
||||||
|
get_response: Callable
|
||||||
|
def process_response(
|
||||||
|
self, request: WSGIRequest, response: HttpResponse
|
||||||
|
) -> HttpResponse: ...
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
from typing import Any, Optional
|
||||||
|
|
||||||
|
from django.db import models
|
||||||
|
|
||||||
|
|
||||||
|
class FlatPage(models.Model):
|
||||||
|
id: None
|
||||||
|
url: str = ...
|
||||||
|
title: str = ...
|
||||||
|
content: str = ...
|
||||||
|
enable_comments: bool = ...
|
||||||
|
template_name: str = ...
|
||||||
|
registration_required: bool = ...
|
||||||
|
sites: Any = ...
|
||||||
|
class Meta:
|
||||||
|
db_table: str = ...
|
||||||
|
verbose_name: Any = ...
|
||||||
|
verbose_name_plural: Any = ...
|
||||||
|
ordering: Any = ...
|
||||||
|
def get_absolute_url(self) -> str: ...
|
||||||
|
|||||||
@@ -1,10 +1,8 @@
|
|||||||
# Stubs for django.contrib.flatpages.sitemaps (Python 3.6)
|
from typing import Optional
|
||||||
#
|
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
||||||
|
|
||||||
from django.contrib.sitemaps import Sitemap
|
from django.contrib.sitemaps import Sitemap
|
||||||
|
|
||||||
from django.db.models.query import QuerySet
|
from django.db.models.query import QuerySet
|
||||||
|
|
||||||
|
|
||||||
class FlatPageSitemap(Sitemap):
|
class FlatPageSitemap(Sitemap):
|
||||||
def items(self) -> QuerySet: ...
|
def items(self) -> QuerySet: ...
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
from typing import Any, Optional
|
||||||
|
|
||||||
|
from django import template
|
||||||
|
from django.template.base import Parser, Token
|
||||||
|
from django.template.context import Context
|
||||||
|
|
||||||
|
register: Any
|
||||||
|
|
||||||
|
class FlatpageNode(template.Node):
|
||||||
|
context_name: str = ...
|
||||||
|
starts_with: None = ...
|
||||||
|
user: None = ...
|
||||||
|
def __init__(
|
||||||
|
self,
|
||||||
|
context_name: str,
|
||||||
|
starts_with: Optional[str] = ...,
|
||||||
|
user: Optional[str] = ...,
|
||||||
|
) -> None: ...
|
||||||
|
def render(self, context: Context) -> str: ...
|
||||||
|
|
||||||
|
def get_flatpages(parser: Parser, token: Token) -> FlatpageNode: ...
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
from typing import Any, Optional
|
||||||
|
|
||||||
|
from django.contrib.flatpages.models import FlatPage
|
||||||
|
from django.core.handlers.wsgi import WSGIRequest
|
||||||
|
from django.http.response import HttpResponse
|
||||||
|
|
||||||
|
DEFAULT_TEMPLATE: str
|
||||||
|
|
||||||
|
def flatpage(request: WSGIRequest, url: str) -> HttpResponse: ...
|
||||||
|
def render_flatpage(request: WSGIRequest, f: FlatPage) -> HttpResponse: ...
|
||||||
|
|||||||
@@ -1,20 +1,19 @@
|
|||||||
# Stubs for django.contrib.humanize.templatetags.humanize (Python 3.6)
|
|
||||||
#
|
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
||||||
|
|
||||||
from typing import Any, Optional
|
|
||||||
|
|
||||||
from datetime import date, datetime
|
from datetime import date, datetime
|
||||||
from typing import Optional, Union
|
from decimal import Decimal
|
||||||
|
from typing import Any, Optional, Union
|
||||||
|
|
||||||
register: Any
|
register: Any
|
||||||
|
|
||||||
def ordinal(value: Optional[str]) -> Optional[str]: ...
|
def ordinal(value: Optional[str]) -> Optional[str]: ...
|
||||||
def intcomma(value: Optional[Union[str, float]], use_l10n: bool = ...) -> str: ...
|
def intcomma(
|
||||||
|
value: Optional[Union[Decimal, float, str]], use_l10n: bool = ...
|
||||||
|
) -> str: ...
|
||||||
|
|
||||||
intword_converters: Any
|
intword_converters: Any
|
||||||
|
|
||||||
def intword(value: Optional[str]) -> Optional[str]: ...
|
def intword(value: Optional[str]) -> Optional[Union[str, int]]: ...
|
||||||
def apnumber(value: str) -> str: ...
|
def apnumber(value: Optional[str]) -> Optional[Union[str, int]]: ...
|
||||||
def naturalday(value: Optional[date], arg: None = ...) -> Optional[str]: ...
|
def naturalday(
|
||||||
|
value: Optional[Union[date, str]], arg: None = ...
|
||||||
|
) -> Optional[str]: ...
|
||||||
def naturaltime(value: datetime) -> str: ...
|
def naturaltime(value: datetime) -> str: ...
|
||||||
|
|||||||
@@ -1,13 +1,9 @@
|
|||||||
# Stubs for django.contrib.messages.api (Python 3.6)
|
from typing import Any, List, Optional, Union
|
||||||
#
|
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
||||||
|
|
||||||
from typing import Any
|
|
||||||
|
|
||||||
from django.contrib.messages.storage.base import BaseStorage
|
from django.contrib.messages.storage.base import BaseStorage
|
||||||
from django.core.handlers.wsgi import WSGIRequest
|
from django.core.handlers.wsgi import WSGIRequest
|
||||||
from django.http.request import HttpRequest
|
from django.http.request import HttpRequest
|
||||||
from typing import Optional, Union
|
|
||||||
|
|
||||||
class MessageFailure(Exception): ...
|
class MessageFailure(Exception): ...
|
||||||
|
|
||||||
@@ -16,34 +12,34 @@ def add_message(
|
|||||||
level: int,
|
level: int,
|
||||||
message: str,
|
message: str,
|
||||||
extra_tags: str = ...,
|
extra_tags: str = ...,
|
||||||
fail_silently: Union[str, bool] = ...,
|
fail_silently: Union[bool, str] = ...,
|
||||||
) -> None: ...
|
) -> None: ...
|
||||||
def get_messages(request: HttpRequest) -> BaseStorage: ...
|
def get_messages(request: HttpRequest) -> Union[BaseStorage, List[Any]]: ...
|
||||||
def get_level(request: HttpRequest) -> int: ...
|
def get_level(request: HttpRequest) -> int: ...
|
||||||
def set_level(request: HttpRequest, level: int) -> bool: ...
|
def set_level(request: HttpRequest, level: int) -> bool: ...
|
||||||
def debug(
|
def debug(
|
||||||
request: WSGIRequest,
|
request: WSGIRequest,
|
||||||
message: str,
|
message: str,
|
||||||
extra_tags: str = ...,
|
extra_tags: str = ...,
|
||||||
fail_silently: Union[str, bool] = ...,
|
fail_silently: Union[bool, str] = ...,
|
||||||
) -> None: ...
|
) -> None: ...
|
||||||
def info(
|
def info(
|
||||||
request: WSGIRequest,
|
request: WSGIRequest,
|
||||||
message: str,
|
message: str,
|
||||||
extra_tags: str = ...,
|
extra_tags: str = ...,
|
||||||
fail_silently: Union[str, bool] = ...,
|
fail_silently: Union[bool, str] = ...,
|
||||||
) -> None: ...
|
) -> None: ...
|
||||||
def success(
|
def success(
|
||||||
request: WSGIRequest,
|
request: WSGIRequest,
|
||||||
message: str,
|
message: str,
|
||||||
extra_tags: str = ...,
|
extra_tags: str = ...,
|
||||||
fail_silently: Union[str, bool] = ...,
|
fail_silently: Union[bool, str] = ...,
|
||||||
) -> None: ...
|
) -> None: ...
|
||||||
def warning(
|
def warning(
|
||||||
request: WSGIRequest,
|
request: WSGIRequest,
|
||||||
message: str,
|
message: str,
|
||||||
extra_tags: str = ...,
|
extra_tags: str = ...,
|
||||||
fail_silently: Union[str, bool] = ...,
|
fail_silently: Union[bool, str] = ...,
|
||||||
) -> None: ...
|
) -> None: ...
|
||||||
def error(
|
def error(
|
||||||
request: WSGIRequest,
|
request: WSGIRequest,
|
||||||
|
|||||||
@@ -1,11 +1,20 @@
|
|||||||
# Stubs for django.contrib.messages.context_processors (Python 3.6)
|
from typing import Any, Dict, List, Optional, Union
|
||||||
#
|
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
||||||
|
|
||||||
from typing import Any
|
from django.contrib.messages.storage.cookie import CookieStorage
|
||||||
|
from django.contrib.messages.storage.fallback import FallbackStorage
|
||||||
from django.contrib.messages.storage.base import BaseStorage
|
from django.contrib.messages.storage.session import SessionStorage
|
||||||
from django.http.request import HttpRequest
|
from django.http.request import HttpRequest
|
||||||
from typing import Dict, Union
|
|
||||||
|
|
||||||
def messages(request: HttpRequest) -> Dict[str, Union[Dict[str, int], BaseStorage]]: ...
|
|
||||||
|
def messages(
|
||||||
|
request: HttpRequest
|
||||||
|
) -> Dict[
|
||||||
|
str,
|
||||||
|
Union[
|
||||||
|
List[Any],
|
||||||
|
Dict[str, int],
|
||||||
|
FallbackStorage,
|
||||||
|
SessionStorage,
|
||||||
|
CookieStorage,
|
||||||
|
],
|
||||||
|
]: ...
|
||||||
|
|||||||
@@ -1,15 +1,13 @@
|
|||||||
# Stubs for django.contrib.messages.middleware (Python 3.6)
|
from typing import Any, Optional
|
||||||
#
|
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
||||||
|
|
||||||
from django.utils.deprecation import MiddlewareMixin
|
|
||||||
from typing import Any
|
|
||||||
|
|
||||||
from django.core.handlers.wsgi import WSGIRequest
|
from django.core.handlers.wsgi import WSGIRequest
|
||||||
from django.http.request import HttpRequest
|
from django.http.request import HttpRequest
|
||||||
from django.http.response import HttpResponseBase
|
from django.http.response import HttpResponseBase
|
||||||
|
from django.utils.deprecation import MiddlewareMixin
|
||||||
|
|
||||||
|
|
||||||
class MessageMiddleware(MiddlewareMixin):
|
class MessageMiddleware(MiddlewareMixin):
|
||||||
|
get_response: Callable
|
||||||
def process_request(self, request: WSGIRequest) -> None: ...
|
def process_request(self, request: WSGIRequest) -> None: ...
|
||||||
def process_response(
|
def process_response(
|
||||||
self, request: HttpRequest, response: HttpResponseBase
|
self, request: HttpRequest, response: HttpResponseBase
|
||||||
|
|||||||
@@ -1,10 +1,7 @@
|
|||||||
# Stubs for django.contrib.messages.storage (Python 3.6)
|
from typing import Any, Optional
|
||||||
#
|
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
||||||
|
|
||||||
from typing import Any
|
|
||||||
|
|
||||||
from django.contrib.messages.storage.base import BaseStorage
|
from django.contrib.messages.storage.base import BaseStorage
|
||||||
from django.http.request import HttpRequest
|
from django.http.request import HttpRequest
|
||||||
|
|
||||||
|
|
||||||
def default_storage(request: HttpRequest) -> BaseStorage: ...
|
def default_storage(request: HttpRequest) -> BaseStorage: ...
|
||||||
|
|||||||
@@ -1,26 +1,35 @@
|
|||||||
|
from typing import Any, List, Optional, Union
|
||||||
|
|
||||||
from django.http.request import HttpRequest
|
from django.http.request import HttpRequest
|
||||||
from django.http.response import HttpResponseBase
|
from django.http.response import HttpResponseBase
|
||||||
from typing import List, Optional, Union
|
|
||||||
|
|
||||||
class BaseStorage:
|
LEVEL_TAGS: Any
|
||||||
def __init__(self, request: HttpRequest, *args, **kwargs) -> None: ...
|
|
||||||
def __len__(self) -> int: ...
|
|
||||||
def _get_level(self) -> int: ...
|
|
||||||
@property
|
|
||||||
def _loaded_messages(self) -> Union[List[Message], List[str]]: ...
|
|
||||||
def _prepare_messages(self, messages: List[Message]) -> None: ...
|
|
||||||
def _set_level(self, value: int = ...) -> None: ...
|
|
||||||
def add(self, level: int, message: str, extra_tags: Optional[str] = ...) -> None: ...
|
|
||||||
def update(self, response: HttpResponseBase) -> None: ...
|
|
||||||
|
|
||||||
class Message:
|
class Message:
|
||||||
def __eq__(self, other: Union[str, Message]) -> bool: ...
|
level: int = ...
|
||||||
|
message: str = ...
|
||||||
|
extra_tags: str = ...
|
||||||
def __init__(
|
def __init__(
|
||||||
self, level: int, message: str, extra_tags: Optional[str] = ...
|
self, level: int, message: str, extra_tags: Optional[str] = ...
|
||||||
) -> None: ...
|
) -> None: ...
|
||||||
def __str__(self) -> str: ...
|
def __eq__(self, other: Union[str, Message]) -> bool: ...
|
||||||
def _prepare(self) -> None: ...
|
|
||||||
@property
|
|
||||||
def level_tag(self) -> str: ...
|
|
||||||
@property
|
@property
|
||||||
def tags(self) -> str: ...
|
def tags(self) -> str: ...
|
||||||
|
@property
|
||||||
|
def level_tag(self) -> str: ...
|
||||||
|
|
||||||
|
class BaseStorage:
|
||||||
|
request: Any = ...
|
||||||
|
used: bool = ...
|
||||||
|
added_new: bool = ...
|
||||||
|
def __init__(
|
||||||
|
self, request: HttpRequest, *args: Any, **kwargs: Any
|
||||||
|
) -> None: ...
|
||||||
|
def __len__(self) -> int: ...
|
||||||
|
def __iter__(self): ...
|
||||||
|
def __contains__(self, item: Any): ...
|
||||||
|
def update(self, response: HttpResponseBase) -> Optional[List[Message]]: ...
|
||||||
|
def add(
|
||||||
|
self, level: int, message: str, extra_tags: Optional[str] = ...
|
||||||
|
) -> None: ...
|
||||||
|
level: Any = ...
|
||||||
|
|||||||
@@ -1,51 +1,43 @@
|
|||||||
# Stubs for django.contrib.messages.storage.cookie (Python 3.6)
|
|
||||||
#
|
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
||||||
|
|
||||||
import json
|
import json
|
||||||
from django.contrib.messages.storage.base import BaseStorage
|
from typing import Any, Collection, Dict, List, Optional, Union
|
||||||
from typing import Any
|
|
||||||
|
from django.contrib.messages.storage.base import BaseStorage, Message
|
||||||
|
|
||||||
from django.contrib.messages.storage.base import Message
|
|
||||||
from django.http.response import HttpResponse
|
|
||||||
from typing import Any, List, Optional, Tuple, Union
|
|
||||||
|
|
||||||
class MessageEncoder(json.JSONEncoder):
|
class MessageEncoder(json.JSONEncoder):
|
||||||
|
allow_nan: bool
|
||||||
|
check_circular: bool
|
||||||
|
ensure_ascii: bool
|
||||||
|
indent: None
|
||||||
|
item_separator: str
|
||||||
|
key_separator: str
|
||||||
|
skipkeys: bool
|
||||||
|
sort_keys: bool
|
||||||
message_key: str = ...
|
message_key: str = ...
|
||||||
def default(self, obj: Message) -> List[Union[int, str]]: ...
|
def default(self, obj: Message) -> List[Union[str, int]]: ...
|
||||||
|
|
||||||
class MessageDecoder(json.JSONDecoder):
|
class MessageDecoder(json.JSONDecoder):
|
||||||
def process_messages(self, obj: Any) -> Any: ...
|
def process_messages(self, obj: Collection) -> Any: ...
|
||||||
def decode(
|
def decode(
|
||||||
self, s: str, **kwargs: Any
|
self, s: str, **kwargs: Any
|
||||||
) -> Union[List[Union[Message, str]], List[Message], List[str]]: ...
|
) -> Union[
|
||||||
|
List[
|
||||||
|
Union[
|
||||||
|
Dict[
|
||||||
|
str,
|
||||||
|
Union[Message, List[Union[Message, Dict[str, Message]]]],
|
||||||
|
],
|
||||||
|
Message,
|
||||||
|
]
|
||||||
|
],
|
||||||
|
Message,
|
||||||
|
List[Union[Message, str]],
|
||||||
|
]: ...
|
||||||
|
|
||||||
class CookieStorage(BaseStorage):
|
class CookieStorage(BaseStorage):
|
||||||
|
added_new: bool
|
||||||
|
request: django.core.handlers.wsgi.WSGIRequest
|
||||||
|
used: bool
|
||||||
cookie_name: str = ...
|
cookie_name: str = ...
|
||||||
max_cookie_size: int = ...
|
max_cookie_size: int = ...
|
||||||
not_finished: str = ...
|
not_finished: str = ...
|
||||||
def _get(
|
|
||||||
self, *args: Any, **kwargs: Any
|
|
||||||
) -> Union[
|
|
||||||
Tuple[None, bool],
|
|
||||||
Tuple[List[Any], bool],
|
|
||||||
Tuple[List[str], bool],
|
|
||||||
Tuple[List[Message], bool],
|
|
||||||
]: ...
|
|
||||||
def _update_cookie(
|
|
||||||
self, encoded_data: Optional[str], response: HttpResponse
|
|
||||||
) -> None: ...
|
|
||||||
def _store(
|
|
||||||
self,
|
|
||||||
messages: List[Message],
|
|
||||||
response: HttpResponse,
|
|
||||||
remove_oldest: bool = ...,
|
|
||||||
*args: Any,
|
|
||||||
**kwargs: Any,
|
|
||||||
) -> List[Message]: ...
|
|
||||||
def _hash(self, value: str) -> str: ...
|
|
||||||
def _encode(
|
|
||||||
self, messages: Union[List[Message], List[str]], encode_empty: bool = ...
|
|
||||||
) -> Optional[str]: ...
|
|
||||||
used: bool = ...
|
|
||||||
def _decode(self, data: Optional[str]) -> Any: ...
|
|
||||||
|
|||||||
@@ -1,24 +1,12 @@
|
|||||||
# Stubs for django.contrib.messages.storage.fallback (Python 3.6)
|
from typing import Any, Optional
|
||||||
#
|
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
||||||
|
|
||||||
from django.contrib.messages.storage.base import BaseStorage
|
from django.contrib.messages.storage.base import BaseStorage
|
||||||
from typing import Any
|
|
||||||
|
|
||||||
from django.contrib.messages.storage.base import Message
|
|
||||||
from django.http.response import HttpResponse
|
|
||||||
from typing import Any, List, Tuple, Union
|
|
||||||
|
|
||||||
class FallbackStorage(BaseStorage):
|
class FallbackStorage(BaseStorage):
|
||||||
|
added_new: bool
|
||||||
|
request: django.core.handlers.wsgi.WSGIRequest
|
||||||
|
used: bool
|
||||||
storage_classes: Any = ...
|
storage_classes: Any = ...
|
||||||
storages: Any = ...
|
storages: Any = ...
|
||||||
_used_storages: Any = ...
|
|
||||||
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
|
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
|
||||||
def _get(
|
|
||||||
self, *args: Any, **kwargs: Any
|
|
||||||
) -> Union[
|
|
||||||
Tuple[List[Any], bool], Tuple[List[str], bool], Tuple[List[Message], bool]
|
|
||||||
]: ...
|
|
||||||
def _store(
|
|
||||||
self, messages: List[Message], response: HttpResponse, *args: Any, **kwargs: Any
|
|
||||||
) -> List[Any]: ...
|
|
||||||
|
|||||||
@@ -1,25 +1,20 @@
|
|||||||
# Stubs for django.contrib.messages.storage.session (Python 3.6)
|
from typing import Any, List, Optional, Union
|
||||||
#
|
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
||||||
|
|
||||||
from django.contrib.messages.storage.base import BaseStorage
|
from django.contrib.messages.storage.base import BaseStorage, Message
|
||||||
from typing import Any
|
|
||||||
|
|
||||||
from django.contrib.messages.storage.base import Message
|
|
||||||
from django.http.request import HttpRequest
|
from django.http.request import HttpRequest
|
||||||
from django.http.response import HttpResponse
|
|
||||||
from typing import Any, List, Optional, Tuple, Union
|
|
||||||
|
|
||||||
class SessionStorage(BaseStorage):
|
class SessionStorage(BaseStorage):
|
||||||
|
added_new: bool
|
||||||
|
request: django.core.handlers.wsgi.WSGIRequest
|
||||||
|
used: bool
|
||||||
session_key: str = ...
|
session_key: str = ...
|
||||||
def __init__(self, request: HttpRequest, *args: Any, **kwargs: Any) -> None: ...
|
def __init__(
|
||||||
def _get(
|
self, request: HttpRequest, *args: Any, **kwargs: Any
|
||||||
self, *args: Any, **kwargs: Any
|
) -> None: ...
|
||||||
) -> Union[Tuple[None, bool], Tuple[List[str], bool], Tuple[List[Message], bool]]: ...
|
def serialize_messages(
|
||||||
def _store(
|
self, messages: Union[List[Message], List[str]]
|
||||||
self, messages: List[Message], response: HttpResponse, *args: Any, **kwargs: Any
|
) -> str: ...
|
||||||
) -> List[Any]: ...
|
|
||||||
def serialize_messages(self, messages: Union[List[Message], List[str]]) -> str: ...
|
|
||||||
def deserialize_messages(
|
def deserialize_messages(
|
||||||
self, data: Optional[str]
|
self, data: Optional[Union[str, List[Any]]]
|
||||||
) -> Optional[Union[List[Message], List[str]]]: ...
|
) -> Optional[Union[List[str], List[Message]]]: ...
|
||||||
|
|||||||
@@ -1,7 +1,4 @@
|
|||||||
# Stubs for django.contrib.messages.utils (Python 3.6)
|
from typing import Dict, Optional
|
||||||
#
|
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
||||||
|
|
||||||
from typing import Dict
|
|
||||||
|
|
||||||
def get_level_tags() -> Dict[int, str]: ...
|
def get_level_tags() -> Dict[int, str]: ...
|
||||||
|
|||||||
10
django-stubs/contrib/messages/views.pyi
Normal file
10
django-stubs/contrib/messages/views.pyi
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
from typing import Any, Dict, Optional
|
||||||
|
|
||||||
|
from django.forms.forms import Form
|
||||||
|
from django.http.response import HttpResponseRedirect
|
||||||
|
|
||||||
|
|
||||||
|
class SuccessMessageMixin:
|
||||||
|
success_message: str = ...
|
||||||
|
def form_valid(self, form: Form) -> HttpResponseRedirect: ...
|
||||||
|
def get_success_message(self, cleaned_data: Dict[str, str]) -> str: ...
|
||||||
89
django-stubs/contrib/postgres/fields/array.pyi
Normal file
89
django-stubs/contrib/postgres/fields/array.pyi
Normal file
@@ -0,0 +1,89 @@
|
|||||||
|
from typing import Any, Dict, List, Optional, Tuple
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
|
||||||
|
class ArrayField(CheckFieldDefaultMixin, Field):
|
||||||
|
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, Any]]: ...
|
||||||
|
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): ...
|
||||||
|
|
||||||
|
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): ...
|
||||||
89
django-stubs/contrib/postgres/fields/jsonb.pyi
Normal file
89
django-stubs/contrib/postgres/fields/jsonb.pyi
Normal file
@@ -0,0 +1,89 @@
|
|||||||
|
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[bool, Type[DjangoJSONEncoder]]]
|
||||||
|
]: ...
|
||||||
|
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): ...
|
||||||
5
django-stubs/contrib/postgres/fields/mixins.pyi
Normal file
5
django-stubs/contrib/postgres/fields/mixins.pyi
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
from typing import Any, List, Optional
|
||||||
|
|
||||||
|
|
||||||
|
class CheckFieldDefaultMixin:
|
||||||
|
def check(self, **kwargs: Any) -> List[Any]: ...
|
||||||
98
django-stubs/contrib/postgres/fields/ranges.pyi
Normal file
98
django-stubs/contrib/postgres/fields/ranges.pyi
Normal file
@@ -0,0 +1,98 @@
|
|||||||
|
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 = ...
|
||||||
51
django-stubs/contrib/postgres/operations.pyi
Normal file
51
django-stubs/contrib/postgres/operations.pyi
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
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: ...
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
from typing import Any, Callable, Optional
|
||||||
|
|
||||||
|
from django.core.handlers.wsgi import WSGIRequest
|
||||||
|
from django.http.response import HttpResponse
|
||||||
|
from django.utils.deprecation import MiddlewareMixin
|
||||||
|
|
||||||
|
|
||||||
|
class RedirectFallbackMiddleware(MiddlewareMixin):
|
||||||
|
get_response: Callable
|
||||||
|
response_gone_class: Any = ...
|
||||||
|
response_redirect_class: Any = ...
|
||||||
|
def __init__(self, get_response: Optional[Callable] = ...) -> None: ...
|
||||||
|
def process_response(
|
||||||
|
self, request: WSGIRequest, response: HttpResponse
|
||||||
|
) -> HttpResponse: ...
|
||||||
|
|||||||
17
django-stubs/contrib/redirects/models.pyi
Normal file
17
django-stubs/contrib/redirects/models.pyi
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
from typing import Any, Optional
|
||||||
|
|
||||||
|
from django.db import models
|
||||||
|
|
||||||
|
|
||||||
|
class Redirect(models.Model):
|
||||||
|
id: None
|
||||||
|
site_id: int
|
||||||
|
site: Any = ...
|
||||||
|
old_path: str = ...
|
||||||
|
new_path: str = ...
|
||||||
|
class Meta:
|
||||||
|
verbose_name: Any = ...
|
||||||
|
verbose_name_plural: Any = ...
|
||||||
|
db_table: str = ...
|
||||||
|
unique_together: Any = ...
|
||||||
|
ordering: Any = ...
|
||||||
@@ -1,12 +1,7 @@
|
|||||||
# Stubs for django.contrib.sessions.backends.base (Python 3.6)
|
|
||||||
#
|
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
||||||
|
|
||||||
from typing import Any, Optional
|
|
||||||
|
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
|
from typing import Any, Dict, Optional, Union
|
||||||
|
|
||||||
from django.db.models.base import Model
|
from django.db.models.base import Model
|
||||||
from typing import Dict, Optional, Union
|
|
||||||
|
|
||||||
VALID_KEY_CHARS: Any
|
VALID_KEY_CHARS: Any
|
||||||
|
|
||||||
@@ -16,49 +11,43 @@ class UpdateError(Exception): ...
|
|||||||
class SessionBase:
|
class SessionBase:
|
||||||
TEST_COOKIE_NAME: str = ...
|
TEST_COOKIE_NAME: str = ...
|
||||||
TEST_COOKIE_VALUE: str = ...
|
TEST_COOKIE_VALUE: str = ...
|
||||||
__not_given: Any = ...
|
|
||||||
_session_key: Any = ...
|
|
||||||
accessed: bool = ...
|
accessed: bool = ...
|
||||||
modified: bool = ...
|
modified: bool = ...
|
||||||
serializer: Any = ...
|
serializer: Any = ...
|
||||||
def __init__(self, session_key: Optional[str] = ...) -> None: ...
|
def __init__(self, session_key: Optional[str] = ...) -> None: ...
|
||||||
def __contains__(self, key: str) -> bool: ...
|
def __contains__(self, key: str) -> bool: ...
|
||||||
def __getitem__(self, key: str) -> Union[str, Model, int]: ...
|
def __getitem__(self, key: str) -> Union[str, Model, int]: ...
|
||||||
def __setitem__(self, key: str, value: Union[str, datetime, int]) -> None: ...
|
def __setitem__(
|
||||||
|
self, key: str, value: Union[str, datetime, Model, int]
|
||||||
|
) -> None: ...
|
||||||
def __delitem__(self, key: str) -> None: ...
|
def __delitem__(self, key: str) -> None: ...
|
||||||
def get(
|
def get(
|
||||||
self, key: str, default: Optional[str] = ...
|
self, key: str, default: Optional[str] = ...
|
||||||
) -> Optional[Union[str, datetime, int]]: ...
|
) -> Optional[Union[str, int, datetime]]: ...
|
||||||
def pop(self, key: str, default: object = ...) -> Union[str, int]: ...
|
def pop(self, key: str, default: Any = ...) -> Union[str, int]: ...
|
||||||
def setdefault(self, key: str, value: str) -> str: ...
|
def setdefault(self, key: str, value: str) -> str: ...
|
||||||
def set_test_cookie(self) -> None: ...
|
def set_test_cookie(self) -> None: ...
|
||||||
def test_cookie_worked(self) -> bool: ...
|
def test_cookie_worked(self) -> bool: ...
|
||||||
def delete_test_cookie(self) -> None: ...
|
def delete_test_cookie(self) -> None: ...
|
||||||
def _hash(self, value: bytes) -> str: ...
|
def encode(
|
||||||
def encode(self, session_dict: Dict[str, Union[str, int, datetime]]) -> str: ...
|
self, session_dict: Dict[str, Union[str, int, Model, datetime]]
|
||||||
def decode(self, session_data: Union[str, bytes]) -> Dict[str, Union[str, int]]: ...
|
) -> str: ...
|
||||||
|
def decode(
|
||||||
|
self, session_data: Union[str, bytes]
|
||||||
|
) -> Dict[str, Union[str, int, Model, datetime]]: ...
|
||||||
def update(self, dict_: Dict[str, int]) -> None: ...
|
def update(self, dict_: Dict[str, int]) -> None: ...
|
||||||
def has_key(self, key: Any): ...
|
def has_key(self, key: Any): ...
|
||||||
def keys(self): ...
|
def keys(self): ...
|
||||||
def values(self): ...
|
def values(self): ...
|
||||||
def items(self): ...
|
def items(self): ...
|
||||||
_session_cache: Any = ...
|
|
||||||
def clear(self) -> None: ...
|
def clear(self) -> None: ...
|
||||||
def is_empty(self) -> bool: ...
|
def is_empty(self) -> bool: ...
|
||||||
def _get_new_session_key(self) -> str: ...
|
|
||||||
def _get_or_create_session_key(self) -> str: ...
|
|
||||||
def _validate_session_key(self, key: Optional[str]) -> Optional[Union[str, bool]]: ...
|
|
||||||
def _get_session_key(self) -> Optional[str]: ...
|
|
||||||
__session_key: Any = ...
|
|
||||||
def _set_session_key(self, value: Optional[str]) -> None: ...
|
|
||||||
session_key: Any = ...
|
session_key: Any = ...
|
||||||
def _get_session(
|
|
||||||
self, no_load: bool = ...
|
|
||||||
) -> Dict[str, Union[str, int, datetime, Model]]: ...
|
|
||||||
_session: Any = ...
|
|
||||||
def get_expiry_age(self, **kwargs: Any) -> int: ...
|
def get_expiry_age(self, **kwargs: Any) -> int: ...
|
||||||
def get_expiry_date(self, **kwargs: Any) -> datetime: ...
|
def get_expiry_date(self, **kwargs: Any) -> datetime: ...
|
||||||
def set_expiry(self, value: Optional[Union[datetime, int, timedelta]]) -> None: ...
|
def set_expiry(
|
||||||
|
self, value: Optional[Union[datetime, int, timedelta]]
|
||||||
|
) -> None: ...
|
||||||
def get_expire_at_browser_close(self) -> bool: ...
|
def get_expire_at_browser_close(self) -> bool: ...
|
||||||
def flush(self) -> None: ...
|
def flush(self) -> None: ...
|
||||||
def cycle_key(self) -> None: ...
|
def cycle_key(self) -> None: ...
|
||||||
|
|||||||
@@ -1,22 +1,17 @@
|
|||||||
# Stubs for django.contrib.sessions.backends.cache (Python 3.6)
|
from typing import Any, Dict, Optional
|
||||||
#
|
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
||||||
|
|
||||||
from django.contrib.sessions.backends.base import SessionBase
|
from django.contrib.sessions.backends.base import SessionBase
|
||||||
from typing import Any, Optional
|
|
||||||
|
|
||||||
from typing import Any, Dict, Optional
|
|
||||||
|
|
||||||
KEY_PREFIX: str
|
KEY_PREFIX: str
|
||||||
|
|
||||||
class SessionStore(SessionBase):
|
class SessionStore(SessionBase):
|
||||||
|
accessed: bool
|
||||||
|
serializer: Type[django.core.signing.JSONSerializer]
|
||||||
cache_key_prefix: Any = ...
|
cache_key_prefix: Any = ...
|
||||||
_cache: Any = ...
|
def __init__(self, session_key: Optional[str] = ...) -> None: ...
|
||||||
def __init__(self, session_key: None = ...) -> None: ...
|
|
||||||
@property
|
@property
|
||||||
def cache_key(self) -> str: ...
|
def cache_key(self) -> str: ...
|
||||||
_session_key: Any = ...
|
def load(self) -> Dict[str, str]: ...
|
||||||
def load(self) -> Dict[Any, Any]: ...
|
|
||||||
modified: bool = ...
|
modified: bool = ...
|
||||||
def create(self) -> None: ...
|
def create(self) -> None: ...
|
||||||
def save(self, must_create: bool = ...) -> None: ...
|
def save(self, must_create: bool = ...) -> None: ...
|
||||||
|
|||||||
@@ -1,23 +1,19 @@
|
|||||||
# Stubs for django.contrib.sessions.backends.cached_db (Python 3.6)
|
from typing import Any, Dict, Optional
|
||||||
#
|
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
||||||
|
|
||||||
from django.contrib.sessions.backends.db import SessionStore as DBStore
|
from django.contrib.sessions.backends.db import SessionStore as DBStore
|
||||||
from typing import Any, Optional
|
|
||||||
|
|
||||||
from typing import Any, Dict, Optional
|
|
||||||
|
|
||||||
KEY_PREFIX: str
|
KEY_PREFIX: str
|
||||||
|
|
||||||
class SessionStore(DBStore):
|
class SessionStore(DBStore):
|
||||||
|
accessed: bool
|
||||||
|
modified: bool
|
||||||
|
serializer: Type[django.core.signing.JSONSerializer]
|
||||||
cache_key_prefix: Any = ...
|
cache_key_prefix: Any = ...
|
||||||
_cache: Any = ...
|
|
||||||
def __init__(self, session_key: Optional[str] = ...) -> None: ...
|
def __init__(self, session_key: Optional[str] = ...) -> None: ...
|
||||||
@property
|
@property
|
||||||
def cache_key(self) -> str: ...
|
def cache_key(self) -> str: ...
|
||||||
def load(self) -> Dict[Any, Any]: ...
|
def load(self) -> Dict[str, str]: ...
|
||||||
def exists(self, session_key: str) -> bool: ...
|
def exists(self, session_key: Optional[str]) -> bool: ...
|
||||||
def save(self, must_create: bool = ...) -> None: ...
|
def save(self, must_create: bool = ...) -> None: ...
|
||||||
def delete(self, session_key: Optional[str] = ...) -> None: ...
|
def delete(self, session_key: Optional[str] = ...) -> None: ...
|
||||||
_session_key: Any = ...
|
|
||||||
def flush(self) -> None: ...
|
def flush(self) -> None: ...
|
||||||
|
|||||||
@@ -1,28 +1,25 @@
|
|||||||
# Stubs for django.contrib.sessions.backends.db (Python 3.6)
|
from datetime import datetime
|
||||||
#
|
from typing import Any, Dict, Optional, Type, Union
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
||||||
|
|
||||||
from django.contrib.sessions.backends.base import SessionBase
|
from django.contrib.sessions.backends.base import SessionBase
|
||||||
from typing import Any, Optional
|
|
||||||
|
|
||||||
from datetime import datetime
|
|
||||||
from django.contrib.sessions.base_session import AbstractBaseSession
|
from django.contrib.sessions.base_session import AbstractBaseSession
|
||||||
from django.contrib.sessions.models import Session
|
from django.contrib.sessions.models import Session
|
||||||
from typing import Dict, Optional, Type, Union
|
from django.db.models.base import Model
|
||||||
|
|
||||||
|
|
||||||
class SessionStore(SessionBase):
|
class SessionStore(SessionBase):
|
||||||
|
accessed: bool
|
||||||
|
serializer: Type[django.core.signing.JSONSerializer]
|
||||||
def __init__(self, session_key: Optional[str] = ...) -> None: ...
|
def __init__(self, session_key: Optional[str] = ...) -> None: ...
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_model_class(cls) -> Type[Session]: ...
|
def get_model_class(cls) -> Type[Session]: ...
|
||||||
def model(self) -> Type[AbstractBaseSession]: ...
|
def model(self) -> Type[AbstractBaseSession]: ...
|
||||||
_session_key: Any = ...
|
def load(self) -> Dict[str, Union[Model, str, int]]: ...
|
||||||
def _get_session_from_db(self) -> Optional[AbstractBaseSession]: ...
|
|
||||||
def load(self) -> Dict[str, Union[str, int]]: ...
|
|
||||||
def exists(self, session_key: Optional[str]) -> bool: ...
|
def exists(self, session_key: Optional[str]) -> bool: ...
|
||||||
modified: bool = ...
|
modified: bool = ...
|
||||||
def create(self) -> None: ...
|
def create(self) -> None: ...
|
||||||
def create_model_instance(
|
def create_model_instance(
|
||||||
self, data: Dict[str, Union[str, int, datetime]]
|
self, data: Dict[str, Union[int, str, Model, datetime]]
|
||||||
) -> AbstractBaseSession: ...
|
) -> AbstractBaseSession: ...
|
||||||
def save(self, must_create: bool = ...) -> None: ...
|
def save(self, must_create: bool = ...) -> None: ...
|
||||||
def delete(self, session_key: Optional[str] = ...) -> None: ...
|
def delete(self, session_key: Optional[str] = ...) -> None: ...
|
||||||
|
|||||||
@@ -1,23 +1,15 @@
|
|||||||
# Stubs for django.contrib.sessions.backends.file (Python 3.6)
|
from typing import Any, Dict, Optional, Union
|
||||||
#
|
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
||||||
|
|
||||||
from django.contrib.sessions.backends.base import SessionBase
|
from django.contrib.sessions.backends.base import SessionBase
|
||||||
from typing import Any, Optional
|
|
||||||
|
|
||||||
from typing import Dict, Optional
|
|
||||||
|
|
||||||
class SessionStore(SessionBase):
|
class SessionStore(SessionBase):
|
||||||
storage_path: Any = ...
|
accessed: bool
|
||||||
file_prefix: Any = ...
|
serializer: Type[django.core.signing.JSONSerializer]
|
||||||
|
storage_path: str = ...
|
||||||
|
file_prefix: str = ...
|
||||||
def __init__(self, session_key: Optional[str] = ...) -> None: ...
|
def __init__(self, session_key: Optional[str] = ...) -> None: ...
|
||||||
@classmethod
|
def load(self) -> Dict[str, Union[str, int]]: ...
|
||||||
def _get_storage_path(cls) -> str: ...
|
|
||||||
def _key_to_file(self, session_key: Optional[str] = ...) -> str: ...
|
|
||||||
def _last_modification(self): ...
|
|
||||||
def _expiry_date(self, session_data: Any): ...
|
|
||||||
_session_key: Any = ...
|
|
||||||
def load(self) -> Dict[str, str]: ...
|
|
||||||
modified: bool = ...
|
modified: bool = ...
|
||||||
def create(self) -> None: ...
|
def create(self) -> None: ...
|
||||||
def save(self, must_create: bool = ...) -> None: ...
|
def save(self, must_create: bool = ...) -> None: ...
|
||||||
|
|||||||
@@ -1,23 +1,18 @@
|
|||||||
# Stubs for django.contrib.sessions.backends.signed_cookies (Python 3.6)
|
from datetime import datetime
|
||||||
#
|
from typing import Any, Dict, Optional, Union
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
||||||
|
|
||||||
from django.contrib.sessions.backends.base import SessionBase
|
from django.contrib.sessions.backends.base import SessionBase
|
||||||
from typing import Any, Optional
|
|
||||||
|
|
||||||
from datetime import datetime
|
|
||||||
from typing import Dict, Optional, Union
|
|
||||||
|
|
||||||
class SessionStore(SessionBase):
|
class SessionStore(SessionBase):
|
||||||
|
accessed: bool
|
||||||
|
serializer: Type[django.core.signing.JSONSerializer]
|
||||||
def load(self) -> Dict[str, Union[str, datetime]]: ...
|
def load(self) -> Dict[str, Union[str, datetime]]: ...
|
||||||
modified: bool = ...
|
modified: bool = ...
|
||||||
def create(self) -> None: ...
|
def create(self) -> None: ...
|
||||||
_session_key: Any = ...
|
|
||||||
def save(self, must_create: bool = ...) -> None: ...
|
def save(self, must_create: bool = ...) -> None: ...
|
||||||
def exists(self, session_key: str = ...) -> bool: ...
|
def exists(self, session_key: Optional[str] = ...) -> bool: ...
|
||||||
_session_cache: Any = ...
|
|
||||||
def delete(self, session_key: Optional[str] = ...) -> None: ...
|
def delete(self, session_key: Optional[str] = ...) -> None: ...
|
||||||
def cycle_key(self) -> None: ...
|
def cycle_key(self) -> None: ...
|
||||||
def _get_session_key(self) -> str: ...
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def clear_expired(cls) -> None: ...
|
def clear_expired(cls) -> None: ...
|
||||||
|
|||||||
@@ -1,5 +1,30 @@
|
|||||||
from typing import Dict
|
from datetime import datetime
|
||||||
|
from typing import Any, Dict, Optional
|
||||||
|
|
||||||
class AbstractBaseSession:
|
from django.db import models
|
||||||
def __str__(self) -> str: ...
|
|
||||||
|
|
||||||
|
class BaseSessionManager(models.Manager):
|
||||||
|
creation_counter: int
|
||||||
|
model: None
|
||||||
|
name: None
|
||||||
|
def encode(self, session_dict: Dict[str, int]) -> str: ...
|
||||||
|
def save(
|
||||||
|
self,
|
||||||
|
session_key: str,
|
||||||
|
session_dict: Dict[str, int],
|
||||||
|
expire_date: datetime,
|
||||||
|
) -> AbstractBaseSession: ...
|
||||||
|
|
||||||
|
class AbstractBaseSession(models.Model):
|
||||||
|
session_key: Any = ...
|
||||||
|
session_data: Any = ...
|
||||||
|
expire_date: Any = ...
|
||||||
|
objects: Any = ...
|
||||||
|
class Meta:
|
||||||
|
abstract: bool = ...
|
||||||
|
verbose_name: Any = ...
|
||||||
|
verbose_name_plural: Any = ...
|
||||||
|
@classmethod
|
||||||
|
def get_session_store_class(cls) -> None: ...
|
||||||
def get_decoded(self) -> Dict[str, int]: ...
|
def get_decoded(self) -> Dict[str, int]: ...
|
||||||
|
|||||||
@@ -1,2 +1,11 @@
|
|||||||
class Command:
|
from typing import Any, Optional
|
||||||
def handle(self, **options) -> None: ...
|
|
||||||
|
from django.core.management.base import BaseCommand
|
||||||
|
|
||||||
|
|
||||||
|
class Command(BaseCommand):
|
||||||
|
stderr: django.core.management.base.OutputWrapper
|
||||||
|
stdout: django.core.management.base.OutputWrapper
|
||||||
|
style: django.core.management.color.Style
|
||||||
|
help: str = ...
|
||||||
|
def handle(self, **options: Any) -> None: ...
|
||||||
|
|||||||
@@ -1,19 +1,16 @@
|
|||||||
# Stubs for django.contrib.sessions.middleware (Python 3.6)
|
from typing import Any, Callable, Optional
|
||||||
#
|
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
||||||
|
|
||||||
from django.utils.deprecation import MiddlewareMixin
|
|
||||||
from typing import Any, Optional
|
|
||||||
|
|
||||||
from django.core.handlers.wsgi import WSGIRequest
|
from django.core.handlers.wsgi import WSGIRequest
|
||||||
|
from django.http.request import HttpRequest
|
||||||
from django.http.response import HttpResponseBase
|
from django.http.response import HttpResponseBase
|
||||||
from typing import Callable, Optional
|
from django.utils.deprecation import MiddlewareMixin
|
||||||
|
|
||||||
|
|
||||||
class SessionMiddleware(MiddlewareMixin):
|
class SessionMiddleware(MiddlewareMixin):
|
||||||
get_response: Any = ...
|
get_response: Callable = ...
|
||||||
SessionStore: Any = ...
|
SessionStore: Type[django.contrib.sessions.backends.db.SessionStore] = ...
|
||||||
def __init__(self, get_response: Optional[Callable] = ...) -> None: ...
|
def __init__(self, get_response: Optional[Callable] = ...) -> None: ...
|
||||||
def process_request(self, request: WSGIRequest) -> None: ...
|
def process_request(self, request: HttpRequest) -> None: ...
|
||||||
def process_response(
|
def process_response(
|
||||||
self, request: WSGIRequest, response: HttpResponseBase
|
self, request: WSGIRequest, response: HttpResponseBase
|
||||||
) -> HttpResponseBase: ...
|
) -> HttpResponseBase: ...
|
||||||
|
|||||||
@@ -1,6 +1,22 @@
|
|||||||
from django.contrib.sessions.backends.db import SessionStore
|
from typing import Any, Optional, Type
|
||||||
from typing import Type
|
|
||||||
|
|
||||||
class Session:
|
from django.contrib.sessions.backends.db import SessionStore
|
||||||
|
from django.contrib.sessions.base_session import (AbstractBaseSession,
|
||||||
|
BaseSessionManager)
|
||||||
|
|
||||||
|
|
||||||
|
class SessionManager(BaseSessionManager):
|
||||||
|
creation_counter: int
|
||||||
|
model: None
|
||||||
|
name: None
|
||||||
|
use_in_migrations: bool = ...
|
||||||
|
|
||||||
|
class Session(AbstractBaseSession):
|
||||||
|
expire_date: datetime.datetime
|
||||||
|
session_data: str
|
||||||
|
session_key: str
|
||||||
|
objects: Any = ...
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_session_store_class(cls) -> Type[SessionStore]: ...
|
def get_session_store_class(cls) -> Type[SessionStore]: ...
|
||||||
|
class Meta(AbstractBaseSession.Meta):
|
||||||
|
db_table: str = ...
|
||||||
|
|||||||
@@ -1,16 +1,12 @@
|
|||||||
# Stubs for django.contrib.sessions.serializers (Python 3.6)
|
from datetime import datetime
|
||||||
#
|
from typing import Any, Dict, Optional, Union
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
||||||
|
|
||||||
from django.core.signing import JSONSerializer as BaseJSONSerializer
|
from django.core.signing import JSONSerializer as BaseJSONSerializer
|
||||||
from typing import Any
|
|
||||||
|
|
||||||
from datetime import datetime
|
|
||||||
from django.db.models.base import Model
|
from django.db.models.base import Model
|
||||||
from typing import Dict, Union
|
|
||||||
|
|
||||||
class PickleSerializer:
|
class PickleSerializer:
|
||||||
def dumps(self, obj: Dict[str, Union[str, datetime]]) -> bytes: ...
|
def dumps(self, obj: Dict[str, Union[Model, str, datetime]]) -> bytes: ...
|
||||||
def loads(self, data: bytes) -> Dict[str, Model]: ...
|
def loads(self, data: bytes) -> Dict[str, Union[Model, str, datetime]]: ...
|
||||||
|
|
||||||
JSONSerializer = BaseJSONSerializer
|
JSONSerializer = BaseJSONSerializer
|
||||||
|
|||||||
@@ -1,28 +1,21 @@
|
|||||||
# Stubs for django.contrib.sitemaps (Python 3.6)
|
|
||||||
#
|
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
||||||
|
|
||||||
from typing import Any, Optional
|
|
||||||
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
from typing import Any, Dict, List, Optional, Union
|
||||||
|
|
||||||
from django.contrib.sites.models import Site
|
from django.contrib.sites.models import Site
|
||||||
from django.contrib.sites.requests import RequestSite
|
from django.contrib.sites.requests import RequestSite
|
||||||
from django.core.paginator import Paginator
|
from django.core.paginator import Paginator
|
||||||
from django.db.models.base import Model
|
from django.db.models.base import Model
|
||||||
from django.db.models.query import QuerySet
|
from django.db.models.query import QuerySet
|
||||||
from typing import Any, Dict, List, Optional, Union
|
|
||||||
|
|
||||||
PING_URL: str
|
PING_URL: str
|
||||||
|
|
||||||
class SitemapNotFound(Exception): ...
|
class SitemapNotFound(Exception): ...
|
||||||
|
|
||||||
def ping_google(sitemap_url: None = ..., ping_url: str = ...) -> None: ...
|
def ping_google(sitemap_url: None = ..., ping_url: str = ...) -> None: ...
|
||||||
def _get_sitemap_full_url(sitemap_url: None): ...
|
|
||||||
|
|
||||||
class Sitemap:
|
class Sitemap:
|
||||||
limit: int = ...
|
limit: int = ...
|
||||||
protocol: Any = ...
|
protocol: Any = ...
|
||||||
def __get(self, name: Any, obj: Any, default: Optional[Any] = ...): ...
|
|
||||||
def items(self) -> List[Any]: ...
|
def items(self) -> List[Any]: ...
|
||||||
def location(self, obj: Model) -> str: ...
|
def location(self, obj: Model) -> str: ...
|
||||||
@property
|
@property
|
||||||
@@ -33,27 +26,23 @@ class Sitemap:
|
|||||||
site: Optional[Union[RequestSite, Site]] = ...,
|
site: Optional[Union[RequestSite, Site]] = ...,
|
||||||
protocol: Optional[str] = ...,
|
protocol: Optional[str] = ...,
|
||||||
) -> Union[
|
) -> Union[
|
||||||
List[Dict[str, object]], List[Dict[str, Union[Model, str, datetime, None]]]
|
List[Dict[str, Union[Model, str, datetime, None]]], List[Dict[str, Any]]
|
||||||
]: ...
|
]: ...
|
||||||
latest_lastmod: Any = ...
|
|
||||||
def _urls(
|
|
||||||
self, page: Union[str, int], protocol: str, domain: str
|
|
||||||
) -> Union[List[Dict[str, object]], List[Dict[str, Union[Model, str, None]]]]: ...
|
|
||||||
|
|
||||||
class GenericSitemap(Sitemap):
|
class GenericSitemap(Sitemap):
|
||||||
priority: Any = ...
|
priority: None = ...
|
||||||
changefreq: Any = ...
|
changefreq: None = ...
|
||||||
queryset: Any = ...
|
queryset: django.db.models.query.QuerySet = ...
|
||||||
date_field: Any = ...
|
date_field: None = ...
|
||||||
protocol: Any = ...
|
protocol: None = ...
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
info_dict: Dict[str, Union[QuerySet, datetime]],
|
info_dict: Dict[str, Union[QuerySet, datetime, str]],
|
||||||
priority: Optional[float] = ...,
|
priority: Optional[float] = ...,
|
||||||
changefreq: Optional[str] = ...,
|
changefreq: Optional[str] = ...,
|
||||||
protocol: Optional[str] = ...,
|
protocol: Optional[str] = ...,
|
||||||
) -> None: ...
|
) -> None: ...
|
||||||
def items(self): ...
|
def items(self) -> QuerySet: ...
|
||||||
def lastmod(self, item: Model) -> None: ...
|
def lastmod(self, item: Model) -> Optional[datetime]: ...
|
||||||
|
|
||||||
default_app_config: str
|
default_app_config: str
|
||||||
|
|||||||
@@ -1,2 +1,12 @@
|
|||||||
class Command:
|
from typing import Any, Optional
|
||||||
def handle(self, *args, **options) -> None: ...
|
|
||||||
|
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,26 +1,24 @@
|
|||||||
# Stubs for django.contrib.sitemaps.views (Python 3.6)
|
from collections import OrderedDict
|
||||||
#
|
from typing import Any, Callable, Dict, Optional, Type, Union
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
||||||
|
|
||||||
from typing import Any, Optional
|
|
||||||
|
|
||||||
from django.contrib.flatpages.sitemaps import FlatPageSitemap
|
|
||||||
from django.contrib.sitemaps import GenericSitemap, Sitemap
|
from django.contrib.sitemaps import GenericSitemap, Sitemap
|
||||||
from django.core.handlers.wsgi import WSGIRequest
|
from django.core.handlers.wsgi import WSGIRequest
|
||||||
from django.template.response import TemplateResponse
|
from django.template.response import TemplateResponse
|
||||||
from typing import Callable, Dict, Optional, Type, Union
|
|
||||||
|
|
||||||
def x_robots_tag(func: Callable) -> Callable: ...
|
def x_robots_tag(func: Callable) -> Callable: ...
|
||||||
def index(
|
def index(
|
||||||
request: WSGIRequest,
|
request: WSGIRequest,
|
||||||
sitemaps: Dict[str, Type[Sitemap]],
|
sitemaps: Dict[str, Union[Type[Sitemap], Sitemap]],
|
||||||
template_name: str = ...,
|
template_name: str = ...,
|
||||||
content_type: str = ...,
|
content_type: str = ...,
|
||||||
sitemap_url_name: str = ...,
|
sitemap_url_name: str = ...,
|
||||||
) -> TemplateResponse: ...
|
) -> TemplateResponse: ...
|
||||||
def sitemap(
|
def sitemap(
|
||||||
request: WSGIRequest,
|
request: WSGIRequest,
|
||||||
sitemaps: Dict[str, Union[Type[Sitemap], Type[FlatPageSitemap], GenericSitemap]],
|
sitemaps: Union[
|
||||||
|
Dict[str, Type[Sitemap]], Dict[str, GenericSitemap], OrderedDict
|
||||||
|
],
|
||||||
section: Optional[str] = ...,
|
section: Optional[str] = ...,
|
||||||
template_name: str = ...,
|
template_name: str = ...,
|
||||||
content_type: str = ...,
|
content_type: str = ...,
|
||||||
|
|||||||
@@ -1,12 +1,17 @@
|
|||||||
# Stubs for django.contrib.sites.apps (Python 3.6)
|
from typing import Any, Optional
|
||||||
#
|
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
from django.apps import AppConfig
|
||||||
|
|
||||||
from .management import create_default_site
|
from .management import create_default_site
|
||||||
from django.apps import AppConfig
|
|
||||||
from typing import Any
|
|
||||||
|
|
||||||
class SitesConfig(AppConfig):
|
class SitesConfig(AppConfig):
|
||||||
|
apps: None
|
||||||
|
label: str
|
||||||
|
models: None
|
||||||
|
models_module: None
|
||||||
|
module: Any
|
||||||
|
path: str
|
||||||
name: str = ...
|
name: str = ...
|
||||||
verbose_name: Any = ...
|
verbose_name: Any = ...
|
||||||
def ready(self) -> None: ...
|
def ready(self) -> None: ...
|
||||||
|
|||||||
@@ -1,17 +1,14 @@
|
|||||||
# Stubs for django.contrib.sites.management (Python 3.6)
|
from typing import Any, Optional
|
||||||
#
|
|
||||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
||||||
|
|
||||||
from typing import Any
|
|
||||||
|
|
||||||
from django.apps.registry import Apps
|
from django.apps.registry import Apps
|
||||||
from django.contrib.sites.apps import SitesConfig
|
from django.contrib.sites.apps import SitesConfig
|
||||||
|
|
||||||
|
|
||||||
def create_default_site(
|
def create_default_site(
|
||||||
app_config: SitesConfig,
|
app_config: SitesConfig,
|
||||||
verbosity: int = ...,
|
verbosity: int = ...,
|
||||||
interactive: bool = ...,
|
interactive: bool = ...,
|
||||||
using: str = ...,
|
using: str = ...,
|
||||||
apps: Apps = ...,
|
apps: Apps = ...,
|
||||||
**kwargs: Any,
|
**kwargs: Any
|
||||||
) -> None: ...
|
) -> None: ...
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user