merge with stubgen output

This commit is contained in:
Maxim Kurnikov
2018-07-29 23:25:20 +03:00
parent 496a6274e7
commit 4866354600
294 changed files with 10234 additions and 10842 deletions

View File

@@ -1 +1,10 @@
# Stubs for django (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
VERSION: Any
__version__: Any
def setup(set_prefix: bool = ...) -> None: ...

View File

@@ -1,21 +1,28 @@
from django.db.models.base import Model
from typing import (
Any,
Iterator,
Type,
)
# Stubs for django.apps.config (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
from django.db.models.base import Model
from typing import Any, Iterator, Type
MODELS_MODULE_NAME: str
class AppConfig:
name: Any = ...
module: Any = ...
apps: Any = ...
label: Any = ...
verbose_name: Any = ...
path: Any = ...
models_module: Any = ...
models: Any = ...
def __init__(self, app_name: str, app_module: Any) -> None: ...
def __repr__(self): ...
def _path_from_module(self, module: Any) -> str: ...
@classmethod
def create(cls, entry: str) -> AppConfig: ...
def get_model(self, model_name: str, require_ready: bool = ...) -> Type[Model]: ...
def get_models(
self,
include_auto_created: bool = ...,
include_swapped: bool = ...
) -> Iterator[Type[Model]]: ...
def get_models(self, include_auto_created: bool = ..., include_swapped: bool = ...) -> Iterator[Type[Model]]: ...
def import_models(self) -> None: ...
def ready(self) -> None: ...

View File

@@ -1,29 +1,43 @@
# Stubs for django.apps.registry (Python 3.6)
#
# 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.db.migrations.state import AppConfigStub
from django.db.models.base import Model
from typing import (
List,
Optional,
Tuple,
Type,
Union,
)
from typing import List, Optional, Tuple, Type, Union
class Apps:
def __init__(
self,
installed_apps: Union[Tuple, List[str], List[AppConfigStub]] = ...
) -> None: ...
all_models: Any = ...
app_configs: Any = ...
stored_app_configs: Any = ...
apps_ready: bool = ...
_lock: Any = ...
loading: bool = ...
_pending_operations: Any = ...
def __init__(self, installed_apps: Union[Tuple, List[str], List[AppConfigStub]] = ...) -> None: ...
models_ready: bool = ...
ready: bool = ...
def populate(self, installed_apps: Optional[Any] = ...): ...
def check_apps_ready(self) -> None: ...
def check_models_ready(self) -> None: ...
def clear_cache(self) -> None: ...
def do_pending_operations(self, model: Type[Model]) -> None: ...
def get_app_configs(self): ...
def get_app_config(self, app_label: str) -> AppConfig: ...
def get_models(self, include_auto_created: bool = ..., include_swapped: bool = ...): ...
def get_model(self, app_label: str, model_name: None = ..., require_ready: bool = ...) -> Type[Model]: ...
def register_model(self, app_label: Any, model: Any) -> None: ...
def is_installed(self, app_name: Any): ...
def get_containing_app_config(self, object_name: str) -> Optional[AppConfig]: ...
def get_model(
self,
app_label: str,
model_name: None = ...,
require_ready: bool = ...
) -> Type[Model]: ...
def get_registered_model(self, app_label: Any, model_name: Any): ...
def get_swappable_settings_name(self, to_string: Any): ...
def set_available_apps(self, available: Any) -> None: ...
def unset_available_apps(self) -> None: ...
def set_installed_apps(self, installed: Any) -> None: ...
def unset_installed_apps(self) -> None: ...
def clear_cache(self) -> None: ...
def lazy_model_operation(self, function: Any, *model_keys: Any) -> None: ...
def do_pending_operations(self, model: Type[Model]) -> None: ...
apps: Any

View File

@@ -1,30 +1,40 @@
from typing import (
Any,
List,
)
# Stubs for django.conf (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from django.utils.functional import LazyObject
from typing import Any, Optional
class LazySettings:
def __delattr__(self, name: str) -> None: ...
from typing import Any, List
ENVIRONMENT_VARIABLE: str
class LazySettings(LazyObject):
_wrapped: Any = ...
def _setup(self, name: None = ...) -> None: ...
def __repr__(self): ...
def __getattr__(self, name: str) -> Any: ...
def __setattr__(self, name: str, value: object) -> None: ...
def _setup(self, name: None = ...): ...
def configure(self, default_settings: Any = ..., **options): ...
def __delattr__(self, name: str) -> None: ...
def configure(self, default_settings: Any = ..., **options: Any) -> None: ...
@property
def configured(self) -> bool: ...
class Settings:
def __init__(self, settings_module: str): ...
SETTINGS_MODULE: Any = ...
_explicit_settings: Any = ...
def __init__(self, settings_module: str) -> None: ...
def is_overridden(self, setting: str) -> bool: ...
def __repr__(self): ...
class UserSettingsHolder:
SETTINGS_MODULE: Any = ...
default_settings: Any = ...
def __init__(self, default_settings: Any) -> None: ...
def __getattr__(self, name: str) -> Any: ...
def __setattr__(self, name: str, value: Any) -> None: ...
def __delattr__(self, name: str) -> None: ...
def __dir__(self) -> List[str]: ...
def __getattr__(self, name: str) -> Any: ...
def __init__(self, default_settings: Any) -> None: ...
def __setattr__(self, name: str, value: Any) -> None: ...
def is_overridden(self, setting: Any): ...
def __repr__(self): ...
settings = LazySettings()
settings: Any

View File

@@ -1,17 +1,15 @@
from django.urls.resolvers import (
URLPattern,
URLResolver,
)
from typing import (
Any,
Optional,
Union,
)
# Stubs for django.conf.urls (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from django.urls import include as include
from typing import Any, Optional
def url(
regex: str,
view: Any,
kwargs: Any = ...,
name: Optional[str] = ...
) -> Union[URLPattern, URLResolver]: ...
from django.urls.resolvers import URLPattern, URLResolver
from typing import Any, Optional, Union
handler400: Any
handler403: Any
handler404: Any
handler500: Any
def url(regex: str, view: Any, kwargs: Any = ..., name: Optional[str] = ...) -> Union[URLPattern, URLResolver]: ...

View File

@@ -1,16 +1,12 @@
# Stubs for django.conf.urls.i18n (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
from django.urls.resolvers import URLResolver
from typing import (
Any,
List,
Tuple,
Union,
)
def i18n_patterns(
*urls,
prefix_default_language = ...
) -> Union[List[URLResolver], List[List[Any]]]: ...
from typing import Any, List, Tuple, Union
def i18n_patterns(*urls: Any, prefix_default_language: bool = ...) -> Union[List[URLResolver], List[List[Any]]]: ...
def is_language_prefix_patterns_used(urlconf: str) -> Tuple[bool, bool]: ...
urlpatterns: Any

View File

@@ -1,8 +1,9 @@
# Stubs for django.conf.urls.static (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
from django.urls.resolvers import URLPattern
from typing import (
Callable,
List,
)
def static(prefix: str, view: Callable = ..., **kwargs) -> List[URLPattern]: ...
from typing import Callable, List
def static(prefix: str, view: Callable = ..., **kwargs: Any) -> List[URLPattern]: ...

View File

@@ -1 +1,11 @@
# Stubs for django.contrib.admin (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from django.contrib.admin.decorators import register as register
from django.contrib.admin.filters import AllValuesFieldListFilter as AllValuesFieldListFilter, BooleanFieldListFilter as BooleanFieldListFilter, ChoicesFieldListFilter as ChoicesFieldListFilter, DateFieldListFilter as DateFieldListFilter, FieldListFilter as FieldListFilter, ListFilter as ListFilter, RelatedFieldListFilter as RelatedFieldListFilter, RelatedOnlyFieldListFilter as RelatedOnlyFieldListFilter, SimpleListFilter as SimpleListFilter
from django.contrib.admin.helpers import ACTION_CHECKBOX_NAME as ACTION_CHECKBOX_NAME
from django.contrib.admin.options import HORIZONTAL as HORIZONTAL, ModelAdmin as ModelAdmin, StackedInline as StackedInline, TabularInline as TabularInline, VERTICAL as VERTICAL
from django.contrib.admin.sites import AdminSite as AdminSite, site as site
def autodiscover() -> None: ...

View File

@@ -1,11 +1,11 @@
# Stubs for django.contrib.admin.actions (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
from django.contrib.admin.options import ModelAdmin
from django.core.handlers.wsgi import WSGIRequest
from django.db.models.query import QuerySet
from django.template.response import TemplateResponse
def delete_selected(
modeladmin: ModelAdmin,
request: WSGIRequest,
queryset: QuerySet
) -> TemplateResponse: ...
def delete_selected(modeladmin: ModelAdmin, request: WSGIRequest, queryset: QuerySet) -> TemplateResponse: ...

View File

@@ -1,6 +1,15 @@
class AdminConfig:
# Stubs for django.contrib.admin.apps (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from django.apps import AppConfig
from typing import Any
class SimpleAdminConfig(AppConfig):
default_site: str = ...
name: str = ...
verbose_name: Any = ...
def ready(self) -> None: ...
class SimpleAdminConfig:
class AdminConfig(SimpleAdminConfig):
def ready(self) -> None: ...

View File

@@ -1,174 +1,77 @@
from django.contrib.admin.options import (
InlineModelAdmin,
ModelAdmin,
TabularInline,
)
from django.contrib.auth.models import (
Group,
User,
)
# Stubs for django.contrib.admin.checks (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
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.db.models.base import Model
from typing import (
Any,
List,
Tuple,
Type,
Union,
)
from typing import Any, List, Tuple, Type, Union
def check_admin_app(app_configs: Any, **kwargs: Any): ...
def check_dependencies(**kwargs: Any): ...
class BaseModelAdminChecks:
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_exclude(
self,
obj: Union[ModelAdmin, InlineModelAdmin]
) -> 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_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_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_filter_vertical(
self,
obj: Union[ModelAdmin, InlineModelAdmin]
) -> List[Any]: ...
def _check_form(
self,
obj: Union[ModelAdmin, InlineModelAdmin]
) -> 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_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_radio_fields(
self,
obj: Union[ModelAdmin, InlineModelAdmin]
) -> 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_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]: ...
def _check_view_on_site_url(
self,
obj: Union[ModelAdmin, InlineModelAdmin]
) -> List[Any]: ...
def check(
self,
admin_obj: Union[ModelAdmin, InlineModelAdmin],
**kwargs
) -> List[Error]: ...
def check(self, admin_obj: Union[ModelAdmin, InlineModelAdmin], **kwargs: Any) -> 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):
def check(self, admin_obj: Any, **kwargs: Any): ...
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:
def _check_exclude_of_parent_model(
self,
obj: InlineModelAdmin,
parent_model: Type[Model]
) -> List[Any]: ...
class InlineModelAdminChecks(BaseModelAdminChecks):
def check(self, inline_obj: Any, **kwargs: Any): ...
def _check_exclude_of_parent_model(self, obj: InlineModelAdmin, parent_model: Type[Model]) -> List[Any]: ...
def _check_relation(self, obj: InlineModelAdmin, parent_model: Type[Model]) -> List[Any]: ...
def _check_extra(self, obj: InlineModelAdmin) -> List[Any]: ...
def _check_formset(self, obj: InlineModelAdmin) -> List[Any]: ...
def _check_has_add_permission(self, obj: InlineModelAdmin) -> None: ...
def _check_max_num(self, obj: InlineModelAdmin) -> List[Any]: ...
def _check_min_num(self, obj: InlineModelAdmin) -> List[Any]: ...
def _check_relation(
self,
obj: InlineModelAdmin,
parent_model: Type[Model]
) -> 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_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): ...

View File

@@ -1,4 +1,8 @@
# Stubs for django.contrib.admin.decorators (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any, Optional
from typing import Callable
def register(*models, site = ...) -> Callable: ...
def register(*models: Any, site: Optional[Any] = ...) -> Callable: ...

View File

@@ -1,163 +1,107 @@
# Stubs for django.contrib.admin.filters (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
from django.contrib.admin.options import ModelAdmin
from django.core.handlers.wsgi import WSGIRequest
from django.db.models.base import Model
from django.db.models.fields import (
BooleanField,
DateField,
Field,
)
from django.db.models.fields.related import (
ForeignKey,
ManyToManyField,
)
from django.db.models.fields import BooleanField, DateField, Field
from django.db.models.fields.related import ForeignKey, ManyToManyField
from django.db.models.fields.reverse_related import ForeignObjectRel
from django.db.models.query import QuerySet
from typing import (
Callable,
Dict,
List,
Optional,
Tuple,
Type,
Union,
)
class AllValuesFieldListFilter:
def __init__(
self,
field: Field,
request: WSGIRequest,
params: Dict[str, str],
model: Type[Model],
model_admin: ModelAdmin,
field_path: str
) -> None: ...
def expected_parameters(self) -> List[str]: ...
class BooleanFieldListFilter:
def __init__(
self,
field: BooleanField,
request: WSGIRequest,
params: Dict[str, str],
model: Type[Model],
model_admin: ModelAdmin,
field_path: str
) -> None: ...
def expected_parameters(self) -> List[str]: ...
class ChoicesFieldListFilter:
def __init__(
self,
field: Field,
request: WSGIRequest,
params: Dict[str, str],
model: Type[Model],
model_admin: ModelAdmin,
field_path: str
) -> None: ...
def expected_parameters(self) -> List[str]: ...
class DateFieldListFilter:
def __init__(
self,
field: DateField,
request: WSGIRequest,
params: Dict[str, str],
model: Type[Model],
model_admin: ModelAdmin,
field_path: str
) -> None: ...
def expected_parameters(self) -> List[str]: ...
class FieldListFilter:
def __init__(
self,
field: Union[ForeignObjectRel, Field],
request: WSGIRequest,
params: Dict[str, str],
model: Type[Model],
model_admin: ModelAdmin,
field_path: str
) -> None: ...
@classmethod
def create(
cls,
field: Union[ForeignObjectRel, Field],
request: WSGIRequest,
params: Dict[str, str],
model: Type[Model],
model_admin: ModelAdmin,
field_path: str
) -> FieldListFilter: ...
def has_output(self) -> bool: ...
def queryset(
self,
request: WSGIRequest,
queryset: QuerySet
) -> QuerySet: ...
@classmethod
def register(
cls,
test: Callable,
list_filter_class: Type[FieldListFilter],
take_priority: bool = ...
) -> None: ...
from typing import Callable, Dict, List, Optional, Tuple, Type, Union
class ListFilter:
def __init__(
self,
request: WSGIRequest,
params: Dict[str, str],
model: Type[Model],
model_admin: ModelAdmin
) -> None: ...
title: Any = ...
template: str = ...
used_parameters: Any = ...
def __init__(self, request: WSGIRequest, params: Dict[str, str], model: Type[Model], model_admin: ModelAdmin) -> None: ...
def has_output(self) -> None: ...
def choices(self, changelist: Any) -> None: ...
def queryset(self, request: Any, queryset: Any) -> None: ...
def expected_parameters(self) -> None: ...
class RelatedFieldListFilter:
def __init__(
self,
field: Union[ForeignObjectRel, ManyToManyField, ForeignKey],
request: WSGIRequest,
params: Dict[str, str],
model: Type[Model],
model_admin: ModelAdmin,
field_path: str
) -> None: ...
def expected_parameters(self) -> List[str]: ...
def field_choices(
self,
field: Union[ForeignObjectRel, ManyToManyField, ForeignKey],
request: WSGIRequest,
model_admin: ModelAdmin
) -> Union[List[Tuple[str, str]], List[Tuple[int, str]]]: ...
def has_output(self) -> bool: ...
@property
def include_empty_choice(self) -> bool: ...
class RelatedOnlyFieldListFilter:
def field_choices(
self,
field: Union[ManyToManyField, ForeignKey],
request: WSGIRequest,
model_admin: ModelAdmin
) -> Union[List[Tuple[str, str]], List[Tuple[int, str]]]: ...
class SimpleListFilter:
def __init__(
self,
request: WSGIRequest,
params: Dict[str, str],
model: Type[Model],
model_admin: ModelAdmin
) -> None: ...
class SimpleListFilter(ListFilter):
parameter_name: Any = ...
lookup_choices: Any = ...
def __init__(self, request: WSGIRequest, params: Dict[str, str], model: Type[Model], model_admin: ModelAdmin) -> None: ...
def has_output(self) -> bool: ...
def value(self) -> Optional[str]: ...
def lookups(self, request: Any, model_admin: Any) -> None: ...
def expected_parameters(self): ...
def choices(self, changelist: Any) -> None: ...
class FieldListFilter(ListFilter):
_field_list_filters: Any = ...
_take_priority_index: int = ...
field: Any = ...
field_path: Any = ...
title: Any = ...
def __init__(self, field: Union[ForeignObjectRel, Field], request: WSGIRequest, params: Dict[str, str], model: Type[Model], model_admin: ModelAdmin, field_path: str) -> None: ...
def has_output(self) -> bool: ...
def queryset(self, request: WSGIRequest, queryset: QuerySet) -> QuerySet: ...
@classmethod
def register(cls, test: Callable, list_filter_class: Type[FieldListFilter], take_priority: bool = ...) -> None: ...
@classmethod
def create(cls, field: Union[ForeignObjectRel, Field], request: WSGIRequest, params: Dict[str, str], model: Type[Model], model_admin: ModelAdmin, field_path: str) -> FieldListFilter: ...
class RelatedFieldListFilter(FieldListFilter):
lookup_kwarg: Any = ...
lookup_kwarg_isnull: Any = ...
lookup_val: Any = ...
lookup_val_isnull: Any = ...
lookup_choices: Any = ...
lookup_title: Any = ...
title: Any = ...
empty_value_display: Any = ...
def __init__(self, field: Union[ForeignObjectRel, ManyToManyField, ForeignKey], request: WSGIRequest, params: Dict[str, str], model: Type[Model], model_admin: ModelAdmin, field_path: str) -> None: ...
@property
def include_empty_choice(self) -> bool: ...
def has_output(self) -> bool: ...
def expected_parameters(self) -> List[str]: ...
def field_choices(self, field: Union[ForeignObjectRel, ManyToManyField, ForeignKey], request: WSGIRequest, model_admin: ModelAdmin) -> Union[List[Tuple[str, str]], List[Tuple[int, str]]]: ...
def choices(self, changelist: Any) -> None: ...
class BooleanFieldListFilter(FieldListFilter):
lookup_kwarg: Any = ...
lookup_kwarg2: Any = ...
lookup_val: Any = ...
lookup_val2: Any = ...
def __init__(self, field: BooleanField, request: WSGIRequest, params: Dict[str, str], model: Type[Model], model_admin: ModelAdmin, field_path: str) -> None: ...
def expected_parameters(self) -> List[str]: ...
def choices(self, changelist: Any) -> None: ...
class ChoicesFieldListFilter(FieldListFilter):
lookup_kwarg: Any = ...
lookup_kwarg_isnull: Any = ...
lookup_val: Any = ...
lookup_val_isnull: Any = ...
def __init__(self, field: Field, request: WSGIRequest, params: Dict[str, str], model: Type[Model], model_admin: ModelAdmin, field_path: str) -> None: ...
def expected_parameters(self) -> List[str]: ...
def choices(self, changelist: Any) -> None: ...
class DateFieldListFilter(FieldListFilter):
field_generic: Any = ...
date_params: Any = ...
lookup_kwarg_since: Any = ...
lookup_kwarg_until: Any = ...
links: Any = ...
lookup_kwarg_isnull: Any = ...
def __init__(self, field: DateField, request: WSGIRequest, params: Dict[str, str], model: Type[Model], model_admin: ModelAdmin, field_path: str) -> None: ...
def expected_parameters(self) -> List[str]: ...
def choices(self, changelist: Any) -> None: ...
class AllValuesFieldListFilter(FieldListFilter):
lookup_kwarg: Any = ...
lookup_kwarg_isnull: Any = ...
lookup_val: Any = ...
lookup_val_isnull: Any = ...
empty_value_display: Any = ...
lookup_choices: Any = ...
def __init__(self, field: Field, request: WSGIRequest, params: Dict[str, str], model: Type[Model], model_admin: ModelAdmin, field_path: str) -> None: ...
def expected_parameters(self) -> List[str]: ...
def choices(self, changelist: Any) -> None: ...
class RelatedOnlyFieldListFilter(RelatedFieldListFilter):
def field_choices(self, field: Union[ManyToManyField, ForeignKey], request: WSGIRequest, model_admin: ModelAdmin) -> Union[List[Tuple[str, str]], List[Tuple[int, str]]]: ...

View File

@@ -1,75 +1,120 @@
# Stubs for django.contrib.admin.helpers (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from django import forms
from typing import Any, Optional
from django.contrib.auth.forms import AdminPasswordChangeForm
from django.db.models.fields import AutoField
from django.forms.utils import ErrorDict
from django.forms.widgets import Media
from django.utils.safestring import SafeText
from typing import (
Any,
Callable,
Dict,
Iterator,
List,
Tuple,
Union,
)
from typing import Any, Callable, Dict, Iterator, List, Tuple, Union
ACTION_CHECKBOX_NAME: str
class ActionForm(forms.Form):
action: Any = ...
select_across: Any = ...
class AdminField:
def errors(self) -> SafeText: ...
def label_tag(self) -> SafeText: ...
checkbox: Any
class AdminForm:
def __init__(
self,
form: AdminPasswordChangeForm,
fieldsets: List[Tuple[None, Dict[str, List[str]]]],
prepopulated_fields: Dict[Any, Any],
readonly_fields: None = ...,
model_admin: None = ...
) -> None: ...
prepopulated_fields: Any = ...
model_admin: Any = ...
readonly_fields: Any = ...
def __init__(self, form: AdminPasswordChangeForm, fieldsets: List[Tuple[None, Dict[str, List[str]]]], prepopulated_fields: Dict[Any, Any], readonly_fields: None = ..., model_admin: None = ...) -> None: ...
def __iter__(self) -> Iterator[Fieldset]: ...
@property
def errors(self) -> ErrorDict: ...
@property
def media(self) -> Media: ...
@property
def non_field_errors(self) -> Callable: ...
class AdminReadonlyField:
def contents(self) -> SafeText: ...
def label_tag(self) -> SafeText: ...
class Fieldline:
def __iter__(
self
) -> Iterator[Union[AdminField, AdminReadonlyField]]: ...
def errors(self) -> SafeText: ...
@property
def media(self) -> Media: ...
class Fieldset:
def __iter__(self) -> Iterator[Fieldline]: ...
form: Any = ...
classes: Any = ...
description: Any = ...
model_admin: Any = ...
readonly_fields: Any = ...
def __init__(self, form: Any, name: Optional[Any] = ..., readonly_fields: Any = ..., fields: Any = ..., classes: Any = ..., description: Optional[Any] = ..., model_admin: Optional[Any] = ...) -> None: ...
@property
def media(self) -> Media: ...
def __iter__(self) -> Iterator[Fieldline]: ...
class Fieldline:
form: Any = ...
fields: Any = ...
has_visible_field: Any = ...
model_admin: Any = ...
readonly_fields: Any = ...
def __init__(self, form: Any, field: Any, readonly_fields: Optional[Any] = ..., model_admin: Optional[Any] = ...) -> None: ...
def __iter__(self) -> Iterator[Union[AdminField, AdminReadonlyField]]: ...
def errors(self) -> SafeText: ...
class InlineAdminForm:
def __iter__(self) -> Iterator[InlineFieldset]: ...
def deletion_field(self) -> AdminField: ...
def fk_field(self) -> AdminField: ...
def needs_explicit_pk_field(self) -> Union[bool, AutoField]: ...
def pk_field(self) -> AdminField: ...
class AdminField:
field: Any = ...
is_first: Any = ...
is_checkbox: Any = ...
is_readonly: bool = ...
def __init__(self, form: Any, field: Any, is_first: Any) -> None: ...
def label_tag(self) -> SafeText: ...
def errors(self) -> SafeText: ...
class AdminReadonlyField:
field: Any = ...
form: Any = ...
model_admin: Any = ...
is_first: Any = ...
is_checkbox: bool = ...
is_readonly: bool = ...
empty_value_display: Any = ...
def __init__(self, form: Any, field: Any, is_first: Any, model_admin: Optional[Any] = ...) -> None: ...
def label_tag(self) -> SafeText: ...
def contents(self) -> SafeText: ...
class InlineAdminFormSet:
opts: Any = ...
formset: Any = ...
fieldsets: Any = ...
model_admin: Any = ...
readonly_fields: Any = ...
prepopulated_fields: Any = ...
classes: Any = ...
has_add_permission: Any = ...
has_change_permission: Any = ...
has_delete_permission: Any = ...
has_view_permission: Any = ...
def __init__(self, inline: Any, formset: Any, fieldsets: Any, prepopulated_fields: Optional[Any] = ..., readonly_fields: Optional[Any] = ..., model_admin: Optional[Any] = ..., has_add_permission: bool = ..., has_change_permission: bool = ..., has_delete_permission: bool = ..., has_view_permission: bool = ...) -> None: ...
def __iter__(self) -> Iterator[InlineAdminForm]: ...
def fields(self) -> Iterator[Dict[str, Any]]: ...
def inline_formset_data(self) -> str: ...
@property
def forms(self): ...
@property
def non_form_errors(self): ...
@property
def media(self) -> Media: ...
class InlineAdminForm(AdminForm):
formset: Any = ...
model_admin: Any = ...
original: Any = ...
show_url: Any = ...
absolute_url: Any = ...
def __init__(self, formset: Any, form: Any, fieldsets: Any, prepopulated_fields: Any, original: Any, readonly_fields: Optional[Any] = ..., model_admin: Optional[Any] = ..., view_on_site_url: Optional[Any] = ...) -> None: ...
def __iter__(self) -> Iterator[InlineFieldset]: ...
def needs_explicit_pk_field(self) -> Union[bool, AutoField]: ...
def pk_field(self) -> AdminField: ...
def fk_field(self) -> AdminField: ...
def deletion_field(self) -> AdminField: ...
def ordering_field(self): ...
class InlineFieldset:
class InlineFieldset(Fieldset):
formset: Any = ...
def __init__(self, formset: Any, *args: Any, **kwargs: Any) -> None: ...
def __iter__(self) -> Iterator[Fieldline]: ...
class AdminErrorList(forms.utils.ErrorList):
def __init__(self, form: Any, inline_formsets: Any) -> None: ...

View File

@@ -1,98 +1,210 @@
# Stubs for django.contrib.admin.options (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any, Optional
from django.core.checks.messages import Error
from django.core.handlers.wsgi import WSGIRequest
from django.db.models.base import Model
from django.db.models.fields import Field
from django.db.models.fields.related import (
ForeignKey,
ManyToManyField,
)
from django.db.models.fields.related import ForeignKey, ManyToManyField
from django.db.models.query import QuerySet
from django.forms.fields import (
Field,
TypedChoiceField,
)
from django.forms.models import (
ModelChoiceField,
ModelMultipleChoiceField,
)
from django.forms.fields import Field, TypedChoiceField
from django.forms.models import ModelChoiceField, ModelMultipleChoiceField
from django.utils.safestring import SafeText
from typing import (
Any,
Callable,
Dict,
List,
Optional,
Tuple,
Union,
)
from typing import Any, Callable, Dict, List, Optional, Tuple, Union
IS_POPUP_VAR: str
TO_FIELD_VAR: str
HORIZONTAL: Any
VERTICAL: Any
def get_content_type_for_model(obj: Any): ...
def get_ul_class(radio_style: Any): ...
class IncorrectLookupParameters(Exception): ...
FORMFIELD_FOR_DBFIELD_DEFAULTS: Any
csrf_protect_m: Any
class BaseModelAdmin:
autocomplete_fields: Any = ...
raw_id_fields: Any = ...
fields: Any = ...
exclude: Any = ...
fieldsets: Any = ...
form: Any = ...
filter_vertical: Any = ...
filter_horizontal: Any = ...
radio_fields: Any = ...
prepopulated_fields: Any = ...
formfield_overrides: Any = ...
readonly_fields: Any = ...
ordering: Any = ...
sortable_by: Any = ...
view_on_site: bool = ...
show_full_result_count: bool = ...
checks_class: Any = ...
def check(self, **kwargs: Any) -> List[Error]: ...
def __init__(self) -> None: ...
def check(self, **kwargs) -> List[Error]: ...
def formfield_for_choice_field(
self,
db_field: Field,
request: object,
**kwargs
) -> TypedChoiceField: ...
def formfield_for_dbfield(
self,
db_field: Field,
request: object,
**kwargs
) -> Optional[Field]: ...
def formfield_for_foreignkey(
self,
db_field: ForeignKey,
request: object,
**kwargs
) -> Optional[ModelChoiceField]: ...
def formfield_for_manytomany(
self,
db_field: ManyToManyField,
request: WSGIRequest,
**kwargs
) -> ModelMultipleChoiceField: ...
def formfield_for_dbfield(self, db_field: Field, request: object, **kwargs: Any) -> Optional[Field]: ...
def formfield_for_choice_field(self, db_field: Field, request: object, **kwargs: Any) -> TypedChoiceField: ...
def get_field_queryset(self, db: None, db_field: Union[ManyToManyField, ForeignKey], request: object) -> Optional[QuerySet]: ...
def formfield_for_foreignkey(self, db_field: ForeignKey, request: object, **kwargs: Any) -> Optional[ModelChoiceField]: ...
def formfield_for_manytomany(self, db_field: ManyToManyField, request: WSGIRequest, **kwargs: Any) -> ModelMultipleChoiceField: ...
def get_autocomplete_fields(self, request: object) -> Tuple: ...
def get_view_on_site_url(self, obj: Optional[Model] = ...) -> Optional[str]: ...
def get_empty_value_display(self) -> SafeText: ...
def get_exclude(self, request: object, obj: Optional[Model] = ...) -> None: ...
def get_field_queryset(
self,
db: None,
db_field: Union[ManyToManyField, ForeignKey],
request: object
) -> Optional[QuerySet]: ...
def get_fields(
self,
request: object,
obj: Optional[Model] = ...
) -> Union[List[str], List[Union[str, Callable]]]: ...
def get_fieldsets(
self,
request: WSGIRequest,
obj: Optional[Model] = ...
) -> Any: ...
def get_fields(self, request: object, obj: Optional[Model] = ...) -> Union[List[str], List[Union[str, Callable]]]: ...
def get_fieldsets(self, request: WSGIRequest, obj: Optional[Model] = ...) -> Any: ...
def get_ordering(self, request: WSGIRequest) -> Union[List[str], Tuple]: ...
def get_prepopulated_fields(
self,
request: WSGIRequest,
obj: Optional[Model] = ...
) -> Dict[str, Tuple[str]]: ...
def get_readonly_fields(self, request: object, obj: Optional[Model] = ...) -> Union[List[str], Tuple]: ...
def get_prepopulated_fields(self, request: WSGIRequest, obj: Optional[Model] = ...) -> Dict[str, Tuple[str]]: ...
def get_queryset(self, request: object) -> QuerySet: ...
def get_readonly_fields(
self,
request: object,
obj: Optional[Model] = ...
) -> Union[List[str], Tuple]: ...
def get_sortable_by(self, request: WSGIRequest) -> Union[List[str], Tuple]: ...
def get_view_on_site_url(self, obj: Optional[Model] = ...) -> Optional[str]: ...
def lookup_allowed(self, lookup: Any, value: Any): ...
def to_field_allowed(self, request: Any, to_field: Any): ...
def has_add_permission(self, request: WSGIRequest) -> bool: ...
def has_change_permission(self, request: object, obj: Optional[Model] = ...) -> bool: ...
def has_delete_permission(self, request: object, obj: Optional[Model] = ...) -> bool: ...
def has_view_permission(self, request: WSGIRequest, obj: Optional[Model] = ...) -> bool: ...
def has_module_permission(self, request: object) -> bool: ...
def has_view_permission(
self,
request: WSGIRequest,
obj: Optional[Model] = ...
) -> bool: ...
class ModelAdmin(BaseModelAdmin):
list_display: Any = ...
list_display_links: Any = ...
list_filter: Any = ...
list_select_related: bool = ...
list_per_page: int = ...
list_max_show_all: int = ...
list_editable: Any = ...
search_fields: Any = ...
date_hierarchy: Any = ...
save_as: bool = ...
save_as_continue: bool = ...
save_on_top: bool = ...
paginator: Any = ...
preserve_filters: bool = ...
inlines: Any = ...
add_form_template: Any = ...
change_form_template: Any = ...
change_list_template: Any = ...
delete_confirmation_template: Any = ...
delete_selected_confirmation_template: Any = ...
object_history_template: Any = ...
popup_response_template: Any = ...
actions: Any = ...
action_form: Any = ...
actions_on_top: bool = ...
actions_on_bottom: bool = ...
actions_selection_counter: bool = ...
checks_class: Any = ...
model: Any = ...
opts: Any = ...
admin_site: Any = ...
def __init__(self, model: Any, admin_site: Any) -> None: ...
def __str__(self): ...
def get_inline_instances(self, request: Any, obj: Optional[Any] = ...): ...
def get_urls(self): ...
@property
def urls(self): ...
@property
def media(self): ...
def get_model_perms(self, request: Any): ...
def _get_form_for_get_fields(self, request: Any, obj: Any): ...
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, request: Any, queryset: Any, per_page: Any, orphans: int = ..., allow_empty_first_page: bool = ...): ...
def log_addition(self, request: Any, object: Any, message: Any): ...
def log_change(self, request: Any, object: Any, message: Any): ...
def log_deletion(self, request: Any, object: Any, object_repr: Any): ...
def action_checkbox(self, obj: Any): ...
def _get_base_actions(self): ...
def _filter_actions_by_permissions(self, request: Any, actions: Any): ...
def get_actions(self, request: Any): ...
def get_action_choices(self, request: Any, default_choices: Any = ...): ...
def get_action(self, action: Any): ...
def get_list_display(self, request: Any): ...
def get_list_display_links(self, request: Any, list_display: Any): ...
def get_list_filter(self, request: Any): ...
def get_list_select_related(self, request: Any): ...
def get_search_fields(self, request: Any): ...
def get_search_results(self, request: Any, queryset: Any, search_term: Any): ...
def get_preserved_filters(self, request: Any): ...
def construct_change_message(self, request: Any, form: Any, formsets: Any, add: bool = ...): ...
def message_user(self, request: Any, message: Any, level: Any = ..., extra_tags: str = ..., fail_silently: bool = ...) -> None: ...
def save_form(self, request: Any, form: Any, change: Any): ...
def save_model(self, request: Any, obj: Any, form: Any, change: Any) -> None: ...
def delete_model(self, request: Any, obj: 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_related(self, request: Any, form: Any, formsets: Any, change: Any) -> None: ...
def render_change_form(self, request: Any, context: Any, add: bool = ..., change: bool = ..., form_url: str = ..., obj: Optional[Any] = ...): ...
def response_add(self, request: Any, obj: Any, post_url_continue: Optional[Any] = ...): ...
def response_change(self, request: Any, obj: Any): ...
def response_post_save_add(self, request: Any, obj: Any): ...
def response_post_save_change(self, request: Any, obj: Any): ...
def response_action(self, request: Any, queryset: Any): ...
def response_delete(self, request: Any, obj_display: Any, obj_id: Any): ...
def render_delete_form(self, request: Any, context: Any): ...
def get_inline_formsets(self, request: Any, formsets: Any, inline_instances: Any, obj: Optional[Any] = ...): ...
def get_changeform_initial_data(self, request: Any): ...
def _get_obj_does_not_exist_redirect(self, request: Any, opts: Any, object_id: Any): ...
def changeform_view(self, request: Any, object_id: Optional[Any] = ..., form_url: str = ..., extra_context: Optional[Any] = ...): ...
def _changeform_view(self, request: Any, object_id: Any, form_url: Any, extra_context: Any): ...
def autocomplete_view(self, request: Any): ...
def add_view(self, request: Any, form_url: str = ..., extra_context: Optional[Any] = ...): ...
def change_view(self, request: Any, object_id: Any, form_url: str = ..., extra_context: Optional[Any] = ...): ...
def _get_edited_object_pks(self, request: Any, prefix: Any): ...
def _get_list_editable_queryset(self, request: Any, prefix: Any): ...
def changelist_view(self, request: Any, extra_context: Optional[Any] = ...): ...
def get_deleted_objects(self, objs: Any, request: Any): ...
def delete_view(self, request: Any, object_id: Any, extra_context: Optional[Any] = ...): ...
def _delete_view(self, request: Any, object_id: Any, extra_context: Any): ...
def history_view(self, request: Any, object_id: Any, extra_context: Optional[Any] = ...): ...
def _create_formsets(self, request: Any, obj: Any, change: Any): ...
class InlineModelAdmin(BaseModelAdmin):
model: Any = ...
fk_name: Any = ...
formset: Any = ...
extra: int = ...
min_num: Any = ...
max_num: Any = ...
template: Any = ...
verbose_name: Any = ...
verbose_name_plural: Any = ...
can_delete: bool = ...
show_change_link: bool = ...
checks_class: Any = ...
classes: Any = ...
admin_site: Any = ...
parent_model: Any = ...
opts: Any = ...
has_registered_model: Any = ...
def __init__(self, parent_model: Any, admin_site: Any) -> None: ...
@property
def media(self): ...
def get_extra(self, request: Any, obj: Optional[Any] = ..., **kwargs: Any): ...
def get_min_num(self, request: Any, obj: Optional[Any] = ..., **kwargs: Any): ...
def get_max_num(self, request: Any, obj: Optional[Any] = ..., **kwargs: Any): ...
fields: Any = ...
def get_formset(self, request: Any, obj: Optional[Any] = ..., **kwargs: Any): ...
def _get_form_for_get_fields(self, request: Any, obj: Optional[Any] = ...): ...
def get_queryset(self, request: Any): ...
def has_add_permission(self, request: Any, obj: Any): ...
def has_change_permission(self, request: Any, obj: Optional[Any] = ...): ...
def has_delete_permission(self, request: Any, obj: Optional[Any] = ...): ...
def has_view_permission(self, request: Any, obj: Optional[Any] = ...): ...
class StackedInline(InlineModelAdmin):
template: str = ...
class TabularInline(InlineModelAdmin):
template: str = ...

View File

@@ -1,79 +1,70 @@
# Stubs for django.contrib.admin.sites (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from django.utils.functional import LazyObject
from typing import Any, Optional
from django.core.handlers.wsgi import WSGIRequest
from django.db.models.base import Model
from django.http.response import (
HttpResponse,
HttpResponseRedirect,
)
from django.http.response import HttpResponse, HttpResponseRedirect
from django.template.response import TemplateResponse
from django.urls.resolvers import (
URLPattern,
URLResolver,
)
from typing import (
Any,
Callable,
Dict,
List,
Tuple,
Type,
Union,
)
from django.urls.resolvers import URLPattern, URLResolver
from typing import Any, Callable, Dict, List, Tuple, Type, Union
all_sites: Any
class AlreadyRegistered(Exception): ...
class NotRegistered(Exception): ...
class AdminSite:
site_title: Any = ...
site_header: Any = ...
index_title: Any = ...
site_url: str = ...
_empty_value_display: str = ...
login_form: Any = ...
index_template: Any = ...
app_index_template: Any = ...
login_template: Any = ...
logout_template: Any = ...
password_change_template: Any = ...
password_change_done_template: Any = ...
_registry: Any = ...
name: Any = ...
_actions: Any = ...
_global_actions: Any = ...
def __init__(self, name: str = ...) -> None: ...
def _build_app_dict(self, request: WSGIRequest, label: None = ...) -> Dict[Any, Any]: ...
def add_action(self, action: Callable, name: None = ...) -> None: ...
def admin_view(self, view: Callable, cacheable: bool = ...) -> Callable: ...
def app_index(
self,
request: WSGIRequest,
app_label: str,
extra_context: None = ...
) -> TemplateResponse: ...
def check(self, app_configs: None) -> List[Any]: ...
def get_action(self, name: str) -> Callable: ...
def get_app_list(self, request: WSGIRequest) -> List[Any]: ...
def get_urls(self) -> List[Union[URLPattern, URLResolver]]: ...
def has_permission(self, request: WSGIRequest) -> bool: ...
def i18n_javascript(
self,
request: WSGIRequest,
extra_context: None = ...
) -> HttpResponse: ...
def index(
self,
request: WSGIRequest,
extra_context: None = ...
) -> TemplateResponse: ...
def is_registered(self, model: Type[Model]) -> bool: ...
def login(
self,
request: WSGIRequest,
extra_context: None = ...
) -> Union[TemplateResponse, HttpResponseRedirect]: ...
def logout(
self,
request: WSGIRequest,
extra_context: None = ...
) -> TemplateResponse: ...
def password_change(
self,
request: WSGIRequest,
extra_context: Dict[str, str] = ...
) -> TemplateResponse: ...
def password_change_done(
self,
request: WSGIRequest,
extra_context: None = ...
) -> TemplateResponse: ...
def register(self, model_or_iterable: Any, admin_class: Any = ..., **options) -> None: ...
def register(self, model_or_iterable: Any, admin_class: Any = ..., **options: Any) -> None: ...
def unregister(self, model_or_iterable: Type[Model]) -> None: ...
def is_registered(self, model: Type[Model]) -> bool: ...
def add_action(self, action: Callable, name: None = ...) -> None: ...
def disable_action(self, name: Any) -> None: ...
def get_action(self, name: str) -> Callable: ...
@property
def urls(
self
) -> Union[Tuple[List[URLPattern], str, str], Tuple[List[Union[URLPattern, URLResolver]], str, str]]: ...
def actions(self): ...
@property
def empty_value_display(self): ...
@empty_value_display.setter
def empty_value_display(self, empty_value_display: Any) -> None: ...
def has_permission(self, request: WSGIRequest) -> bool: ...
def admin_view(self, view: Callable, cacheable: bool = ...) -> Callable: ...
def get_urls(self) -> List[Union[URLPattern, URLResolver]]: ...
@property
def urls(self) -> Union[Tuple[List[URLPattern], str, str], Tuple[List[Union[URLPattern, URLResolver]], str, str]]: ...
def each_context(self, request: Any): ...
def password_change(self, request: WSGIRequest, extra_context: Dict[str, str] = ...) -> TemplateResponse: ...
def password_change_done(self, request: WSGIRequest, extra_context: None = ...) -> TemplateResponse: ...
def i18n_javascript(self, request: WSGIRequest, extra_context: None = ...) -> HttpResponse: ...
def logout(self, request: WSGIRequest, extra_context: None = ...) -> TemplateResponse: ...
def login(self, request: WSGIRequest, extra_context: None = ...) -> Union[TemplateResponse, HttpResponseRedirect]: ...
def _build_app_dict(self, request: WSGIRequest, label: None = ...) -> Dict[Any, Any]: ...
def get_app_list(self, request: WSGIRequest) -> List[Any]: ...
def index(self, request: WSGIRequest, extra_context: None = ...) -> TemplateResponse: ...
def app_index(self, request: WSGIRequest, app_label: str, extra_context: None = ...) -> TemplateResponse: ...
class DefaultAdminSite:
class DefaultAdminSite(LazyObject):
_wrapped: Any = ...
def _setup(self) -> None: ...
site: Any

View File

@@ -1,109 +1,43 @@
# Stubs for django.contrib.admin.templatetags.admin_list (Python 3.6)
#
# 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.templatetags.base import InclusionAdminNode
from django.contrib.admin.views.main import ChangeList
from django.db.models.base import Model
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.utils.safestring import SafeText
from typing import (
Any,
Callable,
Dict,
Iterator,
Optional,
Union,
)
def _boolean_icon(field_val: Optional[bool]) -> SafeText: ...
def _coerce_field_name(field_name: Union[str, Callable], field_index: int) -> str: ...
def admin_actions(context: RequestContext) -> RequestContext: ...
def admin_actions_tag(
parser: Parser,
token: Token
) -> InclusionAdminNode: ...
def admin_list_filter(
cl: ChangeList,
spec: FieldListFilter
) -> SafeText: ...
def change_list_object_tools_tag(
parser: Parser,
token: Token
) -> InclusionAdminNode: ...
def date_hierarchy(cl: ChangeList) -> Any: ...
def date_hierarchy_tag(
parser: Parser,
token: Token
) -> InclusionAdminNode: ...
def items_for_result(
cl: ChangeList,
result: Model,
form: None
) -> Iterator[SafeText]: ...
def pagination(cl: ChangeList) -> Dict[str, Any]: ...
def pagination_tag(
parser: Parser,
token: Token
) -> InclusionAdminNode: ...
from typing import Any, Callable, Dict, Iterator, Optional, Union
register: Any
DOT: str
def paginator_number(cl: ChangeList, i: int) -> SafeText: ...
def pagination(cl: ChangeList) -> Dict[str, Any]: ...
def pagination_tag(parser: Parser, token: Token) -> InclusionAdminNode: ...
def result_headers(cl: ChangeList) -> Iterator[Dict[str, Optional[Union[int, str]]]]: ...
def _boolean_icon(field_val: Optional[bool]) -> SafeText: ...
def _coerce_field_name(field_name: Union[str, Callable], field_index: int) -> str: ...
def items_for_result(cl: ChangeList, result: Model, form: None) -> Iterator[SafeText]: ...
class ResultList(list):
form: Any = ...
def __init__(self, form: None, *items: Any) -> None: ...
def results(cl: ChangeList) -> Iterator[ResultList]: ...
def result_hidden_fields(cl: ChangeList) -> Iterator[BoundField]: ...
def result_list(cl: ChangeList) -> Dict[str, Any]: ...
def result_list_tag(
parser: Parser,
token: Token
) -> InclusionAdminNode: ...
def results(
cl: ChangeList
) -> Iterator[ResultList]: ...
def search_form(
cl: ChangeList
) -> Dict[str, Union[ChangeList, bool, str]]: ...
def search_form_tag(
parser: Parser,
token: Token
) -> InclusionAdminNode: ...
class ResultList:
def __init__(self, form: None, *items) -> None: ...
def result_list_tag(parser: Parser, token: Token) -> InclusionAdminNode: ...
def date_hierarchy(cl: ChangeList) -> Any: ...
def date_hierarchy_tag(parser: Parser, token: Token) -> InclusionAdminNode: ...
def search_form(cl: ChangeList) -> Dict[str, Union[ChangeList, bool, str]]: ...
def search_form_tag(parser: Parser, token: Token) -> InclusionAdminNode: ...
def admin_list_filter(cl: ChangeList, spec: FieldListFilter) -> SafeText: ...
def admin_actions(context: RequestContext) -> RequestContext: ...
def admin_actions_tag(parser: Parser, token: Token) -> InclusionAdminNode: ...
def change_list_object_tools_tag(parser: Parser, token: Token) -> InclusionAdminNode: ...

View File

@@ -1,37 +1,19 @@
# Stubs for django.contrib.admin.templatetags.admin_modify (Python 3.6)
#
# 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.templatetags.base import InclusionAdminNode
from django.template.base import (
Parser,
Token,
)
from django.template.context import (
Context,
RequestContext,
)
def cell_count(inline_admin_form: InlineAdminForm) -> int: ...
def change_form_object_tools_tag(
parser: Parser,
token: Token
) -> InclusionAdminNode: ...
from django.template.base import Parser, Token
from django.template.context import Context, RequestContext
register: Any
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_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 cell_count(inline_admin_form: InlineAdminForm) -> int: ...

View File

@@ -1 +1,9 @@
# Stubs for django.contrib.admin.templatetags.admin_static (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
register: Any
def static(path: str) -> str: ...

View File

@@ -1,23 +1,16 @@
# Stubs for django.contrib.admin.templatetags.admin_urls (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any, Optional
from django.db.models.options import Options
from django.template.context import RequestContext
from django.utils.safestring import SafeText
from typing import (
Dict,
Optional,
Union,
)
from typing import Dict, Optional, Union
from uuid import UUID
def add_preserved_filters(
context: Union[Dict[str, Union[str, Options]], RequestContext],
url: str,
popup: bool = ...,
to_field: Optional[str] = ...
) -> str: ...
register: Any
def admin_urlname(value: Options, arg: SafeText) -> str: ...
def admin_urlquote(value: Union[str, int, UUID]) -> Union[str, int, UUID]: ...
def add_preserved_filters(context: Union[Dict[str, Union[str, Options]], RequestContext], url: str, popup: bool = ..., to_field: Optional[str] = ...) -> str: ...

View File

@@ -1,19 +1,15 @@
from django.template.base import (
Parser,
Token,
)
# Stubs for django.contrib.admin.templatetags.base (Python 3.6)
#
# 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.context import Context
from django.utils.safestring import SafeText
from typing import Callable
class InclusionAdminNode:
def __init__(
self,
parser: Parser,
token: Token,
func: Callable,
template_name: str,
takes_context: bool = ...
) -> None: ...
class InclusionAdminNode(InclusionNode):
template_name: Any = ...
def __init__(self, parser: Parser, token: Token, func: Callable, template_name: str, takes_context: bool = ...) -> None: ...
def render(self, context: Context) -> SafeText: ...

View File

@@ -1,130 +1,55 @@
# Stubs for django.contrib.admin.utils (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from django.db.models.deletion import Collector
from typing import Any, Optional
from datetime import datetime
from django.contrib.admin.options import (
ModelAdmin,
TabularInline,
)
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.fields import Field
from django.db.models.fields.reverse_related import (
ForeignObjectRel,
ManyToManyRel,
ManyToOneRel,
OneToOneRel,
)
from django.db.models.fields.reverse_related import ForeignObjectRel, ManyToManyRel, ManyToOneRel, OneToOneRel
from django.db.models.options import Options
from django.db.models.query import QuerySet
from typing import (
Any,
Callable,
Dict,
List,
Optional,
Set,
Tuple,
Type,
Union,
)
from typing import Any, Callable, Dict, List, Optional, Set, Tuple, Type, Union
from uuid import UUID
def _get_non_gfk_field(
opts: Options,
name: Union[str, Callable]
) -> Union[Field, reverse_related.ManyToManyRel, reverse_related.OneToOneRel]: ...
def construct_change_message(
form: AdminPasswordChangeForm,
formsets: None,
add: bool
) -> List[Dict[str, Dict[str, List[str]]]]: ...
def display_for_field(
value: Any,
field: Union[Field, reverse_related.OneToOneRel],
empty_value_display: str
) -> str: ...
def display_for_value(value: Any, empty_value_display: str, boolean: bool = ...) -> str: ...
def flatten(fields: Union[Tuple, List[Union[str, Callable]], List[str]]) -> Union[List[Union[str, Callable]], List[str]]: ...
def flatten_fieldsets(fieldsets: Any) -> Union[List[str], List[Union[str, Callable]]]: ...
def get_fields_from_path(model: Type[Model], path: str) -> Any: ...
def get_model_from_relation(
field: Union[ForeignObjectRel, Field]
) -> Type[Model]: ...
def help_text_for_field(name: str, model: Type[Model]) -> str: ...
def label_for_field(
name: Union[str, Callable],
model: Type[Model],
model_admin: Optional[Union[ModelAdmin, TabularInline]] = ...,
return_attr: bool = ...
) -> Any: ...
def lookup_field(
name: Union[str, Callable],
obj: Model,
model_admin: Union[ModelAdmin, TabularInline] = ...
) -> Any: ...
class FieldIsAForeignKeyColumnName(Exception): ...
def lookup_needs_distinct(opts: Options, lookup_path: str) -> bool: ...
def model_ngettext(obj: QuerySet, n: None = ...) -> str: ...
def prepare_lookup_value(key: str, value: Union[str, datetime]) -> Union[bool, datetime, str]: ...
def quote(s: Union[str, UUID, int]) -> Union[str, UUID, int]: ...
def reverse_field_path(
model: Type[Model],
path: str
) -> Union[Tuple[Type[Model], str], Tuple[Type[User], str]]: ...
def unquote(s: str) -> str: ...
def flatten(fields: Union[Tuple, List[Union[str, Callable]], List[str]]) -> Union[List[Union[str, Callable]], List[str]]: ...
def flatten_fieldsets(fieldsets: Any) -> Union[List[str], List[Union[str, Callable]]]: ...
def get_deleted_objects(objs: Any, request: Any, admin_site: Any): ...
class NestedObjects:
def __init__(self, *args, **kwargs) -> None: ...
def _nested(
self,
obj: Model,
seen: Set[Model],
format_callback: Callable
) -> Any: ...
class NestedObjects(Collector):
edges: Any = ...
protected: Any = ...
model_objs: Any = ...
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
def add_edge(self, source: Optional[Model], target: Model) -> None: ...
def can_fast_delete(self, *args, **kwargs) -> bool: ...
def collect(
self,
objs: Union[List[Model], QuerySet],
source: Optional[Type[Model]] = ...,
source_attr: Optional[str] = ...,
**kwargs
) -> None: ...
def collect(self, objs: Union[List[Model], QuerySet], source: Optional[Type[Model]] = ..., source_attr: Optional[str] = ..., **kwargs: Any) -> None: ...
def related_objects(self, related: ManyToOneRel, objs: Union[List[User], List[Model]]) -> QuerySet: ...
def _nested(self, obj: Model, seen: Set[Model], format_callback: Callable) -> Any: ...
def nested(self, format_callback: Callable = ...) -> Any: ...
def related_objects(
self,
related: ManyToOneRel,
objs: Union[List[User], List[Model]]
) -> QuerySet: ...
def can_fast_delete(self, *args: Any, **kwargs: Any) -> bool: ...
def model_format_dict(obj: Any): ...
def model_ngettext(obj: QuerySet, n: None = ...) -> str: ...
def lookup_field(name: Union[str, Callable], obj: Model, model_admin: Union[ModelAdmin, TabularInline] = ...) -> Any: ...
def _get_non_gfk_field(opts: Options, name: Union[str, Callable]) -> Union[Field, reverse_related.ManyToManyRel, reverse_related.OneToOneRel]: ...
def label_for_field(name: Union[str, Callable], model: Type[Model], model_admin: Optional[Union[ModelAdmin, TabularInline]] = ..., return_attr: bool = ...) -> Any: ...
def help_text_for_field(name: str, model: Type[Model]) -> str: ...
def display_for_field(value: Any, field: Union[Field, reverse_related.OneToOneRel], empty_value_display: str) -> str: ...
def display_for_value(value: Any, empty_value_display: str, boolean: bool = ...) -> str: ...
class NotRelationField(Exception): ...
def get_model_from_relation(field: Union[ForeignObjectRel, Field]) -> Type[Model]: ...
def reverse_field_path(model: Type[Model], path: str) -> Union[Tuple[Type[Model], str], Tuple[Type[User], str]]: ...
def get_fields_from_path(model: Type[Model], path: str) -> Any: ...
def construct_change_message(form: AdminPasswordChangeForm, formsets: None, add: bool) -> List[Dict[str, Dict[str, List[str]]]]: ...

View File

@@ -1,11 +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 django.core.handlers.wsgi import WSGIRequest
from django.core.paginator import Paginator
from django.db.models.query import QuerySet
from django.http.response import JsonResponse
class AutocompleteJsonView:
def get(self, request: WSGIRequest, *args, **kwargs) -> JsonResponse: ...
def get_paginator(self, *args, **kwargs) -> Paginator: ...
class AutocompleteJsonView(BaseListView):
paginate_by: int = ...
model_admin: Any = ...
term: Any = ...
paginator_class: Any = ...
object_list: Any = ...
def get(self, request: WSGIRequest, *args: Any, **kwargs: Any) -> JsonResponse: ...
def get_paginator(self, *args: Any, **kwargs: Any) -> Paginator: ...
def get_queryset(self) -> QuerySet: ...
def has_perm(self, request: WSGIRequest, obj: None = ...) -> bool: ...

View File

@@ -1,8 +1,8 @@
# Stubs for django.contrib.admin.views.decorators (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any, Optional
from typing import Callable
def staff_member_required(
view_func: None = ...,
redirect_field_name: str = ...,
login_url: str = ...
) -> Callable: ...
def staff_member_required(view_func: None = ..., redirect_field_name: str = ..., login_url: str = ...) -> Callable: ...

View File

@@ -1,3 +1,9 @@
# 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 django.contrib.admin.filters import SimpleListFilter
from django.contrib.admin.options import ModelAdmin
@@ -5,51 +11,59 @@ from django.core.handlers.wsgi import WSGIRequest
from django.db.models.base import Model
from django.db.models.expressions import CombinedExpression
from django.db.models.query import QuerySet
from typing import (
Any,
Callable,
Dict,
List,
Optional,
Tuple,
Type,
Union,
)
from typing import Any, Callable, Dict, List, Optional, Tuple, Type, Union
ALL_VAR: str
ORDER_VAR: str
ORDER_TYPE_VAR: str
PAGE_VAR: str
SEARCH_VAR: str
ERROR_FLAG: str
IGNORED_PARAMS: Any
class ChangeList:
def __init__(
self,
request: WSGIRequest,
model: Type[Model],
list_display: Union[List[str], List[Union[str, Callable]], Tuple[str, str, str, str]],
list_display_links: Union[List[str], Tuple[str, str]],
list_filter: Union[List[Type[SimpleListFilter]], List[str], Tuple],
date_hierarchy: Optional[str],
search_fields: Union[List[str], Tuple],
list_select_related: bool,
list_per_page: int,
list_max_show_all: int,
list_editable: Union[List[str], Tuple],
model_admin: ModelAdmin,
sortable_by: Any
) -> None: ...
def _get_default_ordering(self) -> Union[List[str], Tuple[str], Tuple[str, str]]: ...
def apply_select_related(self, qs: QuerySet) -> QuerySet: ...
def get_filters(self, request: WSGIRequest) -> Any: ...
model: Any = ...
opts: Any = ...
lookup_opts: Any = ...
root_queryset: Any = ...
list_display: Any = ...
list_display_links: Any = ...
list_filter: Any = ...
date_hierarchy: Any = ...
search_fields: Any = ...
list_select_related: Any = ...
list_per_page: Any = ...
list_max_show_all: Any = ...
model_admin: Any = ...
preserved_filters: Any = ...
sortable_by: Any = ...
page_num: Any = ...
show_all: Any = ...
is_popup: Any = ...
to_field: Any = ...
params: Any = ...
list_editable: Any = ...
query: Any = ...
queryset: Any = ...
title: Any = ...
pk_attname: Any = ...
def __init__(self, request: WSGIRequest, model: Type[Model], list_display: Union[List[str], List[Union[str, Callable]], Tuple[str, str, str, str]], list_display_links: Union[List[str], Tuple[str, str]], list_filter: Union[List[Type[SimpleListFilter]], List[str], Tuple], date_hierarchy: Optional[str], search_fields: Union[List[str], Tuple], list_select_related: bool, list_per_page: int, list_max_show_all: int, list_editable: Union[List[str], Tuple], model_admin: ModelAdmin, sortable_by: Any) -> None: ...
def get_filters_params(self, params: None = ...) -> Dict[str, str]: ...
def get_ordering(
self,
request: WSGIRequest,
queryset: QuerySet
) -> List[str]: ...
def get_ordering_field(
self,
field_name: Union[str, Callable]
) -> Optional[Union[str, CombinedExpression]]: ...
def get_ordering_field_columns(self) -> OrderedDict: ...
def get_filters(self, request: WSGIRequest) -> Any: ...
def get_query_string(self, new_params: Any = ..., remove: Optional[List[str]] = ...) -> str: ...
def get_queryset(self, request: WSGIRequest) -> QuerySet: ...
result_count: Any = ...
show_full_result_count: Any = ...
show_admin_actions: Any = ...
full_result_count: Any = ...
result_list: Any = ...
can_show_all: Any = ...
multi_page: Any = ...
paginator: Any = ...
def get_results(self, request: WSGIRequest) -> None: ...
def _get_default_ordering(self) -> Union[List[str], Tuple[str], Tuple[str, str]]: ...
def get_ordering_field(self, field_name: Union[str, Callable]) -> Optional[Union[str, CombinedExpression]]: ...
def get_ordering(self, request: WSGIRequest, queryset: QuerySet) -> List[str]: ...
def get_ordering_field_columns(self) -> OrderedDict: ...
def get_queryset(self, request: WSGIRequest) -> QuerySet: ...
def apply_select_related(self, qs: QuerySet) -> QuerySet: ...
def has_related_field_in_list_display(self) -> bool: ...
def url_for_result(self, result: Model) -> str: ...

View File

@@ -1,149 +1,127 @@
# 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 datetime import datetime
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.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,
)
from typing import Any, Dict, List, Optional, Set, Tuple, Union
class FilteredSelectMultiple(forms.SelectMultiple):
@property
def media(self) -> Media: ...
verbose_name: Any = ...
is_stacked: Any = ...
def __init__(self, verbose_name: str, is_stacked: bool, attrs: None = ..., choices: Tuple = ...) -> None: ...
def get_context(self, name: Any, value: Any, attrs: Any): ...
class AdminDateWidget(forms.DateInput):
@property
def media(self) -> Media: ...
def __init__(self, attrs: None = ..., format: None = ...) -> None: ...
class AdminTimeWidget(forms.TimeInput):
@property
def media(self) -> Media: ...
def __init__(self, attrs: None = ..., format: None = ...) -> None: ...
class AdminSplitDateTime(forms.SplitDateTimeWidget):
template_name: str = ...
def __init__(self, attrs: None = ...) -> None: ...
def get_context(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):
template_name: str = ...
class AdminFileWidget(forms.ClearableFileInput):
template_name: str = ...
def url_params_from_lookup_dict(lookups: Dict[str, Union[str, int]]) -> Dict[str, str]: ...
class AdminDateWidget:
def __init__(self, attrs: None = ..., format: None = ...) -> None: ...
@property
def media(self) -> Media: ...
class AdminEmailInputWidget:
def __init__(self, attrs: None = ...) -> None: ...
class AdminIntegerFieldWidget:
def __init__(self, attrs: None = ...) -> None: ...
class AdminSplitDateTime:
def __init__(self, attrs: None = ...) -> None: ...
def get_context(
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 AdminTextInputWidget:
def __init__(self, attrs: None = ...) -> None: ...
class AdminTextareaWidget:
def __init__(self, attrs: None = ...) -> None: ...
class AdminTimeWidget:
def __init__(self, attrs: None = ..., format: None = ...) -> None: ...
@property
def media(self) -> Media: ...
class AdminURLFieldWidget:
def __init__(self, attrs: None = ...) -> None: ...
def get_context(
self,
name: str,
value: None,
attrs: Dict[str, str]
) -> Dict[str, Union[Dict[str, Union[str, bool, None, Dict[str, str]]], str]]: ...
class AutocompleteMixin:
def __init__(
self,
rel: ManyToOneRel,
admin_site: AdminSite,
attrs: None = ...,
choices: Tuple = ...,
using: None = ...
) -> None: ...
def build_attrs(self, base_attrs: Dict[Any, Any], extra_attrs: Dict[str, str] = ...) -> Dict[str, str]: ...
def get_url(self) -> str: ...
@property
def media(self) -> Media: ...
def optgroups(
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]]]: ...
class FilteredSelectMultiple:
def __init__(self, verbose_name: str, is_stacked: bool, attrs: None = ..., choices: Tuple = ...) -> None: ...
@property
def media(self) -> Media: ...
class ForeignKeyRawIdWidget:
def __init__(
self,
rel: ManyToOneRel,
admin_site: AdminSite,
attrs: None = ...,
using: None = ...
) -> None: ...
class ForeignKeyRawIdWidget(forms.TextInput):
template_name: str = ...
rel: Any = ...
admin_site: Any = ...
db: Any = ...
def __init__(self, rel: ManyToOneRel, admin_site: AdminSite, attrs: None = ..., using: None = ...) -> None: ...
def get_context(self, name: str, value: None, attrs: Dict[str, Union[bool, str]]) -> Dict[str, Union[Dict[str, Union[str, bool, None, Dict[str, Union[bool, str]]]], str]]: ...
def base_url_parameters(self) -> Dict[str, str]: ...
def get_context(
self,
name: str,
value: None,
attrs: Dict[str, Union[bool, str]]
) -> Dict[str, Union[Dict[str, Union[str, bool, None, Dict[str, Union[bool, str]]]], str]]: ...
def url_parameters(self) -> Dict[str, str]: ...
def label_and_url_for_value(self, value: Any): ...
class ManyToManyRawIdWidget(ForeignKeyRawIdWidget):
template_name: str = ...
def get_context(self, name: Any, value: Any, attrs: Any): ...
def url_parameters(self): ...
def label_and_url_for_value(self, value: Any): ...
def value_from_datadict(self, data: Any, files: Any, name: Any): ...
def format_value(self, value: Any): ...
class RelatedFieldWidgetWrapper:
class RelatedFieldWidgetWrapper(forms.Widget):
template_name: str = ...
needs_multipart_form: Any = ...
attrs: Any = ...
choices: Any = ...
widget: Any = ...
rel: Any = ...
can_add_related: Any = ...
can_change_related: Any = ...
can_delete_related: Any = ...
can_view_related: Any = ...
admin_site: Any = ...
def __init__(self, widget: Union[Select, AdminRadioSelect], rel: ForeignObjectRel, admin_site: AdminSite, can_add_related: Optional[bool] = ..., can_change_related: bool = ..., can_delete_related: bool = ..., can_view_related: bool = ...) -> None: ...
def __deepcopy__(self, memo: Dict[int, Any]) -> RelatedFieldWidgetWrapper: ...
def __init__(
self,
widget: Union[Select, AdminRadioSelect],
rel: ForeignObjectRel,
admin_site: AdminSite,
can_add_related: Optional[bool] = ...,
can_change_related: bool = ...,
can_delete_related: bool = ...,
can_view_related: bool = ...
) -> None: ...
def get_context(
self,
name: str,
value: Optional[Union[str, int]],
attrs: Dict[str, str]
) -> Dict[str, Union[bool, str]]: ...
def get_related_url(self, info: Tuple[str, str], action: str, *args) -> str: ...
def id_for_label(self, id_: str) -> str: ...
@property
def is_hidden(self) -> bool: ...
@property
def media(self) -> Media: ...
def value_from_datadict(
self,
data: QueryDict,
files: MultiValueDict,
name: str
) -> Optional[str]: ...
def get_related_url(self, info: Tuple[str, str], action: str, *args: Any) -> str: ...
def get_context(self, name: str, value: Optional[Union[str, int]], attrs: Dict[str, str]) -> 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 id_for_label(self, id_: str) -> str: ...
class AdminTextareaWidget(forms.Textarea):
def __init__(self, attrs: None = ...) -> None: ...
class AdminTextInputWidget(forms.TextInput):
def __init__(self, attrs: None = ...) -> None: ...
class AdminEmailInputWidget(forms.EmailInput):
def __init__(self, attrs: None = ...) -> None: ...
class AdminURLFieldWidget(forms.URLInput):
template_name: str = ...
def __init__(self, attrs: None = ...) -> None: ...
def get_context(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_name: str = ...
def __init__(self, attrs: None = ...) -> None: ...
class AdminBigIntegerFieldWidget(AdminIntegerFieldWidget):
class_name: str = ...
SELECT2_TRANSLATIONS: Any
class AutocompleteMixin:
url_name: str = ...
rel: Any = ...
admin_site: Any = ...
db: Any = ...
choices: Any = ...
attrs: Any = ...
def __init__(self, rel: ManyToOneRel, admin_site: AdminSite, attrs: None = ..., choices: Tuple = ..., using: None = ...) -> None: ...
def get_url(self) -> str: ...
def build_attrs(self, base_attrs: Dict[Any, Any], extra_attrs: Dict[str, str] = ...) -> Dict[str, str]: ...
def optgroups(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
def media(self) -> Media: ...
class AutocompleteSelect(AutocompleteMixin, forms.Select): ...
class AutocompleteSelectMultiple(AutocompleteMixin, forms.SelectMultiple): ...

View File

@@ -1,19 +1,13 @@
# Stubs for django.contrib.admindocs.middleware (Python 3.6)
#
# 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.http.response import HttpResponse
from typing import (
Any,
Callable,
Dict,
Optional,
Tuple,
)
class XViewMiddleware:
def process_view(
self,
request: WSGIRequest,
view_func: Callable,
view_args: Tuple,
view_kwargs: Dict[Any, Any]
) -> Optional[HttpResponse]: ...
from typing import Any, Callable, Dict, Optional, Tuple
class XViewMiddleware(MiddlewareMixin):
def process_view(self, request: WSGIRequest, view_func: Callable, view_args: Tuple, view_kwargs: Dict[Any, Any]) -> Optional[HttpResponse]: ...

View File

@@ -1,10 +1,24 @@
from typing import Callable
# Stubs for django.contrib.admindocs.utils (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any, Optional
from typing import Callable
docutils_is_available: bool
def get_view_name(view_func: Callable) -> str: ...
def trim_docstring(docstring: Any): ...
def parse_docstring(docstring: Any): ...
def parse_rst(text: Any, default_reference_context: Any, thing_being_parsed: Optional[Any] = ...): ...
ROLES: Any
def create_reference_role(rolename: Any, urlbase: Any): ...
def default_reference_role(name: Any, rawtext: Any, text: Any, lineno: Any, inliner: Any, options: Optional[Any] = ..., content: Optional[Any] = ...): ...
named_group_matcher: Any
unnamed_group_matcher: Any
def replace_named_groups(pattern: str) -> str: ...
def replace_unnamed_groups(pattern: str) -> str: ...

View File

@@ -1,4 +1,54 @@
# Stubs for django.contrib.admindocs.views (Python 3.6)
#
# 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
MODEL_METHODS_EXCLUDE: Any
class BaseAdminDocsView(TemplateView):
template_name: str = ...
def dispatch(self, request: Any, *args: Any, **kwargs: Any): ...
def get_context_data(self, **kwargs: Any): ...
class BookmarkletsView(BaseAdminDocsView):
template_name: str = ...
def get_context_data(self, **kwargs: Any): ...
class TemplateTagIndexView(BaseAdminDocsView):
template_name: str = ...
def get_context_data(self, **kwargs: Any): ...
class TemplateFilterIndexView(BaseAdminDocsView):
template_name: str = ...
def get_context_data(self, **kwargs: Any): ...
class ViewIndexView(BaseAdminDocsView):
template_name: str = ...
def get_context_data(self, **kwargs: Any): ...
class ViewDetailView(BaseAdminDocsView):
template_name: str = ...
@staticmethod
def _get_view_func(view: Any): ...
def get_context_data(self, **kwargs: Any): ...
class ModelIndexView(BaseAdminDocsView):
template_name: str = ...
def get_context_data(self, **kwargs: Any): ...
class ModelDetailView(BaseAdminDocsView):
template_name: str = ...
def get_context_data(self, **kwargs: Any): ...
class TemplateDetailView(BaseAdminDocsView):
template_name: str = ...
def get_context_data(self, **kwargs: Any): ...
def get_return_data_type(func_name: Any): ...
def get_readable_field_data_type(field: Field) -> str: ...
def extract_views_from_urlpatterns(urlpatterns: Any, base: str = ..., namespace: Optional[Any] = ...): ...
def simplify_regex(pattern: Any): ...

View File

@@ -1,67 +1,35 @@
# Stubs for django.contrib.auth (Python 3.6)
#
# 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.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.db.models.base import Model
from django.db.models.options import Options
from django.http.request import HttpRequest
from django.utils.functional import SimpleLazyObject
from typing import (
Any,
Dict,
List,
Optional,
Type,
Union,
)
def _clean_credentials(credentials: Dict[str, Optional[str]]) -> Dict[str, Optional[str]]: ...
def _get_backends(return_tuples: bool = ...) -> Any: ...
def _get_user_session_key(request: HttpRequest) -> int: ...
def authenticate(
request: Optional[HttpRequest] = ...,
**credentials
) -> Optional[AbstractBaseUser]: ...
def get_backends() -> List[ModelBackend]: ...
def get_permission_codename(action: str, opts: Options) -> str: ...
def get_user(
request: HttpRequest
) -> Union[AnonymousUser, AbstractBaseUser]: ...
def get_user_model() -> Type[Model]: ...
from typing import Any, Dict, List, Optional, Type, Union
SESSION_KEY: str
BACKEND_SESSION_KEY: str
HASH_SESSION_KEY: str
REDIRECT_FIELD_NAME: str
def load_backend(path: str) -> object: ...
def login(
request: HttpRequest,
user: User,
backend: Optional[Union[str, Type[ModelBackend]]] = ...
) -> None: ...
def _get_backends(return_tuples: bool = ...) -> Any: ...
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(request: Optional[HttpRequest] = ..., **credentials: Any) -> Optional[AbstractBaseUser]: ...
def login(request: HttpRequest, user: User, backend: Optional[Union[str, Type[ModelBackend]]] = ...) -> None: ...
def logout(request: HttpRequest) -> None: ...
def get_user_model() -> Type[Model]: ...
def get_user(request: HttpRequest) -> Union[AnonymousUser, AbstractBaseUser]: ...
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: SimpleLazyObject
) -> None: ...
default_app_config: str

View File

@@ -1,2 +1,14 @@
class AuthConfig:
# Stubs for django.contrib.auth.apps (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from .checks import check_models_permissions, check_user_model
from .management import create_permissions
from .signals import user_logged_in
from django.apps import AppConfig
from typing import Any
class AuthConfig(AppConfig):
name: str = ...
verbose_name: Any = ...
def ready(self) -> None: ...

View File

@@ -1,10 +1,10 @@
from typing import (
Any,
List,
)
# Stubs for django.contrib.auth.checks (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from .management import _get_builtin_permissions
from typing import Any, Optional
def check_models_permissions(app_configs: None = ..., **kwargs) -> List[Any]: ...
def check_user_model(app_configs: None = ..., **kwargs) -> List[Any]: ...
from typing import Any, List
def check_user_model(app_configs: None = ..., **kwargs: Any) -> List[Any]: ...
def check_models_permissions(app_configs: None = ..., **kwargs: Any) -> List[Any]: ...

View File

@@ -1,27 +1,24 @@
from django.contrib.auth.models import (
AnonymousUser,
User,
)
# Stubs for django.contrib.auth.context_processors (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
from django.contrib.auth.models import AnonymousUser, User
from django.http.request import HttpRequest
from typing import (
Dict,
Union,
)
def auth(
request: HttpRequest
) -> Dict[str, Union[PermWrapper, AnonymousUser, User]]: ...
from typing import Dict, Union
class PermLookupDict:
def __bool__(self) -> bool: ...
def __getitem__(self, perm_name: str) -> bool: ...
def __init__(self, user: object, app_label: str) -> None: ...
def __repr__(self): ...
def __getitem__(self, perm_name: str) -> bool: ...
def __iter__(self) -> None: ...
def __bool__(self) -> bool: ...
class PermWrapper:
def __contains__(self, perm_name: str) -> bool: ...
def __getitem__(self, app_label: str) -> PermLookupDict: ...
user: Any = ...
def __init__(self, user: object) -> None: ...
def __iter__(self): ...
def __getitem__(self, app_label: str) -> PermLookupDict: ...
def __iter__(self) -> None: ...
def __contains__(self, perm_name: str) -> bool: ...
def auth(request: HttpRequest) -> Dict[str, Union[PermWrapper, AnonymousUser, User]]: ...

View File

@@ -1,27 +1,10 @@
from typing import (
Callable,
List,
Optional,
Union,
)
# Stubs for django.contrib.auth.decorators (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any, Optional
def login_required(
function: Optional[Callable] = ...,
redirect_field_name: str = ...,
login_url: None = ...
) -> Callable: ...
def permission_required(
perm: Union[str, List[str]],
login_url: None = ...,
raise_exception: bool = ...
) -> Callable: ...
def user_passes_test(
test_func: Callable,
login_url: Optional[str] = ...,
redirect_field_name: str = ...
) -> Callable: ...
from typing import Callable, List, Optional, Union
def user_passes_test(test_func: Callable, login_url: Optional[str] = ..., redirect_field_name: str = ...) -> Callable: ...
def login_required(function: Optional[Callable] = ..., redirect_field_name: str = ..., login_url: None = ...) -> Callable: ...
def permission_required(perm: Union[str, List[str]], login_url: None = ..., raise_exception: bool = ...) -> Callable: ...

View File

@@ -1,76 +1,113 @@
# 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 typing import (
Callable,
Dict,
List,
Optional,
Union,
)
def check_password(
password: str,
encoded: str,
setter: Optional[Callable] = ...,
preferred: str = ...
) -> bool: ...
def get_hasher(algorithm: str = ...) -> BasePasswordHasher: ...
def get_hashers(
) -> Union[List[UnsaltedMD5PasswordHasher], List[MD5PasswordHasher], List[BasePasswordHasher], List[PBKDF2PasswordHasher]]: ...
def get_hashers_by_algorithm() -> Dict[str, BasePasswordHasher]: ...
def identify_hasher(encoded: str) -> BasePasswordHasher: ...
from typing import Callable, Dict, List, Optional, Union
UNUSABLE_PASSWORD_PREFIX: str
UNUSABLE_PASSWORD_SUFFIX_LENGTH: int
def is_password_usable(encoded: Optional[str]) -> bool: ...
def check_password(password: str, encoded: str, setter: Optional[Callable] = ..., preferred: str = ...) -> bool: ...
def make_password(password: Optional[str], salt: Optional[str] = ..., hasher: str = ...) -> str: ...
def get_hashers() -> Union[List[UnsaltedMD5PasswordHasher], List[MD5PasswordHasher], List[BasePasswordHasher], List[PBKDF2PasswordHasher]]: ...
def get_hashers_by_algorithm() -> Dict[str, BasePasswordHasher]: ...
def reset_hashers(**kwargs: Any) -> None: ...
def get_hasher(algorithm: str = ...) -> BasePasswordHasher: ...
def identify_hasher(encoded: str) -> BasePasswordHasher: ...
def mask_hash(hash: str, show: int = ..., char: str = ...) -> str: ...
def reset_hashers(**kwargs) -> None: ...
class BasePasswordHasher:
algorithm: Any = ...
library: Any = ...
def _load_library(self): ...
def salt(self) -> str: ...
def verify(self, password: Any, encoded: Any) -> None: ...
def encode(self, password: Any, salt: Any) -> None: ...
def safe_summary(self, encoded: str) -> None: ...
def must_update(self, encoded: str) -> bool: ...
def harden_runtime(self, password: str, encoded: str) -> None: ...
def must_update(self, encoded: str) -> bool: ...
def safe_summary(self, encoded: str): ...
def salt(self) -> str: ...
class MD5PasswordHasher:
def encode(self, password: str, salt: str) -> str: ...
def safe_summary(self, encoded: str) -> OrderedDict: ...
def verify(self, password: str, encoded: str) -> bool: ...
class PBKDF2PasswordHasher:
class PBKDF2PasswordHasher(BasePasswordHasher):
algorithm: str = ...
iterations: int = ...
digest: Any = ...
def encode(self, password: str, salt: str, iterations: Optional[int] = ...) -> str: ...
def verify(self, password: str, encoded: str) -> bool: ...
def safe_summary(self, encoded: Any): ...
def must_update(self, encoded: str) -> bool: ...
def verify(self, password: str, encoded: str) -> bool: ...
def harden_runtime(self, password: Any, encoded: Any) -> None: ...
class PBKDF2SHA1PasswordHasher(PBKDF2PasswordHasher):
algorithm: str = ...
digest: Any = ...
class SHA1PasswordHasher:
class Argon2PasswordHasher(BasePasswordHasher):
algorithm: str = ...
library: str = ...
time_cost: int = ...
memory_cost: int = ...
parallelism: int = ...
def encode(self, password: Any, salt: Any): ...
def verify(self, password: Any, encoded: Any): ...
def safe_summary(self, encoded: Any): ...
def must_update(self, encoded: Any): ...
def harden_runtime(self, password: Any, encoded: Any) -> None: ...
def _decode(self, encoded: Any): ...
class BCryptSHA256PasswordHasher(BasePasswordHasher):
algorithm: str = ...
digest: Any = ...
library: Any = ...
rounds: int = ...
def salt(self): ...
def encode(self, password: Any, salt: Any): ...
def verify(self, password: Any, encoded: Any): ...
def safe_summary(self, encoded: Any): ...
def must_update(self, encoded: Any): ...
def harden_runtime(self, password: Any, encoded: Any) -> None: ...
class BCryptPasswordHasher(BCryptSHA256PasswordHasher):
algorithm: str = ...
digest: Any = ...
class SHA1PasswordHasher(BasePasswordHasher):
algorithm: str = ...
def encode(self, password: str, salt: str) -> str: ...
def verify(self, password: str, encoded: str) -> bool: ...
def safe_summary(self, encoded: Any): ...
def harden_runtime(self, password: Any, encoded: Any) -> None: ...
class UnsaltedMD5PasswordHasher:
class MD5PasswordHasher(BasePasswordHasher):
algorithm: str = ...
def encode(self, password: str, salt: str) -> str: ...
def verify(self, password: str, encoded: str) -> bool: ...
def safe_summary(self, encoded: str) -> OrderedDict: ...
def harden_runtime(self, password: Any, encoded: Any) -> None: ...
class UnsaltedSHA1PasswordHasher:
def encode(self, password: str, salt: str) -> str: ...
class UnsaltedSHA1PasswordHasher(BasePasswordHasher):
algorithm: str = ...
def salt(self) -> str: ...
def encode(self, password: str, salt: str) -> str: ...
def verify(self, password: str, encoded: str) -> bool: ...
def safe_summary(self, encoded: Any): ...
def harden_runtime(self, password: Any, encoded: Any) -> None: ...
class UnsaltedMD5PasswordHasher(BasePasswordHasher):
algorithm: str = ...
def salt(self): ...
def encode(self, password: str, salt: str) -> str: ...
def verify(self, password: str, encoded: str) -> bool: ...
def safe_summary(self, encoded: Any): ...
def harden_runtime(self, password: Any, encoded: Any) -> None: ...
class CryptPasswordHasher(BasePasswordHasher):
algorithm: str = ...
library: str = ...
def salt(self): ...
def encode(self, password: Any, salt: Any): ...
def verify(self, password: Any, encoded: Any): ...
def safe_summary(self, encoded: Any): ...
def harden_runtime(self, password: Any, encoded: Any) -> None: ...

View File

@@ -1,29 +1,15 @@
# Stubs for django.contrib.auth.management (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
from django.apps.config import AppConfig
from django.apps.registry import Apps
from django.db.models.options import Options
from typing import (
List,
Tuple,
)
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(
app_config: AppConfig,
verbosity: int = ...,
interactive: bool = ...,
using: str = ...,
apps: Apps = ...,
**kwargs
) -> None: ...
def get_default_username(check_db: bool = ...) -> str: ...
def create_permissions(app_config: AppConfig, verbosity: int = ..., interactive: bool = ..., using: str = ..., apps: Apps = ..., **kwargs: Any) -> None: ...
def get_system_username() -> str: ...
def get_default_username(check_db: bool = ...) -> str: ...

View File

@@ -1,60 +1,43 @@
# Stubs for django.contrib.auth.password_validation (Python 3.6)
#
# 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.models import User
from pathlib import PosixPath
from typing import (
Dict,
List,
Optional,
Tuple,
Union,
)
from typing import Dict, List, Optional, Tuple, Union
def get_default_password_validators() -> Union[List[NumericPasswordValidator], List[UserAttributeSimilarityValidator]]: ...
def get_password_validators(validator_config: List[Dict[str, str]]) -> Union[List[NumericPasswordValidator], List[UserAttributeSimilarityValidator]]: ...
def validate_password(password: str, user: Optional[User] = ..., password_validators: None = ...) -> None: ...
def password_changed(password: str, user: AbstractBaseUser = ..., password_validators: None = ...) -> None: ...
def password_validators_help_texts(password_validators: None = ...) -> List[str]: ...
def _password_validators_help_text_html(password_validators: None = ...) -> str: ...
def get_default_password_validators(
) -> Union[List[NumericPasswordValidator], List[UserAttributeSimilarityValidator]]: ...
def get_password_validators(
validator_config: List[Dict[str, str]]
) -> Union[List[NumericPasswordValidator], List[UserAttributeSimilarityValidator]]: ...
def password_changed(
password: str,
user: AbstractBaseUser = ...,
password_validators: None = ...
) -> None: ...
def password_validators_help_texts(password_validators: None = ...) -> List[str]: ...
def validate_password(
password: str,
user: Optional[User] = ...,
password_validators: None = ...
) -> None: ...
class CommonPasswordValidator:
def __init__(self, password_list_path: PosixPath = ...) -> None: ...
def validate(self, password: str, user: None = ...) -> None: ...
password_validators_help_text_html: Any
class MinimumLengthValidator:
min_length: Any = ...
def __init__(self, min_length: int = ...) -> None: ...
def get_help_text(self) -> str: ...
def validate(self, password: str, user: None = ...) -> None: ...
def get_help_text(self) -> str: ...
class UserAttributeSimilarityValidator:
DEFAULT_USER_ATTRIBUTES: Any = ...
user_attributes: Any = ...
max_similarity: Any = ...
def __init__(self, user_attributes: Tuple[str, str, str, str] = ..., max_similarity: float = ...) -> None: ...
def validate(self, password: str, user: None = ...) -> None: ...
def get_help_text(self) -> str: ...
class CommonPasswordValidator:
DEFAULT_PASSWORD_LIST_PATH: Any = ...
passwords: Any = ...
def __init__(self, password_list_path: PosixPath = ...) -> None: ...
def validate(self, password: str, user: None = ...) -> None: ...
def get_help_text(self): ...
class NumericPasswordValidator:
def validate(self, password: str, user: User = ...) -> None: ...
class UserAttributeSimilarityValidator:
def __init__(self, user_attributes: Tuple[str, str, str, str] = ..., max_similarity: float = ...) -> None: ...
def get_help_text(self) -> str: ...
def validate(self, password: str, user: None = ...) -> None: ...
def get_help_text(self): ...

View File

@@ -1,12 +1,20 @@
# Stubs for django.contrib.auth.tokens (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
from datetime import date
from django.contrib.auth.models import User
from typing import Optional
class PasswordResetTokenGenerator:
def _make_hash_value(self, user: User, timestamp: int) -> str: ...
key_salt: str = ...
secret: Any = ...
def make_token(self, user: User) -> str: ...
def check_token(self, user: User, token: Optional[str]) -> bool: ...
def _make_token_with_timestamp(self, user: User, timestamp: int) -> str: ...
def _make_hash_value(self, user: User, timestamp: int) -> str: ...
def _num_days(self, dt: date) -> int: ...
def _today(self) -> date: ...
def check_token(self, user: User, token: Optional[str]) -> bool: ...
def make_token(self, user: User) -> str: ...
default_token_generator: Any

View File

@@ -1,2 +1,12 @@
class ContentTypesConfig:
# Stubs for django.contrib.contenttypes.apps (Python 3.6)
#
# 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 typing import Any
class ContentTypesConfig(AppConfig):
name: str = ...
verbose_name: Any = ...
def ready(self) -> None: ...

View File

@@ -1,10 +1,9 @@
from typing import (
Any,
List,
)
# Stubs for django.contrib.contenttypes.checks (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any, Optional
def check_generic_foreign_keys(app_configs: None = ..., **kwargs) -> List[Any]: ...
def check_model_name_lengths(app_configs: None = ..., **kwargs) -> List[Any]: ...
from typing import Any, List
def check_generic_foreign_keys(app_configs: None = ..., **kwargs: Any) -> List[Any]: ...
def check_model_name_lengths(app_configs: None = ..., **kwargs: Any) -> List[Any]: ...

View File

@@ -1,59 +1,26 @@
# Stubs for django.contrib.contenttypes.management (Python 3.6)
#
# 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.registry import Apps
from django.contrib.contenttypes.models import ContentType
from django.db.backends.sqlite3.schema import DatabaseSchemaEditor
from django.db.migrations.migration import Migration
from django.db.migrations.state import StateApps
from typing import (
Any,
List,
Tuple,
Type,
Union,
)
def create_contenttypes(
app_config: AppConfig,
verbosity: int = ...,
interactive: bool = ...,
using: str = ...,
apps: Apps = ...,
**kwargs
) -> None: ...
def get_contenttypes_and_models(
app_config: AppConfig,
using: str,
ContentType: Type[ContentType]
) -> Any: ...
def inject_rename_contenttypes_operations(
plan: Union[List[Any], List[Tuple[Migration, bool]]] = ...,
apps: StateApps = ...,
using: str = ...,
**kwargs
) -> None: ...
class RenameContentType:
from typing import Any, List, Tuple, Type, Union
class RenameContentType(migrations.RunPython):
app_label: Any = ...
old_model: Any = ...
new_model: Any = ...
def __init__(self, app_label: str, old_model: str, new_model: str) -> None: ...
def _rename(
self,
apps: StateApps,
schema_editor: DatabaseSchemaEditor,
old_model: str,
new_model: str
) -> None: ...
def rename_backward(
self,
apps: StateApps,
schema_editor: DatabaseSchemaEditor
) -> None: ...
def rename_forward(
self,
apps: StateApps,
schema_editor: DatabaseSchemaEditor
) -> None: ...
def _rename(self, apps: StateApps, schema_editor: DatabaseSchemaEditor, old_model: str, new_model: str) -> None: ...
def rename_forward(self, apps: StateApps, schema_editor: DatabaseSchemaEditor) -> None: ...
def rename_backward(self, apps: StateApps, schema_editor: DatabaseSchemaEditor) -> None: ...
def inject_rename_contenttypes_operations(plan: Union[List[Any], List[Tuple[Migration, bool]]] = ..., apps: StateApps = ..., using: str = ..., **kwargs: Any) -> None: ...
def get_contenttypes_and_models(app_config: AppConfig, using: str, ContentType: Type[ContentType]) -> Any: ...
def create_contenttypes(app_config: AppConfig, verbosity: int = ..., interactive: bool = ..., using: str = ..., apps: Apps = ..., **kwargs: Any) -> None: ...

View File

@@ -1,5 +1,9 @@
# Stubs for django.contrib.flatpages.sitemaps (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from django.contrib.sitemaps import Sitemap
from django.db.models.query import QuerySet
class FlatPageSitemap:
class FlatPageSitemap(Sitemap):
def items(self) -> QuerySet: ...

View File

@@ -1,26 +1,19 @@
from datetime import (
date,
datetime,
)
from typing import (
Optional,
Union,
)
# 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
def apnumber(value: str) -> str: ...
def intcomma(value: Optional[Union[str, float]], use_l10n: bool = ...) -> str: ...
def intword(value: Optional[str]) -> Optional[str]: ...
def naturalday(value: Optional[date], arg: None = ...) -> Optional[str]: ...
def naturaltime(value: datetime) -> str: ...
from datetime import date, datetime
from typing import Optional, Union
register: Any
def ordinal(value: Optional[str]) -> Optional[str]: ...
def intcomma(value: Optional[Union[str, float]], use_l10n: bool = ...) -> str: ...
intword_converters: Any
def intword(value: Optional[str]) -> Optional[str]: ...
def apnumber(value: str) -> str: ...
def naturalday(value: Optional[date], arg: None = ...) -> Optional[str]: ...
def naturaltime(value: datetime) -> str: ...

View File

@@ -1,65 +1,21 @@
# Stubs for django.contrib.messages.api (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
from django.contrib.messages.storage.base import BaseStorage
from django.core.handlers.wsgi import WSGIRequest
from django.http.request import HttpRequest
from typing import (
Optional,
Union,
)
def add_message(
request: Optional[WSGIRequest],
level: int,
message: str,
extra_tags: str = ...,
fail_silently: Union[str, bool] = ...
) -> None: ...
def debug(
request: WSGIRequest,
message: str,
extra_tags: str = ...,
fail_silently: Union[str, bool] = ...
) -> None: ...
def error(
request: WSGIRequest,
message: str,
extra_tags: str = ...,
fail_silently: Union[str, bool] = ...
) -> None: ...
def get_level(request: HttpRequest) -> int: ...
from typing import Optional, Union
class MessageFailure(Exception): ...
def add_message(request: Optional[WSGIRequest], level: int, message: str, extra_tags: str = ..., fail_silently: Union[str, bool] = ...) -> None: ...
def get_messages(request: HttpRequest) -> BaseStorage: ...
def info(
request: WSGIRequest,
message: str,
extra_tags: str = ...,
fail_silently: Union[str, bool] = ...
) -> None: ...
def get_level(request: HttpRequest) -> int: ...
def set_level(request: HttpRequest, level: int) -> bool: ...
def success(
request: WSGIRequest,
message: str,
extra_tags: str = ...,
fail_silently: Union[str, bool] = ...
) -> None: ...
def warning(
request: WSGIRequest,
message: str,
extra_tags: str = ...,
fail_silently: Union[str, bool] = ...
) -> None: ...
def debug(request: WSGIRequest, message: str, extra_tags: str = ..., fail_silently: Union[str, bool] = ...) -> None: ...
def info(request: WSGIRequest, message: str, extra_tags: str = ..., fail_silently: Union[str, bool] = ...) -> None: ...
def success(request: WSGIRequest, message: str, extra_tags: str = ..., fail_silently: Union[str, bool] = ...) -> None: ...
def warning(request: WSGIRequest, message: str, extra_tags: str = ..., fail_silently: Union[str, bool] = ...) -> None: ...
def error(request: WSGIRequest, message: str, extra_tags: str = ..., fail_silently: Union[str, bool] = ...) -> None: ...

View File

@@ -1,11 +1,10 @@
# Stubs for django.contrib.messages.context_processors (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
from django.contrib.messages.storage.base import BaseStorage
from django.http.request import HttpRequest
from typing import (
Dict,
Union,
)
def messages(
request: HttpRequest
) -> Dict[str, Union[Dict[str, int], BaseStorage]]: ...
from typing import Dict, Union
def messages(request: HttpRequest) -> Dict[str, Union[Dict[str, int], BaseStorage]]: ...

View File

@@ -1,12 +1,13 @@
# Stubs for django.contrib.messages.middleware (Python 3.6)
#
# 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.http.request import HttpRequest
from django.http.response import HttpResponseBase
class MessageMiddleware:
class MessageMiddleware(MiddlewareMixin):
def process_request(self, request: WSGIRequest) -> None: ...
def process_response(
self,
request: HttpRequest,
response: HttpResponseBase
) -> HttpResponseBase: ...
def process_response(self, request: HttpRequest, response: HttpResponseBase) -> HttpResponseBase: ...

View File

@@ -1,5 +1,9 @@
# Stubs for django.contrib.messages.storage (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
from django.contrib.messages.storage.base import BaseStorage
from django.http.request import HttpRequest
def default_storage(request: HttpRequest) -> BaseStorage: ...

View File

@@ -1,46 +1,30 @@
# Stubs for django.contrib.messages.storage.cookie (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
import json
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,
Optional,
Tuple,
Union,
)
class CookieStorage:
def _decode(self, data: Optional[str]) -> Any: ...
def _encode(
self,
messages: Union[List[Message], List[str]],
encode_empty: bool = ...
) -> Optional[str]: ...
def _get(
self,
*args,
**kwargs
) -> Union[Tuple[None, bool], Tuple[List[Any], bool], Tuple[List[str], bool], Tuple[List[Message], bool]]: ...
def _hash(self, value: str) -> str: ...
def _store(
self,
messages: List[Message],
response: HttpResponse,
remove_oldest: bool = ...,
*args,
**kwargs
) -> List[Message]: ...
def _update_cookie(self, encoded_data: Optional[str], response: HttpResponse) -> None: ...
class MessageDecoder:
def decode(
self,
s: str,
**kwargs
) -> Union[List[Union[Message, str]], List[Message], List[str]]: ...
def process_messages(self, obj: Any) -> Any: ...
class MessageEncoder:
from typing import Any, List, Optional, Tuple, Union
class MessageEncoder(json.JSONEncoder):
message_key: str = ...
def default(self, obj: Message) -> List[Union[int, str]]: ...
class MessageDecoder(json.JSONDecoder):
def process_messages(self, obj: Any) -> Any: ...
def decode(self, s: str, **kwargs: Any) -> Union[List[Union[Message, str]], List[Message], List[str]]: ...
class CookieStorage(BaseStorage):
cookie_name: str = ...
max_cookie_size: int = ...
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: ...

View File

@@ -1,24 +1,17 @@
# Stubs for django.contrib.messages.storage.fallback (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
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:
def __init__(self, *args, **kwargs) -> None: ...
def _get(
self,
*args,
**kwargs
) -> Union[Tuple[List[Any], bool], Tuple[List[str], bool], Tuple[List[Message], bool]]: ...
def _store(
self,
messages: List[Message],
response: HttpResponse,
*args,
**kwargs
) -> List[Any]: ...
from typing import Any, List, Tuple, Union
class FallbackStorage(BaseStorage):
storage_classes: Any = ...
storages: Any = ...
_used_storages: Any = ...
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]: ...

View File

@@ -1,31 +1,18 @@
# Stubs for django.contrib.messages.storage.session (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from django.contrib.messages.storage.base import BaseStorage
from typing import Any
from django.contrib.messages.storage.base import Message
from django.http.request import HttpRequest
from django.http.response import HttpResponse
from typing import (
Any,
List,
Optional,
Tuple,
Union,
)
class SessionStorage:
def __init__(self, request: HttpRequest, *args, **kwargs) -> None: ...
def _get(
self,
*args,
**kwargs
) -> Union[Tuple[None, bool], Tuple[List[str], bool], Tuple[List[Message], bool]]: ...
def _store(
self,
messages: List[Message],
response: HttpResponse,
*args,
**kwargs
) -> List[Any]: ...
def deserialize_messages(
self,
data: Optional[str]
) -> Optional[Union[List[Message], List[str]]]: ...
from typing import Any, List, Optional, Tuple, Union
class SessionStorage(BaseStorage):
session_key: str = ...
def __init__(self, request: HttpRequest, *args: Any, **kwargs: Any) -> None: ...
def _get(self, *args: Any, **kwargs: Any) -> Union[Tuple[None, bool], Tuple[List[str], bool], Tuple[List[Message], bool]]: ...
def _store(self, messages: List[Message], response: HttpResponse, *args: Any, **kwargs: Any) -> List[Any]: ...
def serialize_messages(self, messages: Union[List[Message], List[str]]) -> str: ...
def deserialize_messages(self, data: Optional[str]) -> Optional[Union[List[Message], List[str]]]: ...

View File

@@ -1,4 +1,6 @@
# Stubs for django.contrib.messages.utils (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Dict
def get_level_tags() -> Dict[int, str]: ...

View File

@@ -1,43 +1,66 @@
from datetime import (
datetime,
timedelta,
)
from django.db.models.base import Model
from typing import (
Dict,
Optional,
Union,
)
# 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 django.db.models.base import Model
from typing import Dict, Optional, Union
VALID_KEY_CHARS: Any
class CreateError(Exception): ...
class UpdateError(Exception): ...
class SessionBase:
def __contains__(self, key: str) -> bool: ...
def __delitem__(self, key: str) -> None: ...
def __getitem__(self, key: str) -> Union[str, Model, int]: ...
TEST_COOKIE_NAME: str = ...
TEST_COOKIE_VALUE: str = ...
__not_given: Any = ...
_session_key: Any = ...
accessed: bool = ...
modified: bool = ...
serializer: Any = ...
def __init__(self, session_key: Optional[str] = ...) -> None: ...
def __contains__(self, key: str) -> bool: ...
def __getitem__(self, key: str) -> Union[str, Model, int]: ...
def __setitem__(self, key: str, value: Union[str, datetime, int]) -> None: ...
def __delitem__(self, key: str) -> None: ...
def get(self, key: str, default: Optional[str] = ...) -> Optional[Union[str, datetime, int]]: ...
def pop(self, key: str, default: object = ...) -> Union[str, int]: ...
def setdefault(self, key: str, value: str) -> str: ...
def set_test_cookie(self) -> None: ...
def test_cookie_worked(self) -> bool: ...
def delete_test_cookie(self) -> None: ...
def _hash(self, value: bytes) -> str: ...
def encode(self, session_dict: Dict[str, Union[str, int, datetime]]) -> str: ...
def decode(self, session_data: Union[str, bytes]) -> Dict[str, Union[str, int]]: ...
def update(self, dict_: Dict[str, int]) -> None: ...
def has_key(self, key: Any): ...
def keys(self): ...
def values(self): ...
def items(self): ...
_session_cache: Any = ...
def clear(self) -> None: ...
def is_empty(self) -> bool: ...
def _get_new_session_key(self) -> str: ...
def _get_or_create_session_key(self) -> str: ...
def _get_session(
self,
no_load: bool = ...
) -> Dict[str, Union[str, int, datetime, Model]]: ...
def _get_session_key(self) -> Optional[str]: ...
def _hash(self, value: bytes) -> str: ...
def _set_session_key(self, value: Optional[str]) -> None: ...
def _validate_session_key(self, key: Optional[str]) -> Optional[Union[str, bool]]: ...
def clear(self) -> None: ...
def cycle_key(self) -> None: ...
def decode(self, session_data: Union[str, bytes]) -> Dict[str, Union[str, int]]: ...
def encode(self, session_dict: Dict[str, Union[str, int, datetime]]) -> str: ...
def flush(self) -> None: ...
def get(self, key: str, default: Optional[str] = ...) -> Optional[Union[str, datetime, int]]: ...
def get_expire_at_browser_close(self) -> bool: ...
def get_expiry_age(self, **kwargs) -> int: ...
def get_expiry_date(self, **kwargs) -> datetime: ...
def is_empty(self) -> bool: ...
def pop(self, key: str, default: object = ...) -> Union[str, int]: ...
def _get_session_key(self) -> Optional[str]: ...
__session_key: Any = ...
def _set_session_key(self, value: Optional[str]) -> None: ...
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_date(self, **kwargs: Any) -> datetime: ...
def set_expiry(self, value: Optional[Union[datetime, int, timedelta]]) -> None: ...
def setdefault(self, key: str, value: str) -> str: ...
def test_cookie_worked(self) -> bool: ...
def update(self, dict_: Dict[str, int]) -> None: ...
def get_expire_at_browser_close(self) -> bool: ...
def flush(self) -> None: ...
def cycle_key(self) -> None: ...
def exists(self, session_key: Any) -> None: ...
def create(self) -> None: ...
def save(self, must_create: bool = ...) -> None: ...
def delete(self, session_key: Optional[Any] = ...) -> None: ...
def load(self) -> None: ...
@classmethod
def clear_expired(cls) -> None: ...

View File

@@ -1,16 +1,25 @@
from typing import (
Any,
Dict,
Optional,
)
# Stubs for django.contrib.sessions.backends.cache (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from django.contrib.sessions.backends.base import SessionBase
from typing import Any, Optional
class SessionStore:
from typing import Any, Dict, Optional
KEY_PREFIX: str
class SessionStore(SessionBase):
cache_key_prefix: Any = ...
_cache: Any = ...
def __init__(self, session_key: None = ...) -> None: ...
@property
def cache_key(self) -> str: ...
def create(self) -> None: ...
def delete(self, session_key: Optional[str] = ...) -> None: ...
def exists(self, session_key: Optional[str]) -> bool: ...
_session_key: Any = ...
def load(self) -> Dict[Any, Any]: ...
modified: bool = ...
def create(self) -> None: ...
def save(self, must_create: bool = ...) -> None: ...
def exists(self, session_key: Optional[str]) -> bool: ...
def delete(self, session_key: Optional[str] = ...) -> None: ...
@classmethod
def clear_expired(cls) -> None: ...

View File

@@ -1,16 +1,22 @@
from typing import (
Any,
Dict,
Optional,
)
# Stubs for django.contrib.sessions.backends.cached_db (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from django.contrib.sessions.backends.db import SessionStore as DBStore
from typing import Any, Optional
class SessionStore:
from typing import Any, Dict, Optional
KEY_PREFIX: str
class SessionStore(DBStore):
cache_key_prefix: Any = ...
_cache: Any = ...
def __init__(self, session_key: Optional[str] = ...) -> None: ...
@property
def cache_key(self) -> str: ...
def delete(self, session_key: Optional[str] = ...) -> None: ...
def exists(self, session_key: str) -> bool: ...
def flush(self) -> None: ...
def load(self) -> Dict[Any, Any]: ...
def exists(self, session_key: str) -> bool: ...
def save(self, must_create: bool = ...) -> None: ...
def delete(self, session_key: Optional[str] = ...) -> None: ...
_session_key: Any = ...
def flush(self) -> None: ...

View File

@@ -1,29 +1,27 @@
# Stubs for django.contrib.sessions.backends.db (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
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.models import Session
from typing import (
Dict,
Optional,
Type,
Union,
)
class SessionStore:
from typing import Dict, Optional, Type, Union
class SessionStore(SessionBase):
def __init__(self, session_key: Optional[str] = ...) -> None: ...
def _get_session_from_db(self) -> Optional[AbstractBaseSession]: ...
@classmethod
def clear_expired(cls) -> None: ...
def create(self) -> None: ...
def create_model_instance(
self,
data: Dict[str, Union[str, int, datetime]]
) -> AbstractBaseSession: ...
def delete(self, session_key: Optional[str] = ...) -> None: ...
def exists(self, session_key: Optional[str]) -> bool: ...
@classmethod
def get_model_class(cls) -> Type[Session]: ...
def load(self) -> Dict[str, Union[str, int]]: ...
@cached_property
def model(self) -> Type[AbstractBaseSession]: ...
_session_key: Any = ...
def _get_session_from_db(self) -> Optional[AbstractBaseSession]: ...
def load(self) -> Dict[str, Union[str, int]]: ...
def exists(self, session_key: Optional[str]) -> bool: ...
modified: bool = ...
def create(self) -> None: ...
def create_model_instance(self, data: Dict[str, Union[str, int, datetime]]) -> AbstractBaseSession: ...
def save(self, must_create: bool = ...) -> None: ...
def delete(self, session_key: Optional[str] = ...) -> None: ...
@classmethod
def clear_expired(cls) -> None: ...

View File

@@ -1,18 +1,27 @@
from typing import (
Dict,
Optional,
)
# Stubs for django.contrib.sessions.backends.file (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from django.contrib.sessions.backends.base import SessionBase
from typing import Any, Optional
class SessionStore:
from typing import Dict, Optional
class SessionStore(SessionBase):
storage_path: Any = ...
file_prefix: Any = ...
def __init__(self, session_key: Optional[str] = ...) -> None: ...
@classmethod
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 = ...
def create(self) -> None: ...
def save(self, must_create: bool = ...) -> None: ...
def exists(self, session_key: Optional[str]) -> bool: ...
def delete(self, session_key: Optional[str] = ...) -> None: ...
def clean(self) -> None: ...
@classmethod
def clear_expired(cls) -> None: ...
def create(self) -> None: ...
def delete(self, session_key: Optional[str] = ...) -> None: ...
def exists(self, session_key: Optional[str]) -> bool: ...
def load(self) -> Dict[str, str]: ...
def save(self, must_create: bool = ...) -> None: ...

View File

@@ -1,14 +1,22 @@
# Stubs for django.contrib.sessions.backends.signed_cookies (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
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:
def _get_session_key(self) -> str: ...
def delete(self, session_key: Optional[str] = ...) -> None: ...
def exists(self, session_key: str = ...) -> bool: ...
from typing import Dict, Optional, Union
class SessionStore(SessionBase):
def load(self) -> Dict[str, Union[str, datetime]]: ...
modified: bool = ...
def create(self) -> None: ...
_session_key: Any = ...
def save(self, must_create: bool = ...) -> None: ...
def exists(self, session_key: str = ...) -> bool: ...
_session_cache: Any = ...
def delete(self, session_key: Optional[str] = ...) -> None: ...
def cycle_key(self) -> None: ...
def _get_session_key(self) -> str: ...
@classmethod
def clear_expired(cls) -> None: ...

View File

@@ -1,16 +1,16 @@
# Stubs for django.contrib.sessions.middleware (Python 3.6)
#
# 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.http.response import HttpResponseBase
from typing import (
Callable,
Optional,
)
class SessionMiddleware:
from typing import Callable, Optional
class SessionMiddleware(MiddlewareMixin):
get_response: Any = ...
SessionStore: Any = ...
def __init__(self, get_response: Optional[Callable] = ...) -> None: ...
def process_request(self, request: WSGIRequest) -> None: ...
def process_response(
self,
request: WSGIRequest,
response: HttpResponseBase
) -> HttpResponseBase: ...
def process_response(self, request: WSGIRequest, response: HttpResponseBase) -> HttpResponseBase: ...

View File

@@ -1,11 +1,14 @@
# Stubs for django.contrib.sessions.serializers (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from django.core.signing import JSONSerializer as BaseJSONSerializer
from typing import Any
from datetime import datetime
from django.db.models.base import Model
from typing import (
Dict,
Union,
)
from typing import Dict, Union
class PickleSerializer:
def dumps(self, obj: Dict[str, Union[str, datetime]]) -> bytes: ...
def loads(self, data: bytes) -> Dict[str, Model]: ...
JSONSerializer = BaseJSONSerializer

View File

@@ -1,49 +1,43 @@
# 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 django.contrib.sites.models import Site
from django.contrib.sites.requests import RequestSite
from django.core.paginator import Paginator
from django.db.models.base import Model
from django.db.models.query import QuerySet
from typing import (
Any,
Dict,
List,
Optional,
Union,
)
def _get_sitemap_full_url(sitemap_url: None): ...
from typing import Any, Dict, List, Optional, Union
PING_URL: str
class SitemapNotFound(Exception): ...
def ping_google(sitemap_url: None = ..., ping_url: str = ...) -> None: ...
class GenericSitemap:
def __init__(
self,
info_dict: Dict[str, Union[QuerySet, datetime]],
priority: Optional[float] = ...,
changefreq: Optional[str] = ...,
protocol: Optional[str] = ...
) -> None: ...
def lastmod(self, item: Model) -> None: ...
def _get_sitemap_full_url(sitemap_url: None): ...
class Sitemap:
def _urls(
self,
page: Union[str, int],
protocol: str,
domain: str
) -> Union[List[Dict[str, object]], List[Dict[str, Union[Model, str, None]]]]: ...
def get_urls(
self,
page: Union[str, int] = ...,
site: Optional[Union[RequestSite, Site]] = ...,
protocol: Optional[str] = ...
) -> Union[List[Dict[str, object]], List[Dict[str, Union[Model, str, datetime, None]]]]: ...
limit: int = ...
protocol: Any = ...
def __get(self, name: Any, obj: Any, default: Optional[Any] = ...): ...
def items(self) -> List[Any]: ...
def location(self, obj: Model) -> str: ...
@property
def paginator(self) -> Paginator: ...
def get_urls(self, page: Union[str, int] = ..., site: Optional[Union[RequestSite, Site]] = ..., protocol: Optional[str] = ...) -> Union[List[Dict[str, object]], List[Dict[str, Union[Model, str, datetime, None]]]]: ...
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):
priority: Any = ...
changefreq: Any = ...
queryset: Any = ...
date_field: Any = ...
protocol: Any = ...
def __init__(self, info_dict: Dict[str, Union[QuerySet, datetime]], priority: Optional[float] = ..., changefreq: Optional[str] = ..., protocol: Optional[str] = ...) -> None: ...
def items(self): ...
def lastmod(self, item: Model) -> None: ...
default_app_config: str

View File

@@ -1,35 +1,14 @@
# Stubs for django.contrib.sitemaps.views (Python 3.6)
#
# 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.template.response import TemplateResponse
from typing import (
Callable,
Dict,
Optional,
Type,
Union,
)
def index(
request: WSGIRequest,
sitemaps: Dict[str, Type[Sitemap]],
template_name: str = ...,
content_type: str = ...,
sitemap_url_name: str = ...
) -> TemplateResponse: ...
def sitemap(
request: WSGIRequest,
sitemaps: Dict[str, Union[Type[Sitemap], Type[FlatPageSitemap], GenericSitemap]],
section: Optional[str] = ...,
template_name: str = ...,
content_type: str = ...
) -> TemplateResponse: ...
from typing import Callable, Dict, Optional, Type, Union
def x_robots_tag(func: Callable) -> Callable: ...
def index(request: WSGIRequest, sitemaps: Dict[str, Type[Sitemap]], template_name: str = ..., content_type: str = ..., sitemap_url_name: str = ...) -> TemplateResponse: ...
def sitemap(request: WSGIRequest, sitemaps: Dict[str, Union[Type[Sitemap], Type[FlatPageSitemap], GenericSitemap]], section: Optional[str] = ..., template_name: str = ..., content_type: str = ...) -> TemplateResponse: ...

View File

@@ -1,2 +1,12 @@
class SitesConfig:
# Stubs for django.contrib.sites.apps (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from .management import create_default_site
from django.apps import AppConfig
from typing import Any
class SitesConfig(AppConfig):
name: str = ...
verbose_name: Any = ...
def ready(self) -> None: ...

View File

@@ -1,12 +1,9 @@
# Stubs for django.contrib.sites.management (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
from django.apps.registry import Apps
from django.contrib.sites.apps import SitesConfig
def create_default_site(
app_config: SitesConfig,
verbosity: int = ...,
interactive: bool = ...,
using: str = ...,
apps: Apps = ...,
**kwargs
) -> None: ...
def create_default_site(app_config: SitesConfig, verbosity: int = ..., interactive: bool = ..., using: str = ..., apps: Apps = ..., **kwargs: Any) -> None: ...

View File

@@ -1,11 +1,18 @@
# Stubs for django.contrib.sites.managers (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from django.db import models
from typing import Any, Optional
from django.core.checks.messages import Error
from django.db.models.query import QuerySet
from typing import List
class CurrentSiteManager:
class CurrentSiteManager(models.Manager):
use_in_migrations: bool = ...
__field_name: Any = ...
def __init__(self, field_name: None = ...) -> None: ...
def check(self, **kwargs: Any) -> List[Error]: ...
def _check_field_name(self) -> List[Error]: ...
def _get_field_name(self) -> str: ...
def check(self, **kwargs) -> List[Error]: ...
def get_queryset(self) -> QuerySet: ...

View File

@@ -1,5 +1,11 @@
# Stubs for django.contrib.sites.middleware (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from .shortcuts import get_current_site
from django.utils.deprecation import MiddlewareMixin
from typing import Any
from django.http.request import HttpRequest
class CurrentSiteMiddleware:
class CurrentSiteMiddleware(MiddlewareMixin):
def process_request(self, request: HttpRequest) -> None: ...

View File

@@ -1,6 +1,13 @@
# Stubs for django.contrib.sites.requests (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
from django.http.request import HttpRequest
class RequestSite:
domain: Any = ...
def __init__(self, request: HttpRequest) -> None: ...
def __str__(self) -> str: ...
def save(self, force_insert: bool = ..., force_update: bool = ...) -> None: ...
def delete(self) -> None: ...

View File

@@ -1,12 +1,11 @@
# Stubs for django.contrib.sites.shortcuts (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
from django.contrib.sites.models import Site
from django.contrib.sites.requests import RequestSite
from django.http.request import HttpRequest
from typing import (
Optional,
Union,
)
def get_current_site(
request: Optional[HttpRequest]
) -> Union[RequestSite, Site]: ...
from typing import Optional, Union
def get_current_site(request: Optional[HttpRequest]) -> Union[RequestSite, Site]: ...

View File

@@ -1,2 +1,12 @@
class StaticFilesConfig:
# Stubs for django.contrib.staticfiles.apps (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from django.apps import AppConfig
from typing import Any
class StaticFilesConfig(AppConfig):
name: str = ...
verbose_name: Any = ...
ignore_patterns: Any = ...
def ready(self) -> None: ...

View File

@@ -1,7 +1,8 @@
from typing import (
Any,
List,
)
# Stubs for django.contrib.staticfiles.checks (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any, Optional
def check_finders(app_configs: None = ..., **kwargs) -> List[Any]: ...
from typing import Any, List
def check_finders(app_configs: None = ..., **kwargs: Any) -> List[Any]: ...

View File

@@ -1,55 +1,49 @@
# Stubs for django.contrib.staticfiles.finders (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any, Optional
from django.contrib.staticfiles.storage import StaticFilesStorage
from django.core.checks.messages import Error
from django.core.files.storage import (
DefaultStorage,
FileSystemStorage,
)
from typing import (
Iterator,
List,
Optional,
Tuple,
Union,
)
def find(path: str, all: bool = ...) -> Optional[str]: ...
def get_finder(import_path: str) -> BaseFinder: ...
def get_finders() -> Iterator[BaseFinder]: ...
class AppDirectoriesFinder:
def __init__(self, app_names: None = ..., *args, **kwargs) -> None: ...
def find(self, path: str, all: bool = ...) -> str: ...
def find_in_app(self, app: str, path: str) -> Optional[str]: ...
def list(self, ignore_patterns: List[str]) -> Iterator[Tuple[str, FileSystemStorage]]: ...
from django.core.files.storage import DefaultStorage, FileSystemStorage
from typing import Iterator, List, Optional, Tuple, Union
searched_locations: Any
class BaseFinder:
def check(self, **kwargs): ...
def check(self, **kwargs: Any) -> None: ...
def find(self, path: Any, all: bool = ...) -> None: ...
def list(self, ignore_patterns: Any) -> None: ...
class BaseStorageFinder:
def __init__(
self,
storage: Optional[StaticFilesStorage] = ...,
*args,
**kwargs
) -> None: ...
def list(self, ignore_patterns: List[str]) -> Iterator[Tuple[str, DefaultStorage]]: ...
class DefaultStorageFinder:
def __init__(self, *args, **kwargs) -> None: ...
class FileSystemFinder:
def __init__(self, app_names: None = ..., *args, **kwargs) -> None: ...
def check(self, **kwargs) -> List[Error]: ...
class FileSystemFinder(BaseFinder):
locations: Any = ...
storages: Any = ...
def __init__(self, app_names: None = ..., *args: Any, **kwargs: Any) -> None: ...
def check(self, **kwargs: Any) -> List[Error]: ...
def find(self, path: str, all: bool = ...) -> Union[str, List[str]]: ...
def find_location(self, root: str, path: str, prefix: str = ...) -> Optional[str]: ...
def list(self, ignore_patterns: List[str]) -> Iterator[Tuple[str, FileSystemStorage]]: ...
class AppDirectoriesFinder(BaseFinder):
storage_class: Any = ...
source_dir: str = ...
apps: Any = ...
storages: Any = ...
def __init__(self, app_names: None = ..., *args: Any, **kwargs: Any) -> None: ...
def list(self, ignore_patterns: List[str]) -> Iterator[Tuple[str, FileSystemStorage]]: ...
def find(self, path: str, all: bool = ...) -> str: ...
def find_in_app(self, app: str, path: str) -> Optional[str]: ...
class BaseStorageFinder(BaseFinder):
storage: Any = ...
def __init__(self, storage: Optional[StaticFilesStorage] = ..., *args: Any, **kwargs: Any) -> None: ...
def find(self, path: Any, all: bool = ...): ...
def list(self, ignore_patterns: List[str]) -> Iterator[Tuple[str, DefaultStorage]]: ...
class DefaultStorageFinder(BaseStorageFinder):
storage: Any = ...
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
def find(path: str, all: bool = ...) -> Optional[str]: ...
def get_finders() -> Iterator[BaseFinder]: ...
def get_finder(import_path: str) -> BaseFinder: ...

View File

@@ -1,7 +1,20 @@
# Stubs for django.contrib.staticfiles.handlers (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from django.core.handlers.wsgi import WSGIHandler
from typing import Any
from django.core.handlers.wsgi import WSGIRequest
class StaticFilesHandler:
def file_path(self, url: str) -> str: ...
def get_response(self, request: WSGIRequest): ...
class StaticFilesHandler(WSGIHandler):
handles_files: bool = ...
application: Any = ...
base_url: Any = ...
def __init__(self, application: Any) -> None: ...
def load_middleware(self) -> None: ...
def get_base_url(self): ...
def _should_handle(self, path: Any): ...
def file_path(self, url: str) -> str: ...
def serve(self, request: Any): ...
def get_response(self, request: WSGIRequest): ...
def __call__(self, environ: Any, start_response: Any): ...

View File

@@ -1,82 +1,72 @@
# Stubs for django.contrib.staticfiles.storage (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from django.core.files.storage import FileSystemStorage
from django.utils.functional import LazyObject
from typing import Any, Optional
from collections import OrderedDict
from django.core.cache import DefaultCacheProxy
from django.core.files.base import File
from django.core.files.storage import FileSystemStorage
from django.utils.safestring import SafeText
from typing import (
Callable,
Dict,
Iterator,
List,
Optional,
Tuple,
Union,
)
class CachedFilesMixin:
def __init__(self, *args, **kwargs) -> None: ...
def hash_key(self, name: str) -> str: ...
class ConfiguredStorage:
def _setup(self) -> None: ...
from typing import Callable, Dict, Iterator, List, Optional, Tuple, Union
class StaticFilesStorage(FileSystemStorage):
base_location: Any = ...
location: Any = ...
def __init__(self, location: Optional[str] = ..., base_url: None = ..., *args: Any, **kwargs: Any) -> None: ...
def path(self, name: str) -> str: ...
class HashedFilesMixin:
def __init__(self, *args, **kwargs) -> None: ...
def _post_process(
self,
paths: Union[OrderedDict, Dict[str, Tuple[FileSystemStorage, str]]],
adjustable_paths: List[str],
hashed_files: OrderedDict
) -> Iterator[Tuple[str, str, bool, bool]]: ...
def _stored_name(self, name: str, hashed_files: OrderedDict) -> str: ...
def _url(
self,
hashed_name_func: Callable,
name: str,
force: bool = ...,
hashed_files: Optional[OrderedDict] = ...
) -> str: ...
def clean_name(self, name: str) -> str: ...
default_template: str = ...
max_post_process_passes: int = ...
patterns: Any = ...
_patterns: Any = ...
hashed_files: Any = ...
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
def file_hash(self, name: str, content: File = ...) -> str: ...
def hash_key(self, name: str) -> str: ...
def hashed_name(
self,
name: str,
content: Optional[File] = ...,
filename: Optional[str] = ...
) -> str: ...
def post_process(
self,
paths: OrderedDict,
dry_run: bool = ...,
**options
) -> Iterator[Tuple[str, str, bool]]: ...
def stored_name(self, name: SafeText) -> str: ...
def hashed_name(self, name: str, content: Optional[File] = ..., filename: Optional[str] = ...) -> str: ...
def _url(self, hashed_name_func: Callable, name: str, force: bool = ..., hashed_files: Optional[OrderedDict] = ...) -> str: ...
def url(self, name: SafeText, force: bool = ...) -> str: ...
def url_converter(self, name: str, hashed_files: OrderedDict, template: str = ...) -> Callable: ...
def post_process(self, paths: OrderedDict, dry_run: bool = ..., **options: Any) -> Iterator[Tuple[str, str, bool]]: ...
def _post_process(self, paths: Union[OrderedDict, Dict[str, Tuple[FileSystemStorage, str]]], adjustable_paths: List[str], hashed_files: OrderedDict) -> Iterator[Tuple[str, str, bool, bool]]: ...
def clean_name(self, name: str) -> str: ...
def hash_key(self, name: str) -> str: ...
def _stored_name(self, name: str, hashed_files: OrderedDict) -> str: ...
def stored_name(self, name: SafeText) -> str: ...
class ManifestFilesMixin:
def __init__(self, *args, **kwargs) -> None: ...
def load_manifest(self) -> OrderedDict: ...
def post_process(self, *args, **kwargs) -> None: ...
class ManifestFilesMixin(HashedFilesMixin):
manifest_version: str = ...
manifest_name: str = ...
manifest_strict: bool = ...
hashed_files: Any = ...
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
def read_manifest(self) -> None: ...
def load_manifest(self) -> OrderedDict: ...
def post_process(self, *args: Any, **kwargs: Any) -> None: ...
def save_manifest(self) -> None: ...
def stored_name(self, name: SafeText) -> str: ...
class StaticFilesStorage:
def __init__(self, location: Optional[str] = ..., base_url: None = ..., *args, **kwargs) -> None: ...
def path(self, name: str) -> str: ...
class _MappingCache:
def __getitem__(self, key: str) -> str: ...
cache: Any = ...
def __init__(self, cache: DefaultCacheProxy) -> None: ...
def __setitem__(self, key: str, value: str) -> None: ...
def __getitem__(self, key: str) -> str: ...
def clear(self) -> None: ...
def get(self, key: str, default: None = ...) -> Optional[str]: ...
def update(self, data: OrderedDict) -> None: ...
def get(self, key: str, default: None = ...) -> Optional[str]: ...
class CachedFilesMixin(HashedFilesMixin):
hashed_files: Any = ...
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
def hash_key(self, name: str) -> str: ...
class CachedStaticFilesStorage(CachedFilesMixin, StaticFilesStorage): ...
class ManifestStaticFilesStorage(ManifestFilesMixin, StaticFilesStorage): ...
class ConfiguredStorage(LazyObject):
_wrapped: Any = ...
def _setup(self) -> None: ...
staticfiles_storage: Any

View File

@@ -1,11 +1,12 @@
from django.template.base import (
Parser,
Token,
)
# Stubs for django.contrib.staticfiles.templatetags.staticfiles (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
from django.template.base import Parser, Token
from django.templatetags.static import StaticNode
register: Any
def do_static(
parser: Parser,
token: Token
) -> StaticNode: ...
def static(path: Any): ...
def do_static(parser: Parser, token: Token) -> StaticNode: ...

View File

@@ -1,5 +1,11 @@
# Stubs for django.contrib.staticfiles.urls (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any, Optional
from django.urls.resolvers import URLPattern
from typing import List
urlpatterns: Any
def staticfiles_urlpatterns(prefix: None = ...) -> List[URLPattern]: ...

View File

@@ -1,24 +1,12 @@
# Stubs for django.contrib.staticfiles.utils (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any, Optional
from collections import OrderedDict
from django.core.files.storage import (
DefaultStorage,
FileSystemStorage,
)
from typing import (
Iterator,
List,
Tuple,
Union,
)
def check_settings(base_url: str = ...) -> None: ...
def get_files(
storage: Union[FileSystemStorage, DefaultStorage],
ignore_patterns: List[str] = ...,
location: str = ...
) -> Iterator[str]: ...
from django.core.files.storage import DefaultStorage, FileSystemStorage
from typing import Iterator, List, Tuple, Union
def matches_patterns(path: str, patterns: Union[OrderedDict, List[str], Tuple[str]] = ...) -> bool: ...
def get_files(storage: Union[FileSystemStorage, DefaultStorage], ignore_patterns: List[str] = ..., location: str = ...) -> Iterator[str]: ...
def check_settings(base_url: str = ...) -> None: ...

View File

@@ -1,10 +1,9 @@
# Stubs for django.contrib.staticfiles.views (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
from django.core.handlers.wsgi import WSGIRequest
from django.http.response import FileResponse
def serve(
request: WSGIRequest,
path: str,
insecure: bool = ...,
**kwargs
) -> FileResponse: ...
def serve(request: WSGIRequest, path: str, insecure: bool = ..., **kwargs: Any) -> FileResponse: ...

View File

@@ -1,47 +1,32 @@
# Stubs for django.contrib.syndication.views (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from django.core.exceptions import ObjectDoesNotExist
from typing import Any, Optional
from django.core.handlers.wsgi import WSGIRequest
from django.db.models.base import Model
from django.http.response import HttpResponse
from django.utils.feedgenerator import (
Atom1Feed,
Enclosure,
Rss201rev2Feed,
)
from django.utils.feedgenerator import Atom1Feed, Enclosure, Rss201rev2Feed
from django.utils.safestring import SafeText
from typing import (
Any,
Dict,
List,
Optional,
Union,
)
from typing import Any, Dict, List, Optional, Union
def add_domain(domain: str, url: str, secure: bool = ...) -> str: ...
class FeedDoesNotExist(ObjectDoesNotExist): ...
class Feed:
def __call__(
self,
request: WSGIRequest,
*args,
**kwargs
) -> HttpResponse: ...
def _get_dynamic_attr(
self,
attname: str,
obj: Optional[Model],
default: Optional[str] = ...
) -> Any: ...
def feed_extra_kwargs(self, obj: None) -> Dict[Any, Any]: ...
def get_context_data(self, **kwargs) -> Dict[str, Model]: ...
def get_feed(
self,
obj: None,
request: WSGIRequest
) -> Union[Atom1Feed, Rss201rev2Feed]: ...
def get_object(self, request: WSGIRequest, *args, **kwargs) -> None: ...
def item_description(self, item: Model) -> str: ...
def item_enclosures(self, item: Model) -> List[Enclosure]: ...
def item_extra_kwargs(self, item: Model) -> Dict[Any, Any]: ...
def item_link(self, item: Model) -> str: ...
feed_type: Any = ...
title_template: Any = ...
description_template: Any = ...
def __call__(self, request: WSGIRequest, *args: Any, **kwargs: Any) -> HttpResponse: ...
def item_title(self, item: Model) -> SafeText: ...
def item_description(self, item: Model) -> str: ...
def item_link(self, item: Model) -> str: ...
def item_enclosures(self, item: Model) -> List[Enclosure]: ...
def _get_dynamic_attr(self, attname: str, obj: Optional[Model], default: Optional[str] = ...) -> Any: ...
def feed_extra_kwargs(self, obj: None) -> Dict[Any, Any]: ...
def item_extra_kwargs(self, item: Model) -> Dict[Any, Any]: ...
def get_object(self, request: WSGIRequest, *args: Any, **kwargs: Any) -> None: ...
def get_context_data(self, **kwargs: Any) -> Dict[str, Model]: ...
def get_feed(self, obj: None, request: WSGIRequest) -> Union[Atom1Feed, Rss201rev2Feed]: ...

View File

@@ -1,43 +1,46 @@
from collections import OrderedDict
from typing import (
Any,
Callable,
Dict,
List,
Optional,
Union,
)
# Stubs for django.core.cache.backends.base (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from django.core.exceptions import ImproperlyConfigured
from typing import Any, Optional
from collections import OrderedDict
from typing import Any, Callable, Dict, List, Optional, Union
class InvalidCacheBackendError(ImproperlyConfigured): ...
class CacheKeyWarning(RuntimeWarning): ...
DEFAULT_TIMEOUT: Any
MEMCACHE_MAX_KEY_LENGTH: int
def default_key_func(key: Union[str, int], key_prefix: str, version: Union[str, int]) -> str: ...
def get_key_func(key_func: Optional[Union[str, Callable]]) -> Callable: ...
class BaseCache:
def __contains__(self, key: str) -> bool: ...
default_timeout: Any = ...
_max_entries: Any = ...
_cull_frequency: Any = ...
key_prefix: Any = ...
version: Any = ...
key_func: Any = ...
def __init__(self, params: Dict[str, Any]) -> None: ...
def close(self, **kwargs) -> None: ...
def decr(self, key: str, delta: int = ..., version: Optional[int] = ...) -> int: ...
def decr_version(self, key: str, delta: int = ..., version: Optional[int] = ...) -> int: ...
def delete_many(self, keys: List[str], version: None = ...) -> None: ...
def get_backend_timeout(self, timeout: object = ...) -> Optional[float]: ...
def get_many(self, keys: List[str], version: Optional[int] = ...) -> Dict[str, Union[str, int]]: ...
def get_or_set(
self,
key: str,
default: Optional[Union[str, int, Callable]],
timeout: object = ...,
version: Optional[int] = ...
) -> Optional[Union[str, int]]: ...
def incr(self, key: str, delta: int = ..., version: Optional[int] = ...) -> int: ...
def incr_version(self, key: str, delta: int = ..., version: Optional[int] = ...) -> int: ...
def make_key(self, key: Union[str, int], version: Optional[Union[str, int]] = ...) -> str: ...
def set_many(
self,
data: Union[Dict[str, Union[Dict[str, int], str]], OrderedDict, Dict[str, str], Dict[str, int]],
timeout: object = ...,
version: Optional[int] = ...
) -> List[Any]: ...
def add(self, key: Any, value: Any, timeout: Any = ..., version: Optional[Any] = ...) -> None: ...
def get(self, key: Any, default: Optional[Any] = ..., version: Optional[Any] = ...) -> None: ...
def set(self, key: Any, value: Any, timeout: Any = ..., version: Optional[Any] = ...) -> None: ...
def touch(self, key: Any, timeout: Any = ..., version: Optional[Any] = ...) -> None: ...
def delete(self, key: Any, version: Optional[Any] = ...) -> None: ...
def get_many(self, keys: List[str], version: Optional[int] = ...) -> Dict[str, Union[str, int]]: ...
def get_or_set(self, key: str, default: Optional[Union[str, int, Callable]], timeout: object = ..., version: Optional[int] = ...) -> Optional[Union[str, int]]: ...
def has_key(self, key: Any, version: Optional[Any] = ...): ...
def incr(self, key: str, delta: int = ..., version: Optional[int] = ...) -> int: ...
def decr(self, key: str, delta: int = ..., version: Optional[int] = ...) -> int: ...
def __contains__(self, key: str) -> bool: ...
def set_many(self, data: Union[Dict[str, Union[Dict[str, int], str]], OrderedDict, Dict[str, str], Dict[str, int]], timeout: object = ..., version: Optional[int] = ...) -> List[Any]: ...
def delete_many(self, keys: List[str], version: None = ...) -> None: ...
def clear(self) -> None: ...
def validate_key(self, key: str) -> None: ...
def incr_version(self, key: str, delta: int = ..., version: Optional[int] = ...) -> int: ...
def decr_version(self, key: str, delta: int = ..., version: Optional[int] = ...) -> int: ...
def close(self, **kwargs: Any) -> None: ...

View File

@@ -1,35 +1,38 @@
# Stubs for django.core.cache.backends.db (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from django.core.cache.backends.base import BaseCache
from typing import Any, Optional
from datetime import datetime
from django.db.backends.utils import CursorWrapper
from typing import (
Any,
Callable,
Dict,
Optional,
Union,
)
from typing import Any, Callable, Dict, Optional, Union
class Options:
db_table: Any = ...
app_label: str = ...
model_name: str = ...
verbose_name: str = ...
verbose_name_plural: str = ...
object_name: str = ...
abstract: bool = ...
managed: bool = ...
proxy: bool = ...
swapped: bool = ...
def __init__(self, table: str) -> None: ...
class BaseDatabaseCache:
class BaseDatabaseCache(BaseCache):
_table: Any = ...
cache_model_class: Any = ...
def __init__(self, table: str, params: Dict[str, Union[Callable, Dict[str, int], str, int]]) -> None: ...
class DatabaseCache:
def _base_set(self, mode: str, key: str, value: object, timeout: object = ...): ...
def _cull(self, db: str, cursor: CursorWrapper, now: datetime) -> None: ...
def add(
self,
key: str,
value: Union[str, bytes, Dict[str, int], int],
timeout: object = ...,
version: Optional[int] = ...
) -> bool: ...
def clear(self) -> None: ...
def delete(self, key: str, version: Optional[int] = ...) -> None: ...
class DatabaseCache(BaseDatabaseCache):
def get(self, key: str, default: Optional[Union[str, int]] = ..., version: Optional[int] = ...) -> Any: ...
def has_key(self, key: str, version: Optional[int] = ...): ...
def set(self, key: str, value: Any, timeout: object = ..., version: Optional[int] = ...) -> None: ...
def add(self, key: str, value: Union[str, bytes, Dict[str, int], int], timeout: object = ..., version: Optional[int] = ...) -> bool: ...
def touch(self, key: str, timeout: Optional[int] = ..., version: None = ...) -> bool: ...
class Options:
def __init__(self, table: str) -> None: ...
def _base_set(self, mode: str, key: str, value: object, timeout: object = ...): ...
def delete(self, key: str, version: Optional[int] = ...) -> None: ...
def has_key(self, key: str, version: Optional[int] = ...): ...
def _cull(self, db: str, cursor: CursorWrapper, now: datetime) -> None: ...
def clear(self) -> None: ...

View File

@@ -1,20 +1,17 @@
from typing import (
Any,
Dict,
Optional,
Union,
)
# Stubs for django.core.cache.backends.dummy (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from django.core.cache.backends.base import BaseCache
from typing import Any, Optional
class DummyCache:
def __init__(self, host: str, *args, **kwargs) -> None: ...
from typing import Any, Dict, Optional, Union
class DummyCache(BaseCache):
def __init__(self, host: str, *args: Any, **kwargs: Any) -> None: ...
def add(self, key: str, value: str, timeout: object = ..., version: None = ...) -> bool: ...
def get(self, key: str, default: Optional[str] = ..., version: Optional[int] = ...) -> Optional[str]: ...
def set(self, key: str, value: Union[str, Dict[str, Any], int], timeout: object = ..., version: Optional[str] = ...) -> None: ...
def touch(self, key: Any, timeout: Any = ..., version: Optional[Any] = ...): ...
def delete(self, key: Any, version: Optional[Any] = ...) -> None: ...
def has_key(self, key: str, version: None = ...) -> bool: ...
def set(
self,
key: str,
value: Union[str, Dict[str, Any], int],
timeout: object = ...,
version: Optional[str] = ...
) -> None: ...
def clear(self) -> None: ...

View File

@@ -1,44 +1,28 @@
from io import (
BufferedRandom,
BufferedReader,
BufferedWriter,
)
from typing import (
Any,
Callable,
Dict,
List,
Optional,
Union,
)
# Stubs for django.core.cache.backends.filebased (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from django.core.cache.backends.base import BaseCache
from typing import Any, Optional
from io import BufferedRandom, BufferedReader, BufferedWriter
from typing import Any, Callable, Dict, List, Optional, Union
def _write_content(f: Union[BufferedRandom, BufferedWriter], expiry: float, value: object) -> None: ...
class FileBasedCache:
class FileBasedCache(BaseCache):
cache_suffix: str = ...
_dir: Any = ...
def __init__(self, dir: str, params: Dict[str, Union[Callable, int]]) -> None: ...
def _createdir(self) -> None: ...
def _cull(self) -> None: ...
def _delete(self, fname: str) -> None: ...
def _is_expired(self, f: BufferedReader) -> bool: ...
def _key_to_file(self, key: str, version: Optional[int] = ...) -> str: ...
def _list_cache_files(self) -> List[str]: ...
def add(
self,
key: str,
value: Union[str, bytes, int],
timeout: object = ...,
version: Optional[int] = ...
) -> bool: ...
def clear(self) -> None: ...
def delete(self, key: str, version: Optional[int] = ...) -> None: ...
def get(
self,
key: str,
default: Optional[Union[str, int]] = ...,
version: Optional[int] = ...
) -> Optional[str]: ...
def has_key(self, key: str, version: Optional[int] = ...) -> bool: ...
def add(self, key: str, value: Union[str, bytes, int], timeout: object = ..., version: Optional[int] = ...) -> bool: ...
def get(self, key: str, default: Optional[Union[str, int]] = ..., version: Optional[int] = ...) -> Optional[str]: ...
def set(self, key: str, value: Any, timeout: object = ..., version: Optional[int] = ...) -> None: ...
def touch(self, key: str, timeout: object = ..., version: None = ...): ...
def delete(self, key: str, version: Optional[int] = ...) -> None: ...
def _delete(self, fname: str) -> None: ...
def has_key(self, key: str, version: Optional[int] = ...) -> bool: ...
def _cull(self) -> None: ...
def _createdir(self) -> None: ...
def _key_to_file(self, key: str, version: Optional[int] = ...) -> str: ...
def clear(self) -> None: ...
def _is_expired(self, f: BufferedReader) -> bool: ...
def _list_cache_files(self) -> List[str]: ...

View File

@@ -1,38 +1,29 @@
from typing import (
Any,
Dict,
Optional,
Union,
)
# Stubs for django.core.cache.backends.locmem (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from django.core.cache.backends.base import BaseCache
from typing import Any, Optional
class LocMemCache:
from typing import Any, Dict, Optional, Union
_caches: Any
_expire_info: Any
_locks: Any
class LocMemCache(BaseCache):
_cache: Any = ...
_expire_info: Any = ...
_lock: Any = ...
def __init__(self, name: str, params: Dict[str, Any]) -> None: ...
def _delete(self, key: str) -> None: ...
def _has_expired(self, key: str) -> bool: ...
def add(self, key: str, value: Union[int, str, Dict[str, str], Dict[str, int]], timeout: object = ..., version: Optional[int] = ...): ...
def get(self, key: Union[str, int], default: Optional[Union[str, int]] = ..., version: Optional[int] = ...) -> Any: ...
def _set(self, key: str, value: bytes, timeout: object = ...) -> None: ...
def add(
self,
key: str,
value: Union[int, str, Dict[str, str], Dict[str, int]],
timeout: object = ...,
version: Optional[int] = ...
): ...
def clear(self) -> None: ...
def delete(self, key: str, version: Optional[int] = ...) -> None: ...
def get(
self,
key: Union[str, int],
default: Optional[Union[str, int]] = ...,
version: Optional[int] = ...
) -> Any: ...
def has_key(self, key: str, version: Optional[int] = ...): ...
def incr(self, key: Union[str, int], delta: int = ..., version: Optional[int] = ...) -> int: ...
def set(
self,
key: Union[str, int],
value: object,
timeout: object = ...,
version: Optional[int] = ...
) -> None: ...
def set(self, key: Union[str, int], value: object, timeout: object = ..., version: Optional[int] = ...) -> None: ...
def touch(self, key: str, timeout: object = ..., version: None = ...): ...
def incr(self, key: Union[str, int], delta: int = ..., version: Optional[int] = ...) -> int: ...
def has_key(self, key: str, version: Optional[int] = ...): ...
def _has_expired(self, key: str) -> bool: ...
def _cull(self) -> None: ...
def _delete(self, key: str) -> None: ...
def delete(self, key: str, version: Optional[int] = ...) -> None: ...
def clear(self) -> None: ...

View File

@@ -1,8 +1,10 @@
from typing import (
List,
Optional,
Union,
)
# Stubs for django.core.cache.utils (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any, Optional
from typing import List, Optional, Union
TEMPLATE_FRAGMENT_KEY_TEMPLATE: str
def make_template_fragment_key(fragment_name: str, vary_on: Optional[Union[List[int], List[str]]] = ...) -> str: ...

View File

@@ -1,5 +1,11 @@
# Stubs for django.core.checks.caches (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
from django.core.checks.messages import Error
from typing import List
E001: Any
def check_default_cache_is_configured(app_configs: None, **kwargs) -> List[Error]: ...
def check_default_cache_is_configured(app_configs: None, **kwargs: Any) -> List[Error]: ...

View File

@@ -1,28 +1,39 @@
from typing import Optional
# Stubs for django.core.checks.messages (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any, Optional
DEBUG: int
INFO: int
WARNING: int
ERROR: int
CRITICAL: int
class CheckMessage:
level: Any = ...
msg: Any = ...
hint: Any = ...
obj: Any = ...
id: Any = ...
def __init__(self, level: int, msg: str, hint: Optional[str] = ..., obj: object = ..., id: Optional[str] = ...) -> None: ...
def __eq__(self, other: CheckMessage) -> bool: ...
def __init__(
self,
level: int,
msg: str,
hint: Optional[str] = ...,
obj: object = ...,
id: Optional[str] = ...
) -> None: ...
def __str__(self) -> str: ...
def __repr__(self): ...
def is_serious(self, level: int = ...) -> bool: ...
def is_silenced(self) -> bool: ...
class Debug(CheckMessage):
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
class Critical:
def __init__(self, *args, **kwargs) -> None: ...
class Info(CheckMessage):
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
class Warning(CheckMessage):
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
class Error:
def __init__(self, *args, **kwargs) -> None: ...
class Error(CheckMessage):
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
class Warning:
def __init__(self, *args, **kwargs) -> None: ...
class Critical(CheckMessage):
def __init__(self, *args: Any, **kwargs: Any) -> None: ...

View File

@@ -1,24 +1,12 @@
# Stubs for django.core.checks.model_checks (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any, Optional
from django.apps.registry import Apps
from django.core.checks.messages import (
Error,
Warning,
)
from typing import (
Any,
List,
Optional,
Set,
Tuple,
)
def _check_lazy_references(
apps: Apps,
ignore: Optional[Set[Tuple[str, str]]] = ...
) -> List[Error]: ...
def check_all_models(app_configs: None = ..., **kwargs) -> List[Warning]: ...
def check_lazy_references(app_configs: None = ..., **kwargs) -> List[Any]: ...
from django.core.checks.messages import Error, Warning
from typing import Any, List, Optional, Set, Tuple
def check_all_models(app_configs: None = ..., **kwargs: Any) -> List[Warning]: ...
def _check_lazy_references(apps: Apps, ignore: Optional[Set[Tuple[str, str]]] = ...) -> List[Error]: ...
def check_lazy_references(app_configs: None = ..., **kwargs: Any) -> List[Any]: ...

View File

@@ -1,20 +1,33 @@
from django.core.checks.messages import Warning
from typing import (
Callable,
List,
Optional,
Union,
)
# Stubs for django.core.checks.registry (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any, Optional
from django.core.checks.messages import Warning
from typing import Callable, List, Optional, Union
class Tags:
admin: str = ...
caches: str = ...
compatibility: str = ...
database: str = ...
models: str = ...
security: str = ...
signals: str = ...
templates: str = ...
urls: str = ...
class CheckRegistry:
registered_checks: Any = ...
deployment_checks: Any = ...
def __init__(self) -> None: ...
def get_checks(self, include_deployment_checks: bool = ...) -> List[Callable]: ...
def register(self, check: Union[str, Callable] = ..., *tags, **kwargs) -> Callable: ...
def run_checks(
self,
app_configs: None = ...,
tags: Optional[List[str]] = ...,
include_deployment_checks: bool = ...
) -> Union[List[int], List[str], List[Warning]]: ...
def register(self, check: Union[str, Callable] = ..., *tags: Any, **kwargs: Any) -> Callable: ...
def run_checks(self, app_configs: None = ..., tags: Optional[List[str]] = ..., include_deployment_checks: bool = ...) -> Union[List[int], List[str], List[Warning]]: ...
def tag_exists(self, tag: str, include_deployment_checks: bool = ...) -> bool: ...
def tags_available(self, deployment_checks: bool = ...): ...
def get_checks(self, include_deployment_checks: bool = ...) -> List[Callable]: ...
registry: Any
register: Any
run_checks: Any
tag_exists: Any

View File

@@ -1,35 +1,37 @@
from django.core.checks.messages import Warning
from typing import (
Any,
List,
)
# Stubs for django.core.checks.security.base (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
from django.core.checks.messages import Warning
from typing import Any, List
SECRET_KEY_MIN_LENGTH: int
SECRET_KEY_MIN_UNIQUE_CHARACTERS: int
W001: Any
W002: Any
W004: Any
W005: Any
W006: Any
W007: Any
W008: Any
W009: Any
W018: Any
W019: Any
W020: Any
W021: Any
def _security_middleware() -> bool: ...
def _xframe_middleware() -> bool: ...
def check_content_type_nosniff(app_configs: None, **kwargs) -> List[Warning]: ...
def check_debug(app_configs: None, **kwargs) -> List[Any]: ...
def check_secret_key(app_configs: None, **kwargs) -> List[Warning]: ...
def check_security_middleware(app_configs: None, **kwargs) -> List[Warning]: ...
def check_ssl_redirect(app_configs: None, **kwargs) -> List[Warning]: ...
def check_sts(app_configs: None, **kwargs) -> List[Warning]: ...
def check_xframe_deny(app_configs: None, **kwargs) -> List[Warning]: ...
def check_xss_filter(app_configs: None, **kwargs) -> List[Warning]: ...
def check_security_middleware(app_configs: None, **kwargs: Any) -> List[Warning]: ...
def check_xframe_options_middleware(app_configs: Any, **kwargs: Any): ...
def check_sts(app_configs: None, **kwargs: Any) -> List[Warning]: ...
def check_sts_include_subdomains(app_configs: Any, **kwargs: Any): ...
def check_sts_preload(app_configs: Any, **kwargs: Any): ...
def check_content_type_nosniff(app_configs: None, **kwargs: Any) -> List[Warning]: ...
def check_xss_filter(app_configs: None, **kwargs: Any) -> List[Warning]: ...
def check_ssl_redirect(app_configs: None, **kwargs: Any) -> List[Warning]: ...
def check_secret_key(app_configs: None, **kwargs: Any) -> List[Warning]: ...
def check_debug(app_configs: None, **kwargs: Any) -> List[Any]: ...
def check_xframe_deny(app_configs: None, **kwargs: Any) -> List[Warning]: ...
def check_allowed_hosts(app_configs: Any, **kwargs: Any): ...

View File

@@ -1,8 +1,14 @@
# Stubs for django.core.checks.security.csrf (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
from django.core.checks.messages import Warning
from typing import List
W003: Any
W016: Any
def _csrf_middleware() -> bool: ...
def check_csrf_middleware(app_configs: None, **kwargs) -> List[Warning]: ...
def check_csrf_middleware(app_configs: None, **kwargs: Any) -> List[Warning]: ...
def check_csrf_cookie_secure(app_configs: Any, **kwargs: Any): ...

View File

@@ -1,13 +1,23 @@
from typing import (
Any,
List,
)
# Stubs for django.core.checks.security.sessions (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
def _session_app() -> bool: ...
from typing import Any, List
def add_session_cookie_message(message: Any): ...
W010: Any
W011: Any
W012: Any
def add_httponly_message(message: Any): ...
W013: Any
W014: Any
W015: Any
def check_session_cookie_secure(app_configs: None, **kwargs: Any) -> List[Any]: ...
def check_session_cookie_httponly(app_configs: Any, **kwargs: Any): ...
def _session_middleware() -> bool: ...
def check_session_cookie_secure(app_configs: None, **kwargs) -> List[Any]: ...
def _session_app() -> bool: ...

View File

@@ -1,11 +1,13 @@
# Stubs for django.core.checks.templates (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
from django.core.checks.messages import Error
from typing import (
Any,
List,
)
from typing import Any, List
E001: Any
E002: Any
def check_setting_app_dirs_loaders(app_configs: None, **kwargs) -> List[Any]: ...
def check_string_if_invalid_is_string(app_configs: None, **kwargs) -> List[Error]: ...
def check_setting_app_dirs_loaders(app_configs: None, **kwargs: Any) -> List[Any]: ...
def check_string_if_invalid_is_string(app_configs: None, **kwargs: Any) -> List[Error]: ...

View File

@@ -1,38 +1,16 @@
from django.core.checks.messages import (
Error,
Warning,
)
from django.urls.resolvers import (
URLPattern,
URLResolver,
)
from typing import (
Any,
Callable,
List,
Tuple,
Union,
)
def E006(name: str) -> Error: ...
# Stubs for django.core.checks.urls (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
from django.core.checks.messages import Error, Warning
from django.urls.resolvers import URLPattern, URLResolver
from typing import Any, Callable, List, Tuple, Union
def check_url_config(app_configs: None, **kwargs: Any) -> List[Warning]: ...
def check_resolver(resolver: Union[URLPattern, URLResolver]) -> Union[List[Warning], List[Error]]: ...
def check_url_namespaces_unique(app_configs: None, **kwargs: Any) -> List[Any]: ...
def _load_all_namespaces(resolver: URLResolver, parents: Tuple = ...) -> List[str]: ...
def check_resolver(
resolver: Union[URLPattern, URLResolver]
) -> Union[List[Warning], List[Error]]: ...
def check_url_config(app_configs: None, **kwargs) -> List[Warning]: ...
def check_url_namespaces_unique(app_configs: None, **kwargs) -> List[Any]: ...
def check_url_settings(app_configs: None, **kwargs) -> List[Error]: ...
def get_warning_for_invalid_pattern(pattern: Tuple[str, Callable]) -> List[Error]: ...
def check_url_settings(app_configs: None, **kwargs: Any) -> List[Error]: ...
def E006(name: str) -> Error: ...

View File

@@ -1,30 +1,48 @@
# Stubs for django.core.exceptions (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any, Optional
from collections.abc import Iterable
from django.forms.utils import ErrorDict
from typing import (
Any,
Dict,
Iterator,
List,
Optional,
Tuple,
Union,
)
from typing import Any, Dict, Iterator, List, Optional, Tuple, Union
class FieldDoesNotExist(Exception): ...
class AppRegistryNotReady(Exception): ...
class ObjectDoesNotExist(Exception):
silent_variable_failure: bool = ...
class ValidationError:
def __init__(
self,
message: Iterable,
code: Optional[str] = ...,
class MultipleObjectsReturned(Exception): ...
class SuspiciousOperation(Exception): ...
class SuspiciousMultipartForm(SuspiciousOperation): ...
class SuspiciousFileOperation(SuspiciousOperation): ...
class DisallowedHost(SuspiciousOperation): ...
class DisallowedRedirect(SuspiciousOperation): ...
class TooManyFieldsSent(SuspiciousOperation): ...
class RequestDataTooBig(SuspiciousOperation): ...
class PermissionDenied(Exception): ...
class ViewDoesNotExist(Exception): ...
class MiddlewareNotUsed(Exception): ...
class ImproperlyConfigured(Exception): ...
class FieldError(Exception): ...
NON_FIELD_ERRORS: str
class ValidationError(Exception):
error_dict: Any = ...
error_list: Any = ...
message: Any = ...
code: Any = ...
params: Any = ...
) -> None: ...
def __iter__(self) -> Iterator[Union[str, Tuple[str, List[str]]]]: ...
def __str__(self) -> str: ...
def __init__(self, message: Iterable, code: Optional[str] = ..., params: Any = ...) -> None: ...
@property
def message_dict(self) -> Dict[str, List[str]]: ...
@property
def messages(self) -> List[str]: ...
def update_error_dict(
self,
error_dict: Union[Dict[str, List[ValidationError]], ErrorDict]
) -> Union[Dict[str, List[ValidationError]], ErrorDict]: ...
def update_error_dict(self, error_dict: Union[Dict[str, List[ValidationError]], ErrorDict]) -> Union[Dict[str, List[ValidationError]], ErrorDict]: ...
def __iter__(self) -> Iterator[Union[str, Tuple[str, List[str]]]]: ...
def __str__(self) -> str: ...
def __repr__(self): ...
class EmptyResultSet(Exception): ...

View File

@@ -1,36 +1,39 @@
from typing import (
Any,
Iterator,
Optional,
Union,
)
# Stubs for django.core.files.base (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from django.core.files.utils import FileProxyMixin
from typing import Any, Optional
def endswith_cr(line: bytes) -> bool: ...
def endswith_lf(line: Union[str, bytes]) -> bool: ...
def equals_lf(line: bytes) -> bool: ...
class ContentFile:
def __bool__(self) -> bool: ...
def __init__(self, content: Union[str, bytes], name: Optional[str] = ...) -> None: ...
def close(self) -> None: ...
class File:
from typing import Any, Iterator, Optional, Union
class File(FileProxyMixin):
DEFAULT_CHUNK_SIZE: Any = ...
file: Any = ...
name: Any = ...
mode: Any = ...
def __init__(self, file: Any, name: Optional[str] = ...) -> None: ...
def __str__(self) -> str: ...
def __repr__(self) -> str: ...
def __bool__(self) -> bool: ...
def __len__(self) -> int: ...
def size(self) -> int: ...
def chunks(self, chunk_size: None = ...) -> Iterator[Union[str, bytes]]: ...
def multiple_chunks(self, chunk_size: Optional[Any] = ...): ...
def __iter__(self) -> Iterator[Union[str, bytes]]: ...
def __enter__(self) -> File: ...
def __exit__(self, exc_type: None, exc_value: None, tb: None) -> None: ...
def __init__(self, file: Any, name: Optional[str] = ...) -> None: ...
def __iter__(self) -> Iterator[Union[str, bytes]]: ...
def __len__(self) -> int: ...
def __repr__(self) -> str: ...
def __str__(self) -> str: ...
def chunks(self, chunk_size: None = ...) -> Iterator[Union[str, bytes]]: ...
def open(self, mode: Optional[Any] = ...): ...
def close(self) -> None: ...
@cached_property
def size(self) -> int: ...
class ContentFile(File):
size: Any = ...
def __init__(self, content: Union[str, bytes], name: Optional[str] = ...) -> None: ...
def __str__(self): ...
def __bool__(self) -> bool: ...
def open(self, mode: Optional[Any] = ...): ...
def close(self) -> None: ...
def write(self, data: Any): ...
def endswith_cr(line: bytes) -> bool: ...
def endswith_lf(line: Union[str, bytes]) -> bool: ...
def equals_lf(line: bytes) -> bool: ...

View File

@@ -1,57 +1,38 @@
from io import (
BytesIO,
StringIO,
)
# Stubs for django.core.files.uploadedfile (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from django.core.files.base import File
from typing import Any, Optional
from io import BytesIO, StringIO
from tempfile import _TemporaryFileWrapper
from typing import (
Iterator,
Optional,
Union,
)
class InMemoryUploadedFile:
def __init__(
self,
file: Union[StringIO, BytesIO],
field_name: Optional[str],
name: str,
content_type: str,
size: int,
charset: Optional[str],
content_type_extra: None = ...
) -> None: ...
def chunks(self, chunk_size: None = ...) -> Iterator[Union[str, bytes]]: ...
def open(self, mode: None = ...) -> InMemoryUploadedFile: ...
class SimpleUploadedFile:
def __init__(self, name: str, content: Optional[bytes], content_type: str = ...) -> None: ...
class TemporaryUploadedFile:
def __init__(
self,
name: str,
content_type: str,
size: int,
charset: str,
content_type_extra: None = ...
) -> None: ...
def close(self) -> None: ...
def temporary_file_path(self) -> str: ...
class UploadedFile:
def __init__(
self,
file: Optional[Union[StringIO, _TemporaryFileWrapper, BytesIO]] = ...,
name: str = ...,
content_type: str = ...,
size: Optional[int] = ...,
charset: Optional[str] = ...,
content_type_extra: None = ...
) -> None: ...
from typing import Iterator, Optional, Union
class UploadedFile(File):
size: Any = ...
content_type: Any = ...
charset: Any = ...
content_type_extra: Any = ...
def __init__(self, file: Optional[Union[StringIO, _TemporaryFileWrapper, BytesIO]] = ..., name: str = ..., content_type: str = ..., size: Optional[int] = ..., charset: Optional[str] = ..., content_type_extra: None = ...) -> None: ...
def __repr__(self) -> str: ...
def _get_name(self) -> str: ...
_name: Any = ...
def _set_name(self, name: str) -> None: ...
name: Any = ...
class TemporaryUploadedFile(UploadedFile):
def __init__(self, name: str, content_type: str, size: int, charset: str, content_type_extra: None = ...) -> None: ...
def temporary_file_path(self) -> str: ...
def close(self) -> None: ...
class InMemoryUploadedFile(UploadedFile):
field_name: Any = ...
def __init__(self, file: Union[StringIO, BytesIO], field_name: Optional[str], name: str, content_type: str, size: int, charset: Optional[str], content_type_extra: None = ...) -> None: ...
def open(self, mode: None = ...) -> InMemoryUploadedFile: ...
def chunks(self, chunk_size: None = ...) -> Iterator[Union[str, bytes]]: ...
def multiple_chunks(self, chunk_size: Optional[Any] = ...): ...
class SimpleUploadedFile(InMemoryUploadedFile):
def __init__(self, name: str, content: Optional[bytes], content_type: str = ...) -> None: ...
@classmethod
def from_dict(cls, file_dict: Any): ...

View File

@@ -1,57 +1,51 @@
# Stubs for django.core.files.uploadhandler (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any, Optional
from io import BytesIO
from django.core.files.uploadedfile import (
InMemoryUploadedFile,
TemporaryUploadedFile,
)
from django.core.files.uploadedfile import InMemoryUploadedFile, TemporaryUploadedFile
from django.core.handlers.wsgi import WSGIRequest
from typing import (
Any,
Dict,
Optional,
Union,
)
from typing import Any, Dict, Optional, Union
class UploadFileException(Exception): ...
class StopUpload(UploadFileException):
connection_reset: Any = ...
def __init__(self, connection_reset: bool = ...) -> None: ...
def __str__(self): ...
def load_handler(path: str, *args, **kwargs) -> FileUploadHandler: ...
class SkipFile(UploadFileException): ...
class StopFutureHandlers(UploadFileException): ...
class FileUploadHandler:
chunk_size: Any = ...
file_name: Any = ...
content_type: Any = ...
content_length: Any = ...
charset: Any = ...
content_type_extra: Any = ...
request: Any = ...
def __init__(self, request: WSGIRequest = ...) -> None: ...
def handle_raw_input(
self,
input_data: WSGIRequest,
META: Dict[str, Any],
content_length: int,
boundary: bytes,
encoding: str = ...
) -> None: ...
def new_file(
self,
field_name: str,
file_name: str,
content_type: str,
content_length: None,
charset: None = ...,
content_type_extra: Dict[Any, Any] = ...
) -> None: ...
def handle_raw_input(self, input_data: WSGIRequest, META: Dict[str, Any], content_length: int, boundary: bytes, encoding: str = ...) -> None: ...
field_name: Any = ...
def new_file(self, field_name: str, file_name: str, content_type: str, content_length: None, charset: None = ..., content_type_extra: Dict[Any, Any] = ...) -> None: ...
def receive_data_chunk(self, raw_data: Any, start: Any) -> None: ...
def file_complete(self, file_size: Any) -> None: ...
def upload_complete(self) -> None: ...
class MemoryFileUploadHandler:
def file_complete(self, file_size: int) -> Optional[InMemoryUploadedFile]: ...
def handle_raw_input(
self,
input_data: Union[BytesIO, WSGIRequest],
META: Dict[str, Any],
content_length: int,
boundary: bytes,
encoding: str = ...
) -> None: ...
def new_file(self, *args, **kwargs) -> None: ...
def receive_data_chunk(self, raw_data: bytes, start: int) -> Optional[bytes]: ...
class TemporaryFileUploadHandler:
def file_complete(self, file_size: int) -> TemporaryUploadedFile: ...
def new_file(self, *args, **kwargs) -> None: ...
class TemporaryFileUploadHandler(FileUploadHandler):
file: Any = ...
def new_file(self, *args: Any, **kwargs: Any) -> None: ...
def receive_data_chunk(self, raw_data: bytes, start: int) -> None: ...
def file_complete(self, file_size: int) -> TemporaryUploadedFile: ...
class MemoryFileUploadHandler(FileUploadHandler):
activated: Any = ...
def handle_raw_input(self, input_data: Union[BytesIO, WSGIRequest], META: Dict[str, Any], content_length: int, boundary: bytes, encoding: str = ...) -> None: ...
file: Any = ...
def new_file(self, *args: Any, **kwargs: Any) -> None: ...
def receive_data_chunk(self, raw_data: bytes, start: int) -> Optional[bytes]: ...
def file_complete(self, file_size: int) -> Optional[InMemoryUploadedFile]: ...
def load_handler(path: str, *args: Any, **kwargs: Any) -> FileUploadHandler: ...

View File

@@ -1,4 +1,27 @@
# Stubs for django.core.files.utils (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
class FileProxyMixin:
encoding: Any = ...
fileno: Any = ...
flush: Any = ...
isatty: Any = ...
newlines: Any = ...
read: Any = ...
readinto: Any = ...
readline: Any = ...
readlines: Any = ...
seek: Any = ...
tell: Any = ...
truncate: Any = ...
write: Any = ...
writelines: Any = ...
@property
def closed(self) -> bool: ...
def readable(self) -> bool: ...
def writable(self): ...
def seekable(self): ...
def __iter__(self): ...

View File

@@ -1,25 +1,23 @@
from django.core.handlers.wsgi import WSGIRequest
from django.http.response import (
FileResponse,
HttpResponse,
HttpResponseBase,
)
from typing import (
Callable,
Union,
)
# Stubs for django.core.handlers.base (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from .exception import convert_exception_to_response, get_exception_response
from typing import Any
from django.core.handlers.wsgi import WSGIRequest
from django.http.response import FileResponse, HttpResponse, HttpResponseBase
from typing import Callable, Union
logger: Any
class BaseHandler:
def _get_response(
self,
request: WSGIRequest
) -> Union[HttpResponse, FileResponse]: ...
def get_response(self, request: WSGIRequest) -> HttpResponseBase: ...
_view_middleware: Any = ...
_template_response_middleware: Any = ...
_exception_middleware: Any = ...
_middleware_chain: Any = ...
def load_middleware(self) -> None: ...
def make_view_atomic(self, view: Callable) -> Callable: ...
def process_exception_by_middleware(
self,
exception: Exception,
request: WSGIRequest
) -> HttpResponse: ...
def get_exception_response(self, request: Any, resolver: Any, status_code: Any, exception: Any): ...
def get_response(self, request: WSGIRequest) -> HttpResponseBase: ...
def _get_response(self, request: WSGIRequest) -> Union[HttpResponse, FileResponse]: ...
def process_exception_by_middleware(self, exception: Exception, request: WSGIRequest) -> HttpResponse: ...

View File

@@ -1,33 +1,16 @@
from django.core.exceptions import (
PermissionDenied,
SuspiciousOperation,
)
# Stubs for django.core.handlers.exception (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any, Optional
from django.core.exceptions import PermissionDenied, SuspiciousOperation
from django.core.handlers.wsgi import WSGIRequest
from django.http.multipartparser import MultiPartParserError
from django.http.response import (
Http404,
HttpResponse,
)
from django.http.response import Http404, HttpResponse
from django.urls.resolvers import URLResolver
from typing import (
Callable,
Union,
)
from typing import Callable, Union
def convert_exception_to_response(get_response: Callable) -> Callable: ...
def get_exception_response(
request: WSGIRequest,
resolver: URLResolver,
status_code: int,
exception: Union[MultiPartParserError, PermissionDenied, Http404, SuspiciousOperation],
sender: None = ...
) -> HttpResponse: ...
def response_for_exception(
request: WSGIRequest,
exc: Exception
) -> HttpResponse: ...
def response_for_exception(request: WSGIRequest, exc: Exception) -> HttpResponse: ...
def get_exception_response(request: WSGIRequest, resolver: URLResolver, status_code: int, exception: Union[MultiPartParserError, PermissionDenied, Http404, SuspiciousOperation], sender: None = ...) -> HttpResponse: ...
def handle_uncaught_exception(request: Any, resolver: Any, exc_info: Any): ...

View File

@@ -1,54 +1,57 @@
# Stubs for django.core.handlers.wsgi (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from django.core.handlers import base
from django.http import HttpRequest
from typing import Any, Optional
from io import BytesIO
from django.http.request import QueryDict
from django.http.response import HttpResponse
from django.test.client import FakePayload
from django.utils.datastructures import MultiValueDict
from typing import (
Any,
Callable,
Dict,
Optional,
Union,
)
def get_bytes_from_wsgi(environ: Dict[str, Any], key: str, default: str) -> bytes: ...
def get_path_info(environ: Dict[str, Any]) -> str: ...
def get_script_name(environ: Dict[str, Any]) -> str: ...
def get_str_from_wsgi(environ: Dict[str, Any], key: str, default: str) -> str: ...
from typing import Any, Callable, Dict, Optional, Union
_slashes_re: Any
class LimitedStream:
def __init__(
self,
stream: Union[str, BytesIO, FakePayload],
limit: int,
buf_size: int = ...
) -> None: ...
stream: Any = ...
remaining: Any = ...
buffer: bytes = ...
buf_size: Any = ...
def __init__(self, stream: Union[str, BytesIO, FakePayload], limit: int, buf_size: int = ...) -> None: ...
def _read_limited(self, size: Optional[int] = ...) -> bytes: ...
def read(self, size: Optional[int] = ...) -> bytes: ...
def readline(self, size: Optional[int] = ...) -> bytes: ...
class WSGIHandler:
def __call__(self, environ: Dict[str, Any], start_response: Callable) -> HttpResponse: ...
def __init__(self, *args, **kwargs) -> None: ...
class WSGIRequest:
@cached_property
class WSGIRequest(HttpRequest):
environ: Any = ...
path_info: Any = ...
path: Any = ...
META: Any = ...
method: Any = ...
encoding: Any = ...
_post_parse_error: bool = ...
_stream: Any = ...
_read_started: bool = ...
resolver_match: Any = ...
def __init__(self, environ: Dict[str, Any]) -> None: ...
def _get_scheme(self) -> str: ...
def GET(self) -> QueryDict: ...
def _get_post(self) -> QueryDict: ...
_post: Any = ...
def _set_post(self, post: QueryDict) -> None: ...
def COOKIES(self) -> Dict[str, str]: ...
@property
def FILES(self) -> MultiValueDict: ...
@cached_property
def GET(self) -> QueryDict: ...
def __init__(self, environ: Dict[str, Any]) -> None: ...
def _get_post(self) -> QueryDict: ...
def _get_scheme(self) -> str: ...
def _set_post(self, post: QueryDict) -> None: ...
POST: Any = ...
class WSGIHandler(base.BaseHandler):
request_class: Any = ...
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
def __call__(self, environ: Dict[str, Any], start_response: Callable) -> HttpResponse: ...
def get_path_info(environ: Dict[str, Any]) -> str: ...
def get_script_name(environ: Dict[str, Any]) -> str: ...
def get_bytes_from_wsgi(environ: Dict[str, Any], key: str, default: str) -> bytes: ...
def get_str_from_wsgi(environ: Dict[str, Any], key: str, default: str) -> str: ...

Some files were not shown because too many files have changed in this diff Show More