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: ... def setup(set_prefix: bool = ...) -> None: ...

View File

@@ -1,21 +1,28 @@
from django.db.models.base import Model # Stubs for django.apps.config (Python 3.6)
from typing import ( #
Any, # NOTE: This dynamically typed stub was automatically generated by stubgen.
Iterator,
Type,
)
from typing import Any
from django.db.models.base import Model
from typing import Any, Iterator, Type
MODELS_MODULE_NAME: str
class AppConfig: 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 __init__(self, app_name: str, app_module: Any) -> None: ...
def __repr__(self): ...
def _path_from_module(self, module: Any) -> str: ... def _path_from_module(self, module: Any) -> str: ...
@classmethod @classmethod
def create(cls, entry: str) -> AppConfig: ... def create(cls, entry: str) -> AppConfig: ...
def get_model(self, model_name: str, require_ready: bool = ...) -> Type[Model]: ... def get_model(self, model_name: str, require_ready: bool = ...) -> Type[Model]: ...
def get_models( def get_models(self, include_auto_created: bool = ..., include_swapped: bool = ...) -> Iterator[Type[Model]]: ...
self,
include_auto_created: bool = ...,
include_swapped: bool = ...
) -> Iterator[Type[Model]]: ...
def import_models(self) -> None: ... def import_models(self) -> None: ...
def ready(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.apps.config import AppConfig
from django.db.migrations.state import AppConfigStub from django.db.migrations.state import AppConfigStub
from django.db.models.base import Model from django.db.models.base import Model
from typing import ( from typing import List, Optional, Tuple, Type, Union
List,
Optional,
Tuple,
Type,
Union,
)
class Apps: class Apps:
def __init__( all_models: Any = ...
self, app_configs: Any = ...
installed_apps: Union[Tuple, List[str], List[AppConfigStub]] = ... stored_app_configs: Any = ...
) -> None: ... 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_apps_ready(self) -> None: ...
def check_models_ready(self) -> None: ... def check_models_ready(self) -> None: ...
def clear_cache(self) -> None: ... def get_app_configs(self): ...
def do_pending_operations(self, model: Type[Model]) -> None: ...
def get_app_config(self, app_label: str) -> AppConfig: ... def get_app_config(self, app_label: str) -> AppConfig: ...
def get_models(self, include_auto_created: bool = ..., include_swapped: bool = ...): ...
def get_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_containing_app_config(self, object_name: str) -> Optional[AppConfig]: ...
def get_model( def get_registered_model(self, app_label: Any, model_name: Any): ...
self, def get_swappable_settings_name(self, to_string: Any): ...
app_label: str, def set_available_apps(self, available: Any) -> None: ...
model_name: None = ..., def unset_available_apps(self) -> None: ...
require_ready: bool = ... def set_installed_apps(self, installed: Any) -> None: ...
) -> Type[Model]: ... 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 ( # Stubs for django.conf (Python 3.6)
Any, #
List, # NOTE: This dynamically typed stub was automatically generated by stubgen.
)
from django.utils.functional import LazyObject
from typing import Any, Optional
class LazySettings: from typing import Any, List
def __delattr__(self, name: str) -> None: ... ENVIRONMENT_VARIABLE: str
class LazySettings(LazyObject):
_wrapped: Any = ...
def _setup(self, name: None = ...) -> None: ...
def __repr__(self): ...
def __getattr__(self, name: str) -> Any: ... def __getattr__(self, name: str) -> Any: ...
def __setattr__(self, name: str, value: object) -> None: ... def __setattr__(self, name: str, value: object) -> None: ...
def _setup(self, name: None = ...): ... def __delattr__(self, name: str) -> None: ...
def configure(self, default_settings: Any = ..., **options): ... def configure(self, default_settings: Any = ..., **options: Any) -> None: ...
@property @property
def configured(self) -> bool: ... def configured(self) -> bool: ...
class Settings: 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 is_overridden(self, setting: str) -> bool: ...
def __repr__(self): ...
class UserSettingsHolder: 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 __delattr__(self, name: str) -> None: ...
def __dir__(self) -> List[str]: ... def __dir__(self) -> List[str]: ...
def __getattr__(self, name: str) -> Any: ... def is_overridden(self, setting: Any): ...
def __init__(self, default_settings: Any) -> None: ... def __repr__(self): ...
def __setattr__(self, name: str, value: Any) -> None: ...
settings = LazySettings() settings = LazySettings()
settings: Any

View File

@@ -1,17 +1,15 @@
from django.urls.resolvers import ( # Stubs for django.conf.urls (Python 3.6)
URLPattern, #
URLResolver, # NOTE: This dynamically typed stub was automatically generated by stubgen.
)
from typing import (
Any,
Optional,
Union,
)
from django.urls import include as include
from typing import Any, Optional
def url( from django.urls.resolvers import URLPattern, URLResolver
regex: str, from typing import Any, Optional, Union
view: Any, handler400: Any
kwargs: Any = ..., handler403: Any
name: Optional[str] = ... handler404: Any
) -> Union[URLPattern, URLResolver]: ... 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 django.urls.resolvers import URLResolver
from typing import ( from typing import Any, List, Tuple, Union
Any, def i18n_patterns(*urls: Any, prefix_default_language: bool = ...) -> Union[List[URLResolver], List[List[Any]]]: ...
List,
Tuple,
Union,
)
def i18n_patterns(
*urls,
prefix_default_language = ...
) -> Union[List[URLResolver], List[List[Any]]]: ...
def is_language_prefix_patterns_used(urlconf: str) -> Tuple[bool, bool]: ... 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 django.urls.resolvers import URLPattern
from typing import ( from typing import Callable, List
Callable, def static(prefix: str, view: Callable = ..., **kwargs: Any) -> List[URLPattern]: ...
List,
)
def static(prefix: str, view: Callable = ..., **kwargs) -> 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: ... 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.contrib.admin.options import ModelAdmin
from django.core.handlers.wsgi import WSGIRequest from django.core.handlers.wsgi import WSGIRequest
from django.db.models.query import QuerySet from django.db.models.query import QuerySet
from django.template.response import TemplateResponse from django.template.response import TemplateResponse
def delete_selected(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: ... def ready(self) -> None: ...
class AdminConfig(SimpleAdminConfig):
class SimpleAdminConfig:
def ready(self) -> None: ... def ready(self) -> None: ...

View File

@@ -1,174 +1,77 @@
from django.contrib.admin.options import ( # Stubs for django.contrib.admin.checks (Python 3.6)
InlineModelAdmin, #
ModelAdmin, # NOTE: This dynamically typed stub was automatically generated by stubgen.
TabularInline,
) from typing import Any
from django.contrib.auth.models import (
Group, from django.contrib.admin.options import InlineModelAdmin, ModelAdmin, TabularInline
User, from django.contrib.auth.models import Group, User
)
from django.core.checks.messages import Error from django.core.checks.messages import Error
from django.db.models.base import Model from django.db.models.base import Model
from typing import ( from typing import Any, List, Tuple, Type, Union
Any, def check_admin_app(app_configs: Any, **kwargs: Any): ...
List, def check_dependencies(**kwargs: Any): ...
Tuple,
Type,
Union,
)
class BaseModelAdminChecks: class BaseModelAdminChecks:
def _check_autocomplete_fields( def check(self, admin_obj: Union[ModelAdmin, InlineModelAdmin], **kwargs: Any) -> List[Error]: ...
self, def _check_autocomplete_fields(self, obj: Union[ModelAdmin, InlineModelAdmin]) -> List[Any]: ...
obj: Union[ModelAdmin, InlineModelAdmin] def _check_autocomplete_fields_item(self, obj: Union[ModelAdmin, InlineModelAdmin], model: Type[Model], field_name: str, label: str) -> List[Any]: ...
) -> List[Any]: ... def _check_raw_id_fields(self, obj: Union[ModelAdmin, InlineModelAdmin]) -> List[Any]: ...
def _check_autocomplete_fields_item( def _check_raw_id_fields_item(self, obj: ModelAdmin, model: Type[Model], field_name: str, label: str) -> List[Any]: ...
self, def _check_fields(self, obj: Union[ModelAdmin, InlineModelAdmin]) -> List[Any]: ...
obj: Union[ModelAdmin, InlineModelAdmin], def _check_fieldsets(self, obj: Union[ModelAdmin, InlineModelAdmin]) -> List[Any]: ...
model: Type[Model], def _check_fieldsets_item(self, obj: Union[ModelAdmin, InlineModelAdmin], model: Type[Model], fieldset: Any, label: str, seen_fields: List[str]) -> List[Any]: ...
field_name: str, 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]: ...
label: str def _check_field_spec_item(self, obj: Union[ModelAdmin, TabularInline], model: Type[Model], field_name: str, label: str) -> List[Any]: ...
) -> List[Any]: ... def _check_exclude(self, obj: Union[ModelAdmin, InlineModelAdmin]) -> List[Any]: ...
def _check_exclude( def _check_form(self, obj: Union[ModelAdmin, InlineModelAdmin]) -> List[Any]: ...
self, def _check_filter_vertical(self, obj: Union[ModelAdmin, InlineModelAdmin]) -> List[Any]: ...
obj: Union[ModelAdmin, InlineModelAdmin] def _check_filter_horizontal(self, obj: Union[ModelAdmin, InlineModelAdmin]) -> List[Any]: ...
) -> List[Any]: ... def _check_filter_item(self, obj: ModelAdmin, model: Type[Union[Group, User]], field_name: str, label: str) -> List[Any]: ...
def _check_field_spec( def _check_radio_fields(self, obj: Union[ModelAdmin, InlineModelAdmin]) -> List[Any]: ...
self, def _check_radio_fields_key(self, obj: Any, model: Any, field_name: Any, label: Any): ...
obj: Union[ModelAdmin, InlineModelAdmin], def _check_radio_fields_value(self, obj: Any, val: Any, label: Any): ...
model: Type[Model], def _check_view_on_site_url(self, obj: Union[ModelAdmin, InlineModelAdmin]) -> List[Any]: ...
fields: Union[str, Tuple[str, str, str, str], Tuple[str, str]], def _check_prepopulated_fields(self, obj: Union[ModelAdmin, InlineModelAdmin]) -> List[Any]: ...
label: str def _check_prepopulated_fields_key(self, obj: Union[ModelAdmin, InlineModelAdmin], model: Type[Model], field_name: str, label: str) -> List[Any]: ...
) -> 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_field_spec_item( def _check_prepopulated_fields_value_item(self, obj: Union[ModelAdmin, TabularInline], model: Type[Model], field_name: str, label: str) -> List[Any]: ...
self, def _check_ordering(self, obj: Union[ModelAdmin, InlineModelAdmin]) -> List[Any]: ...
obj: Union[ModelAdmin, TabularInline], def _check_ordering_item(self, obj: ModelAdmin, model: Type[Model], field_name: str, label: str) -> List[Any]: ...
model: Type[Model], def _check_readonly_fields(self, obj: Union[ModelAdmin, InlineModelAdmin]) -> List[Any]: ...
field_name: str, def _check_readonly_fields_item(self, obj: Union[ModelAdmin, TabularInline], model: Type[Model], field_name: str, label: str) -> List[Any]: ...
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]: ...
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: class InlineModelAdminChecks(BaseModelAdminChecks):
def _check_exclude_of_parent_model( def check(self, inline_obj: Any, **kwargs: Any): ...
self, def _check_exclude_of_parent_model(self, obj: InlineModelAdmin, parent_model: Type[Model]) -> List[Any]: ...
obj: InlineModelAdmin, def _check_relation(self, obj: InlineModelAdmin, parent_model: Type[Model]) -> List[Any]: ...
parent_model: Type[Model]
) -> List[Any]: ...
def _check_extra(self, obj: InlineModelAdmin) -> 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_max_num(self, obj: InlineModelAdmin) -> List[Any]: ...
def _check_min_num(self, obj: InlineModelAdmin) -> List[Any]: ... def _check_min_num(self, obj: InlineModelAdmin) -> List[Any]: ...
def _check_relation( def _check_formset(self, obj: InlineModelAdmin) -> List[Any]: ...
self, def _check_has_add_permission(self, obj: InlineModelAdmin) -> None: ...
obj: InlineModelAdmin,
parent_model: Type[Model] def must_be(type: Any, option: Any, obj: Any, id: Any): ...
) -> List[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 from typing import Callable
def register(*models: Any, site: Optional[Any] = ...) -> Callable: ...
def register(*models, site = ...) -> 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.contrib.admin.options import ModelAdmin
from django.core.handlers.wsgi import WSGIRequest from django.core.handlers.wsgi import WSGIRequest
from django.db.models.base import Model from django.db.models.base import Model
from django.db.models.fields import ( from django.db.models.fields import BooleanField, DateField, Field
BooleanField, from django.db.models.fields.related import ForeignKey, ManyToManyField
DateField,
Field,
)
from django.db.models.fields.related import (
ForeignKey,
ManyToManyField,
)
from django.db.models.fields.reverse_related import ForeignObjectRel from django.db.models.fields.reverse_related import ForeignObjectRel
from django.db.models.query import QuerySet from django.db.models.query import QuerySet
from typing import ( from typing import Callable, Dict, List, Optional, Tuple, Type, Union
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: ...
class ListFilter: class ListFilter:
def __init__( title: Any = ...
self, template: str = ...
request: WSGIRequest, used_parameters: Any = ...
params: Dict[str, str], def __init__(self, request: WSGIRequest, params: Dict[str, str], model: Type[Model], model_admin: ModelAdmin) -> None: ...
model: Type[Model], def has_output(self) -> None: ...
model_admin: ModelAdmin def choices(self, changelist: Any) -> None: ...
) -> None: ... def queryset(self, request: Any, queryset: Any) -> None: ...
def expected_parameters(self) -> None: ...
class SimpleListFilter(ListFilter):
class RelatedFieldListFilter: parameter_name: Any = ...
def __init__( lookup_choices: Any = ...
self, def __init__(self, request: WSGIRequest, params: Dict[str, str], model: Type[Model], model_admin: ModelAdmin) -> None: ...
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: ...
def has_output(self) -> bool: ... def has_output(self) -> bool: ...
def value(self) -> Optional[str]: ... 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.contrib.auth.forms import AdminPasswordChangeForm
from django.db.models.fields import AutoField from django.db.models.fields import AutoField
from django.forms.utils import ErrorDict from django.forms.utils import ErrorDict
from django.forms.widgets import Media from django.forms.widgets import Media
from django.utils.safestring import SafeText from django.utils.safestring import SafeText
from typing import ( from typing import Any, Callable, Dict, Iterator, List, Tuple, Union
Any, ACTION_CHECKBOX_NAME: str
Callable,
Dict,
Iterator,
List,
Tuple,
Union,
)
class ActionForm(forms.Form):
action: Any = ...
select_across: Any = ...
class AdminField: checkbox: Any
def errors(self) -> SafeText: ...
def label_tag(self) -> SafeText: ...
class AdminForm: class AdminForm:
def __init__( prepopulated_fields: Any = ...
self, model_admin: Any = ...
form: AdminPasswordChangeForm, readonly_fields: Any = ...
fieldsets: List[Tuple[None, Dict[str, List[str]]]], 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: Dict[Any, Any],
readonly_fields: None = ...,
model_admin: None = ...
) -> None: ...
def __iter__(self) -> Iterator[Fieldset]: ... def __iter__(self) -> Iterator[Fieldset]: ...
@property @property
def errors(self) -> ErrorDict: ... def errors(self) -> ErrorDict: ...
@property @property
def media(self) -> Media: ...
@property
def non_field_errors(self) -> Callable: ... def non_field_errors(self) -> Callable: ...
@property
def media(self) -> Media: ...
class AdminReadonlyField:
def contents(self) -> SafeText: ...
def label_tag(self) -> SafeText: ...
class Fieldline:
def __iter__(
self
) -> Iterator[Union[AdminField, AdminReadonlyField]]: ...
def errors(self) -> SafeText: ...
class Fieldset: 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 @property
def media(self) -> Media: ... 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: class AdminField:
def __iter__(self) -> Iterator[InlineFieldset]: ... field: Any = ...
def deletion_field(self) -> AdminField: ... is_first: Any = ...
def fk_field(self) -> AdminField: ... is_checkbox: Any = ...
def needs_explicit_pk_field(self) -> Union[bool, AutoField]: ... is_readonly: bool = ...
def pk_field(self) -> AdminField: ... 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: 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 __iter__(self) -> Iterator[InlineAdminForm]: ...
def fields(self) -> Iterator[Dict[str, Any]]: ... def fields(self) -> Iterator[Dict[str, Any]]: ...
def inline_formset_data(self) -> str: ... def inline_formset_data(self) -> str: ...
@property @property
def forms(self): ...
@property
def non_form_errors(self): ...
@property
def media(self) -> Media: ... 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]: ... 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.checks.messages import Error
from django.core.handlers.wsgi import WSGIRequest from django.core.handlers.wsgi import WSGIRequest
from django.db.models.base import Model from django.db.models.base import Model
from django.db.models.fields import Field from django.db.models.fields import Field
from django.db.models.fields.related import ( from django.db.models.fields.related import ForeignKey, ManyToManyField
ForeignKey,
ManyToManyField,
)
from django.db.models.query import QuerySet from django.db.models.query import QuerySet
from django.forms.fields import ( from django.forms.fields import Field, TypedChoiceField
Field, from django.forms.models import ModelChoiceField, ModelMultipleChoiceField
TypedChoiceField,
)
from django.forms.models import (
ModelChoiceField,
ModelMultipleChoiceField,
)
from django.utils.safestring import SafeText from django.utils.safestring import SafeText
from typing import ( from typing import Any, Callable, Dict, List, Optional, Tuple, Union
Any, IS_POPUP_VAR: str
Callable, TO_FIELD_VAR: str
Dict, HORIZONTAL: Any
List, VERTICAL: Any
Optional,
Tuple,
Union,
)
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: 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 __init__(self) -> None: ...
def check(self, **kwargs) -> List[Error]: ... def formfield_for_dbfield(self, db_field: Field, request: object, **kwargs: Any) -> Optional[Field]: ...
def formfield_for_choice_field( def formfield_for_choice_field(self, db_field: Field, request: object, **kwargs: Any) -> TypedChoiceField: ...
self, def get_field_queryset(self, db: None, db_field: Union[ManyToManyField, ForeignKey], request: object) -> Optional[QuerySet]: ...
db_field: Field, def formfield_for_foreignkey(self, db_field: ForeignKey, request: object, **kwargs: Any) -> Optional[ModelChoiceField]: ...
request: object, def formfield_for_manytomany(self, db_field: ManyToManyField, request: WSGIRequest, **kwargs: Any) -> ModelMultipleChoiceField: ...
**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 get_autocomplete_fields(self, request: object) -> Tuple: ... 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_empty_value_display(self) -> SafeText: ...
def get_exclude(self, request: object, obj: Optional[Model] = ...) -> None: ... def get_exclude(self, request: object, obj: Optional[Model] = ...) -> None: ...
def get_field_queryset( def get_fields(self, request: object, obj: Optional[Model] = ...) -> Union[List[str], List[Union[str, Callable]]]: ...
self, def get_fieldsets(self, request: WSGIRequest, obj: Optional[Model] = ...) -> Any: ...
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_ordering(self, request: WSGIRequest) -> Union[List[str], Tuple]: ... def get_ordering(self, request: WSGIRequest) -> Union[List[str], Tuple]: ...
def get_prepopulated_fields( def get_readonly_fields(self, request: object, obj: Optional[Model] = ...) -> Union[List[str], Tuple]: ...
self, def get_prepopulated_fields(self, request: WSGIRequest, obj: Optional[Model] = ...) -> Dict[str, Tuple[str]]: ...
request: WSGIRequest,
obj: Optional[Model] = ...
) -> Dict[str, Tuple[str]]: ...
def get_queryset(self, request: object) -> QuerySet: ... 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_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_add_permission(self, request: WSGIRequest) -> bool: ...
def has_change_permission(self, request: object, obj: Optional[Model] = ...) -> 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_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_module_permission(self, request: object) -> bool: ...
def has_view_permission(
self, class ModelAdmin(BaseModelAdmin):
request: WSGIRequest, list_display: Any = ...
obj: Optional[Model] = ... list_display_links: Any = ...
) -> bool: ... 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.core.handlers.wsgi import WSGIRequest
from django.db.models.base import Model from django.db.models.base import Model
from django.http.response import ( from django.http.response import HttpResponse, HttpResponseRedirect
HttpResponse,
HttpResponseRedirect,
)
from django.template.response import TemplateResponse from django.template.response import TemplateResponse
from django.urls.resolvers import ( from django.urls.resolvers import URLPattern, URLResolver
URLPattern, from typing import Any, Callable, Dict, List, Tuple, Type, Union
URLResolver, all_sites: Any
)
from typing import (
Any,
Callable,
Dict,
List,
Tuple,
Type,
Union,
)
class AlreadyRegistered(Exception): ...
class NotRegistered(Exception): ...
class AdminSite: 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 __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 check(self, app_configs: None) -> List[Any]: ...
def get_action(self, name: str) -> Callable: ... def register(self, model_or_iterable: Any, admin_class: Any = ..., **options: Any) -> None: ...
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 unregister(self, model_or_iterable: Type[Model]) -> None: ... def unregister(self, model_or_iterable: Type[Model]) -> None: ...
def is_registered(self, model: Type[Model]) -> bool: ...
def add_action(self, action: Callable, name: None = ...) -> None: ...
def disable_action(self, name: Any) -> None: ...
def get_action(self, name: str) -> Callable: ...
@property @property
def urls( def actions(self): ...
self @property
) -> Union[Tuple[List[URLPattern], str, str], Tuple[List[Union[URLPattern, URLResolver]], str, str]]: ... 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(LazyObject):
class DefaultAdminSite: _wrapped: Any = ...
def _setup(self) -> None: ... 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.filters import FieldListFilter
from django.contrib.admin.templatetags.base import InclusionAdminNode from django.contrib.admin.templatetags.base import InclusionAdminNode
from django.contrib.admin.views.main import ChangeList from django.contrib.admin.views.main import ChangeList
from django.db.models.base import Model from django.db.models.base import Model
from django.forms.boundfield import BoundField from django.forms.boundfield import BoundField
from django.template.base import ( from django.template.base import Parser, Token
Parser,
Token,
)
from django.template.context import RequestContext from django.template.context import RequestContext
from django.utils.safestring import SafeText from django.utils.safestring import SafeText
from typing import ( from typing import Any, Callable, Dict, Iterator, Optional, Union
Any, register: Any
Callable, DOT: str
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: ...
def paginator_number(cl: ChangeList, i: int) -> SafeText: ... def paginator_number(cl: ChangeList, i: int) -> SafeText: ...
def pagination(cl: ChangeList) -> Dict[str, Any]: ...
def pagination_tag(parser: Parser, token: Token) -> InclusionAdminNode: ...
def result_headers(cl: ChangeList) -> Iterator[Dict[str, Optional[Union[int, str]]]]: ... 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_hidden_fields(cl: ChangeList) -> Iterator[BoundField]: ...
def result_list(cl: ChangeList) -> Dict[str, Any]: ... def result_list(cl: ChangeList) -> Dict[str, Any]: ...
def result_list_tag(parser: Parser, token: Token) -> InclusionAdminNode: ...
def date_hierarchy(cl: ChangeList) -> Any: ...
def result_list_tag( def date_hierarchy_tag(parser: Parser, token: Token) -> InclusionAdminNode: ...
parser: Parser, def search_form(cl: ChangeList) -> Dict[str, Union[ChangeList, bool, str]]: ...
token: Token def search_form_tag(parser: Parser, token: Token) -> InclusionAdminNode: ...
) -> 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 results( def change_list_object_tools_tag(parser: Parser, token: Token) -> InclusionAdminNode: ...
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: ...

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.helpers import InlineAdminForm
from django.contrib.admin.templatetags.base import InclusionAdminNode from django.contrib.admin.templatetags.base import InclusionAdminNode
from django.template.base import ( from django.template.base import Parser, Token
Parser, from django.template.context import Context, RequestContext
Token, register: Any
)
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: ...
def prepopulated_fields_js(context: RequestContext) -> RequestContext: ... def prepopulated_fields_js(context: RequestContext) -> RequestContext: ...
def prepopulated_fields_js_tag(parser: Parser, token: Token) -> InclusionAdminNode: ...
def prepopulated_fields_js_tag(
parser: Parser,
token: Token
) -> InclusionAdminNode: ...
def submit_row(context: RequestContext) -> Context: ... def submit_row(context: RequestContext) -> Context: ...
def submit_row_tag(parser: Parser, token: Token) -> InclusionAdminNode: ...
def change_form_object_tools_tag(parser: Parser, token: Token) -> InclusionAdminNode: ...
def submit_row_tag( def cell_count(inline_admin_form: InlineAdminForm) -> int: ...
parser: Parser,
token: Token
) -> InclusionAdminNode: ...

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: ... 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.db.models.options import Options
from django.template.context import RequestContext from django.template.context import RequestContext
from django.utils.safestring import SafeText from django.utils.safestring import SafeText
from typing import ( from typing import Dict, Optional, Union
Dict,
Optional,
Union,
)
from uuid import UUID from uuid import UUID
register: Any
def add_preserved_filters(
context: Union[Dict[str, Union[str, Options]], RequestContext],
url: str,
popup: bool = ...,
to_field: Optional[str] = ...
) -> str: ...
def admin_urlname(value: Options, arg: SafeText) -> str: ... def admin_urlname(value: Options, arg: SafeText) -> str: ...
def admin_urlquote(value: Union[str, int, UUID]) -> Union[str, int, UUID]: ... def admin_urlquote(value: Union[str, 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 ( # Stubs for django.contrib.admin.templatetags.base (Python 3.6)
Parser, #
Token, # 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.template.context import Context
from django.utils.safestring import SafeText from django.utils.safestring import SafeText
from typing import Callable from typing import Callable
class InclusionAdminNode(InclusionNode):
template_name: Any = ...
class InclusionAdminNode: def __init__(self, parser: Parser, token: Token, func: Callable, template_name: str, takes_context: bool = ...) -> None: ...
def __init__(
self,
parser: Parser,
token: Token,
func: Callable,
template_name: str,
takes_context: bool = ...
) -> None: ...
def render(self, context: Context) -> SafeText: ... 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 datetime import datetime
from django.contrib.admin.options import ( from django.contrib.admin.options import ModelAdmin, TabularInline
ModelAdmin,
TabularInline,
)
from django.contrib.auth.forms import AdminPasswordChangeForm from django.contrib.auth.forms import AdminPasswordChangeForm
from django.contrib.auth.models import User from django.contrib.auth.models import User
from django.db.models.base import Model from django.db.models.base import Model
from django.db.models.fields import Field from django.db.models.fields import Field
from django.db.models.fields.reverse_related import ( from django.db.models.fields.reverse_related import ForeignObjectRel, ManyToManyRel, ManyToOneRel, OneToOneRel
ForeignObjectRel,
ManyToManyRel,
ManyToOneRel,
OneToOneRel,
)
from django.db.models.options import Options from django.db.models.options import Options
from django.db.models.query import QuerySet from django.db.models.query import QuerySet
from typing import ( from typing import Any, Callable, Dict, List, Optional, Set, Tuple, Type, Union
Any,
Callable,
Dict,
List,
Optional,
Set,
Tuple,
Type,
Union,
)
from uuid import UUID from uuid import UUID
class FieldIsAForeignKeyColumnName(Exception): ...
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: ...
def lookup_needs_distinct(opts: Options, lookup_path: str) -> bool: ... 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 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 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 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(Collector):
class NestedObjects: edges: Any = ...
def __init__(self, *args, **kwargs) -> None: ... protected: Any = ...
def _nested( model_objs: Any = ...
self, def __init__(self, *args: Any, **kwargs: Any) -> None: ...
obj: Model,
seen: Set[Model],
format_callback: Callable
) -> Any: ...
def add_edge(self, source: Optional[Model], target: Model) -> 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: Any) -> None: ...
def collect( def related_objects(self, related: ManyToOneRel, objs: Union[List[User], List[Model]]) -> QuerySet: ...
self, def _nested(self, obj: Model, seen: Set[Model], format_callback: Callable) -> Any: ...
objs: Union[List[Model], QuerySet],
source: Optional[Type[Model]] = ...,
source_attr: Optional[str] = ...,
**kwargs
) -> None: ...
def nested(self, format_callback: Callable = ...) -> Any: ... def nested(self, format_callback: Callable = ...) -> Any: ...
def related_objects( def can_fast_delete(self, *args: Any, **kwargs: Any) -> bool: ...
self,
related: ManyToOneRel, def model_format_dict(obj: Any): ...
objs: Union[List[User], List[Model]] def model_ngettext(obj: QuerySet, n: None = ...) -> str: ...
) -> QuerySet: ... 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.handlers.wsgi import WSGIRequest
from django.core.paginator import Paginator from django.core.paginator import Paginator
from django.db.models.query import QuerySet from django.db.models.query import QuerySet
from django.http.response import JsonResponse from django.http.response import JsonResponse
class AutocompleteJsonView(BaseListView):
paginate_by: int = ...
class AutocompleteJsonView: model_admin: Any = ...
def get(self, request: WSGIRequest, *args, **kwargs) -> JsonResponse: ... term: Any = ...
def get_paginator(self, *args, **kwargs) -> Paginator: ... 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 get_queryset(self) -> QuerySet: ...
def has_perm(self, request: WSGIRequest, obj: None = ...) -> bool: ... 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 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 collections import OrderedDict
from django.contrib.admin.filters import SimpleListFilter from django.contrib.admin.filters import SimpleListFilter
from django.contrib.admin.options import ModelAdmin 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.base import Model
from django.db.models.expressions import CombinedExpression from django.db.models.expressions import CombinedExpression
from django.db.models.query import QuerySet from django.db.models.query import QuerySet
from typing import ( from typing import Any, Callable, Dict, List, Optional, Tuple, Type, Union
Any, ALL_VAR: str
Callable, ORDER_VAR: str
Dict, ORDER_TYPE_VAR: str
List, PAGE_VAR: str
Optional, SEARCH_VAR: str
Tuple, ERROR_FLAG: str
Type, IGNORED_PARAMS: Any
Union,
)
class ChangeList: class ChangeList:
def __init__( model: Any = ...
self, opts: Any = ...
request: WSGIRequest, lookup_opts: Any = ...
model: Type[Model], root_queryset: Any = ...
list_display: Union[List[str], List[Union[str, Callable]], Tuple[str, str, str, str]], list_display: Any = ...
list_display_links: Union[List[str], Tuple[str, str]], list_display_links: Any = ...
list_filter: Union[List[Type[SimpleListFilter]], List[str], Tuple], list_filter: Any = ...
date_hierarchy: Optional[str], date_hierarchy: Any = ...
search_fields: Union[List[str], Tuple], search_fields: Any = ...
list_select_related: bool, list_select_related: Any = ...
list_per_page: int, list_per_page: Any = ...
list_max_show_all: int, list_max_show_all: Any = ...
list_editable: Union[List[str], Tuple], model_admin: Any = ...
model_admin: ModelAdmin, preserved_filters: Any = ...
sortable_by: Any sortable_by: Any = ...
) -> None: ... page_num: Any = ...
def _get_default_ordering(self) -> Union[List[str], Tuple[str], Tuple[str, str]]: ... show_all: Any = ...
def apply_select_related(self, qs: QuerySet) -> QuerySet: ... is_popup: Any = ...
def get_filters(self, request: WSGIRequest) -> 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_filters_params(self, params: None = ...) -> Dict[str, str]: ...
def get_ordering( def get_filters(self, request: WSGIRequest) -> Any: ...
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_query_string(self, new_params: Any = ..., remove: Optional[List[str]] = ...) -> str: ... 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_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 has_related_field_in_list_display(self) -> bool: ...
def url_for_result(self, result: Model) -> str: ... 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 datetime import datetime
from django.contrib.admin.sites import AdminSite from django.contrib.admin.sites import AdminSite
from django.db.models.fields.reverse_related import ( from django.db.models.fields.reverse_related import ForeignObjectRel, ManyToOneRel
ForeignObjectRel, from django.forms.widgets import Media, Select
ManyToOneRel,
)
from django.forms.widgets import (
Media,
Select,
)
from django.http.request import QueryDict from django.http.request import QueryDict
from django.utils.datastructures import MultiValueDict from django.utils.datastructures import MultiValueDict
from typing import ( from typing import Any, Dict, List, Optional, Set, Tuple, Union
Any, class FilteredSelectMultiple(forms.SelectMultiple):
Dict, @property
List, def media(self) -> Media: ...
Optional, verbose_name: Any = ...
Set, is_stacked: Any = ...
Tuple, def __init__(self, verbose_name: str, is_stacked: bool, attrs: None = ..., choices: Tuple = ...) -> None: ...
Union, 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]: ... def url_params_from_lookup_dict(lookups: Dict[str, Union[str, int]]) -> Dict[str, str]: ...
class ForeignKeyRawIdWidget(forms.TextInput):
class AdminDateWidget: template_name: str = ...
def __init__(self, attrs: None = ..., format: None = ...) -> None: ... rel: Any = ...
@property admin_site: Any = ...
def media(self) -> Media: ... 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]]: ...
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: ...
def base_url_parameters(self) -> Dict[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 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 __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 @property
def is_hidden(self) -> bool: ... def is_hidden(self) -> bool: ...
@property @property
def media(self) -> Media: ... def media(self) -> Media: ...
def value_from_datadict( def get_related_url(self, info: Tuple[str, str], action: str, *args: Any) -> str: ...
self, def get_context(self, name: str, value: Optional[Union[str, int]], attrs: Dict[str, str]) -> Dict[str, Union[bool, str]]: ...
data: QueryDict, def value_from_datadict(self, data: QueryDict, files: MultiValueDict, name: str) -> Optional[str]: ...
files: MultiValueDict, def value_omitted_from_data(self, data: Any, files: Any, name: Any): ...
name: str def id_for_label(self, id_: str) -> str: ...
) -> Optional[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.core.handlers.wsgi import WSGIRequest
from django.http.response import HttpResponse from django.http.response import HttpResponse
from typing import ( from typing import Any, Callable, Dict, Optional, Tuple
Any, class XViewMiddleware(MiddlewareMixin):
Callable, def process_view(self, request: WSGIRequest, view_func: Callable, view_args: Tuple, view_kwargs: Dict[Any, Any]) -> Optional[HttpResponse]: ...
Dict,
Optional,
Tuple,
)
class XViewMiddleware:
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 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_named_groups(pattern: str) -> str: ...
def replace_unnamed_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 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 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.backends import ModelBackend
from django.contrib.auth.base_user import AbstractBaseUser from django.contrib.auth.base_user import AbstractBaseUser
from django.contrib.auth.models import ( from django.contrib.auth.models import AnonymousUser, User
AnonymousUser,
User,
)
from django.core.handlers.wsgi import WSGIRequest from django.core.handlers.wsgi import WSGIRequest
from django.db.models.base import Model from django.db.models.base import Model
from django.db.models.options import Options from django.db.models.options import Options
from django.http.request import HttpRequest from django.http.request import HttpRequest
from django.utils.functional import SimpleLazyObject from django.utils.functional import SimpleLazyObject
from typing import ( from typing import Any, Dict, List, Optional, Type, Union
Any, SESSION_KEY: str
Dict, BACKEND_SESSION_KEY: str
List, HASH_SESSION_KEY: str
Optional, REDIRECT_FIELD_NAME: str
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]: ...
def load_backend(path: str) -> object: ... def load_backend(path: str) -> object: ...
def _get_backends(return_tuples: bool = ...) -> Any: ...
def get_backends() -> List[ModelBackend]: ...
def login( def _clean_credentials(credentials: Dict[str, Optional[str]]) -> Dict[str, Optional[str]]: ...
request: HttpRequest, def _get_user_session_key(request: HttpRequest) -> int: ...
user: User, def authenticate(request: Optional[HttpRequest] = ..., **credentials: Any) -> Optional[AbstractBaseUser]: ...
backend: Optional[Union[str, Type[ModelBackend]]] = ... def login(request: HttpRequest, user: User, backend: Optional[Union[str, Type[ModelBackend]]] = ...) -> None: ...
) -> None: ...
def logout(request: HttpRequest) -> None: ... def logout(request: HttpRequest) -> None: ...
def get_user_model() -> Type[Model]: ...
def get_user(request: HttpRequest) -> Union[AnonymousUser, AbstractBaseUser]: ...
def get_permission_codename(action: str, opts: Options) -> str: ...
def update_session_auth_hash(request: WSGIRequest, user: SimpleLazyObject) -> None: ...
default_app_config: str
def update_session_auth_hash(
request: WSGIRequest,
user: SimpleLazyObject
) -> None: ...

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: ... def ready(self) -> None: ...

View File

@@ -1,10 +1,10 @@
from typing import ( # Stubs for django.contrib.auth.checks (Python 3.6)
Any, #
List, # 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]: ... 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]: ...
def check_user_model(app_configs: None = ..., **kwargs) -> List[Any]: ...

View File

@@ -1,27 +1,24 @@
from django.contrib.auth.models import ( # Stubs for django.contrib.auth.context_processors (Python 3.6)
AnonymousUser, #
User, # 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 django.http.request import HttpRequest
from typing import ( from typing import Dict, Union
Dict,
Union,
)
def auth(
request: HttpRequest
) -> Dict[str, Union[PermWrapper, AnonymousUser, User]]: ...
class PermLookupDict: class PermLookupDict:
def __bool__(self) -> bool: ...
def __getitem__(self, perm_name: str) -> bool: ...
def __init__(self, user: object, app_label: str) -> None: ... 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: class PermWrapper:
def __contains__(self, perm_name: str) -> bool: ... user: Any = ...
def __getitem__(self, app_label: str) -> PermLookupDict: ...
def __init__(self, user: object) -> None: ... 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 ( # Stubs for django.contrib.auth.decorators (Python 3.6)
Callable, #
List, # NOTE: This dynamically typed stub was automatically generated by stubgen.
Optional,
Union,
)
from typing import Any, Optional
def login_required( from typing import Callable, List, Optional, Union
function: Optional[Callable] = ..., def user_passes_test(test_func: Callable, login_url: Optional[str] = ..., redirect_field_name: str = ...) -> Callable: ...
redirect_field_name: str = ..., def login_required(function: Optional[Callable] = ..., redirect_field_name: str = ..., login_url: None = ...) -> Callable: ...
login_url: None = ... def permission_required(perm: Union[str, List[str]], login_url: None = ..., raise_exception: bool = ...) -> Callable: ...
) -> 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: ...

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 collections import OrderedDict
from typing import ( from typing import Callable, Dict, List, Optional, Union
Callable, UNUSABLE_PASSWORD_PREFIX: str
Dict, UNUSABLE_PASSWORD_SUFFIX_LENGTH: int
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: ...
def is_password_usable(encoded: Optional[str]) -> bool: ... 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 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 mask_hash(hash: str, show: int = ..., char: str = ...) -> str: ...
def reset_hashers(**kwargs) -> None: ...
class BasePasswordHasher: 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 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 PBKDF2PasswordHasher(BasePasswordHasher):
class MD5PasswordHasher: algorithm: str = ...
def encode(self, password: str, salt: str) -> str: ... iterations: int = ...
def safe_summary(self, encoded: str) -> OrderedDict: ... digest: Any = ...
def verify(self, password: str, encoded: str) -> bool: ...
class PBKDF2PasswordHasher:
def encode(self, password: str, salt: str, iterations: Optional[int] = ...) -> str: ... def encode(self, password: str, salt: str, iterations: Optional[int] = ...) -> str: ...
def verify(self, password: str, encoded: str) -> bool: ...
def safe_summary(self, encoded: Any): ...
def must_update(self, encoded: str) -> bool: ... 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 encode(self, password: str, salt: str) -> str: ...
def verify(self, password: str, encoded: str) -> bool: ... def verify(self, password: str, encoded: str) -> bool: ...
def safe_summary(self, encoded: Any): ...
def harden_runtime(self, password: Any, encoded: Any) -> None: ...
class MD5PasswordHasher(BasePasswordHasher):
class UnsaltedMD5PasswordHasher: algorithm: str = ...
def encode(self, password: str, salt: str) -> str: ... def encode(self, password: str, salt: str) -> str: ...
def verify(self, password: str, encoded: str) -> bool: ... def verify(self, password: str, encoded: str) -> bool: ...
def safe_summary(self, encoded: str) -> OrderedDict: ...
def harden_runtime(self, password: Any, encoded: Any) -> None: ...
class UnsaltedSHA1PasswordHasher(BasePasswordHasher):
class UnsaltedSHA1PasswordHasher: algorithm: str = ...
def encode(self, password: str, salt: str) -> str: ...
def salt(self) -> str: ... def salt(self) -> str: ...
def encode(self, password: str, salt: str) -> str: ...
def verify(self, password: str, encoded: str) -> bool: ... def verify(self, password: str, encoded: str) -> bool: ...
def safe_summary(self, encoded: Any): ...
def 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.config import AppConfig
from django.apps.registry import Apps from django.apps.registry import Apps
from django.db.models.options import Options from django.db.models.options import Options
from typing import ( from typing import List, Tuple
List,
Tuple,
)
def _get_all_permissions(opts: Options) -> List[Tuple[str, str]]: ... def _get_all_permissions(opts: Options) -> List[Tuple[str, str]]: ...
def _get_builtin_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: Any) -> None: ...
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 get_system_username() -> str: ... 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.base_user import AbstractBaseUser
from django.contrib.auth.models import User from django.contrib.auth.models import User
from pathlib import PosixPath from pathlib import PosixPath
from typing import ( from typing import Dict, List, Optional, Tuple, Union
Dict, def get_default_password_validators() -> Union[List[NumericPasswordValidator], List[UserAttributeSimilarityValidator]]: ...
List, def get_password_validators(validator_config: List[Dict[str, str]]) -> Union[List[NumericPasswordValidator], List[UserAttributeSimilarityValidator]]: ...
Optional, def validate_password(password: str, user: Optional[User] = ..., password_validators: None = ...) -> None: ...
Tuple, def password_changed(password: str, user: AbstractBaseUser = ..., password_validators: None = ...) -> None: ...
Union, def password_validators_help_texts(password_validators: None = ...) -> List[str]: ...
)
def _password_validators_help_text_html(password_validators: None = ...) -> str: ... def _password_validators_help_text_html(password_validators: None = ...) -> str: ...
password_validators_help_text_html: Any
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: ...
class MinimumLengthValidator: class MinimumLengthValidator:
min_length: Any = ...
def __init__(self, min_length: int = ...) -> None: ... def __init__(self, min_length: int = ...) -> None: ...
def get_help_text(self) -> str: ...
def validate(self, password: str, user: None = ...) -> None: ... 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: class NumericPasswordValidator:
def validate(self, password: str, user: User = ...) -> None: ... def validate(self, password: str, user: User = ...) -> None: ...
def get_help_text(self): ...
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: ...

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 datetime import date
from django.contrib.auth.models import User from django.contrib.auth.models import User
from typing import Optional from typing import Optional
class PasswordResetTokenGenerator: 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_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 _num_days(self, dt: date) -> int: ...
def _today(self) -> date: ... 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: ... def ready(self) -> None: ...

View File

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

View File

@@ -1,26 +1,19 @@
from datetime import ( # Stubs for django.contrib.humanize.templatetags.humanize (Python 3.6)
date, #
datetime, # NOTE: This dynamically typed stub was automatically generated by stubgen.
)
from typing import (
Optional,
Union,
)
from typing import Any, Optional
def apnumber(value: str) -> str: ... from datetime import date, datetime
from typing import Optional, Union
register: Any
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: ...
def ordinal(value: Optional[str]) -> Optional[str]: ... def ordinal(value: Optional[str]) -> Optional[str]: ...
def intcomma(value: Optional[Union[str, float]], use_l10n: bool = ...) -> str: ...
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.contrib.messages.storage.base import BaseStorage
from django.core.handlers.wsgi import WSGIRequest from django.core.handlers.wsgi import WSGIRequest
from django.http.request import HttpRequest from django.http.request import HttpRequest
from typing import ( from typing import Optional, Union
Optional, class MessageFailure(Exception): ...
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: ...
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 get_messages(request: HttpRequest) -> BaseStorage: ...
def get_level(request: HttpRequest) -> int: ...
def info(
request: WSGIRequest,
message: str,
extra_tags: str = ...,
fail_silently: Union[str, bool] = ...
) -> None: ...
def set_level(request: HttpRequest, level: int) -> bool: ... def set_level(request: HttpRequest, level: int) -> bool: ...
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( def success(request: WSGIRequest, message: str, extra_tags: str = ..., fail_silently: Union[str, bool] = ...) -> None: ...
request: WSGIRequest, def warning(request: WSGIRequest, message: str, extra_tags: str = ..., fail_silently: Union[str, bool] = ...) -> None: ...
message: str, def error(request: WSGIRequest, message: str, extra_tags: str = ..., fail_silently: Union[str, bool] = ...) -> None: ...
extra_tags: str = ...,
fail_silently: Union[str, bool] = ...
) -> None: ...
def warning(
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.contrib.messages.storage.base import BaseStorage
from django.http.request import HttpRequest from django.http.request import HttpRequest
from typing import ( from typing import Dict, Union
Dict, def messages(request: HttpRequest) -> Dict[str, Union[Dict[str, int], BaseStorage]]: ...
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.core.handlers.wsgi import WSGIRequest
from django.http.request import HttpRequest from django.http.request import HttpRequest
from django.http.response import HttpResponseBase from django.http.response import HttpResponseBase
class MessageMiddleware(MiddlewareMixin):
class MessageMiddleware:
def process_request(self, request: WSGIRequest) -> None: ... def process_request(self, request: WSGIRequest) -> None: ...
def process_response( def process_response(self, request: HttpRequest, response: HttpResponseBase) -> HttpResponseBase: ...
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.contrib.messages.storage.base import BaseStorage
from django.http.request import HttpRequest from django.http.request import HttpRequest
def default_storage(request: HttpRequest) -> BaseStorage: ... def default_storage(request: HttpRequest) -> BaseStorage: ...

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.contrib.messages.storage.base import Message
from django.http.response import HttpResponse from django.http.response import HttpResponse
from typing import ( from typing import Any, List, Optional, Tuple, Union
Any, class MessageEncoder(json.JSONEncoder):
List, message_key: str = ...
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:
def default(self, obj: Message) -> List[Union[int, 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.contrib.messages.storage.base import Message
from django.http.response import HttpResponse from django.http.response import HttpResponse
from typing import ( from typing import Any, List, Tuple, Union
Any, class FallbackStorage(BaseStorage):
List, storage_classes: Any = ...
Tuple, storages: Any = ...
Union, _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]: ...
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]: ...

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.contrib.messages.storage.base import Message
from django.http.request import HttpRequest from django.http.request import HttpRequest
from django.http.response import HttpResponse from django.http.response import HttpResponse
from typing import ( from typing import Any, List, Optional, Tuple, Union
Any, class SessionStorage(BaseStorage):
List, session_key: str = ...
Optional, def __init__(self, request: HttpRequest, *args: Any, **kwargs: Any) -> None: ...
Tuple, def _get(self, *args: Any, **kwargs: Any) -> Union[Tuple[None, bool], Tuple[List[str], bool], Tuple[List[Message], bool]]: ...
Union, def _store(self, messages: List[Message], response: HttpResponse, *args: Any, **kwargs: Any) -> List[Any]: ...
)
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]]]: ...
def serialize_messages(self, messages: Union[List[Message], List[str]]) -> str: ... 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 from typing import Dict
def get_level_tags() -> Dict[int, str]: ... def get_level_tags() -> Dict[int, str]: ...

View File

@@ -1,43 +1,66 @@
from datetime import ( # Stubs for django.contrib.sessions.backends.base (Python 3.6)
datetime, #
timedelta, # NOTE: This dynamically typed stub was automatically generated by stubgen.
)
from django.db.models.base import Model
from typing import (
Dict,
Optional,
Union,
)
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: class SessionBase:
def __contains__(self, key: str) -> bool: ... TEST_COOKIE_NAME: str = ...
def __delitem__(self, key: str) -> None: ... TEST_COOKIE_VALUE: str = ...
def __getitem__(self, key: str) -> Union[str, Model, int]: ... __not_given: Any = ...
_session_key: Any = ...
accessed: bool = ...
modified: bool = ...
serializer: Any = ...
def __init__(self, session_key: Optional[str] = ...) -> None: ... def __init__(self, session_key: Optional[str] = ...) -> None: ...
def __contains__(self, key: str) -> bool: ...
def __getitem__(self, key: str) -> Union[str, Model, int]: ...
def __setitem__(self, key: str, value: Union[str, datetime, int]) -> None: ... def __setitem__(self, key: str, value: Union[str, datetime, 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_new_session_key(self) -> str: ...
def _get_or_create_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 _validate_session_key(self, key: Optional[str]) -> Optional[Union[str, bool]]: ...
def clear(self) -> None: ... def _get_session_key(self) -> Optional[str]: ...
def cycle_key(self) -> None: ... __session_key: Any = ...
def decode(self, session_data: Union[str, bytes]) -> Dict[str, Union[str, int]]: ... def _set_session_key(self, value: Optional[str]) -> None: ...
def encode(self, session_dict: Dict[str, Union[str, int, datetime]]) -> str: ... session_key: Any = ...
def flush(self) -> None: ... def _get_session(self, no_load: bool = ...) -> Dict[str, Union[str, int, datetime, Model]]: ...
def get(self, key: str, default: Optional[str] = ...) -> Optional[Union[str, datetime, int]]: ... _session: Any = ...
def get_expire_at_browser_close(self) -> bool: ... def get_expiry_age(self, **kwargs: Any) -> int: ...
def get_expiry_age(self, **kwargs) -> int: ... def get_expiry_date(self, **kwargs: Any) -> datetime: ...
def get_expiry_date(self, **kwargs) -> datetime: ...
def is_empty(self) -> bool: ...
def pop(self, key: str, default: object = ...) -> Union[str, int]: ...
def set_expiry(self, value: Optional[Union[datetime, int, timedelta]]) -> None: ... def set_expiry(self, value: Optional[Union[datetime, int, timedelta]]) -> None: ...
def setdefault(self, key: str, value: str) -> str: ... def get_expire_at_browser_close(self) -> bool: ...
def test_cookie_worked(self) -> bool: ... def flush(self) -> None: ...
def update(self, dict_: Dict[str, int]) -> 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 ( # Stubs for django.contrib.sessions.backends.cache (Python 3.6)
Any, #
Dict, # NOTE: This dynamically typed stub was automatically generated by stubgen.
Optional,
)
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: ... def __init__(self, session_key: None = ...) -> None: ...
@property @property
def cache_key(self) -> str: ... def cache_key(self) -> str: ...
def create(self) -> None: ... _session_key: Any = ...
def delete(self, session_key: Optional[str] = ...) -> None: ...
def exists(self, session_key: Optional[str]) -> bool: ...
def load(self) -> Dict[Any, Any]: ... def load(self) -> Dict[Any, Any]: ...
modified: bool = ...
def create(self) -> None: ...
def save(self, must_create: bool = ...) -> 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 ( # Stubs for django.contrib.sessions.backends.cached_db (Python 3.6)
Any, #
Dict, # NOTE: This dynamically typed stub was automatically generated by stubgen.
Optional,
)
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: ... def __init__(self, session_key: Optional[str] = ...) -> None: ...
@property @property
def cache_key(self) -> str: ... 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 load(self) -> Dict[Any, Any]: ...
def exists(self, session_key: str) -> bool: ...
def save(self, must_create: bool = ...) -> None: ... 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 datetime import datetime
from django.contrib.sessions.base_session import AbstractBaseSession from django.contrib.sessions.base_session import AbstractBaseSession
from django.contrib.sessions.models import Session from django.contrib.sessions.models import Session
from typing import ( from typing import Dict, Optional, Type, Union
Dict, class SessionStore(SessionBase):
Optional,
Type,
Union,
)
class SessionStore:
def __init__(self, session_key: Optional[str] = ...) -> None: ... 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 @classmethod
def get_model_class(cls) -> Type[Session]: ... def get_model_class(cls) -> Type[Session]: ...
def load(self) -> Dict[str, Union[str, int]]: ...
@cached_property
def model(self) -> Type[AbstractBaseSession]: ... 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 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 ( # Stubs for django.contrib.sessions.backends.file (Python 3.6)
Dict, #
Optional, # 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: ... def __init__(self, session_key: Optional[str] = ...) -> None: ...
@classmethod @classmethod
def _get_storage_path(cls) -> str: ... def _get_storage_path(cls) -> str: ...
def _key_to_file(self, session_key: Optional[str] = ...) -> 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 @classmethod
def clear_expired(cls) -> None: ... 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 datetime import datetime
from typing import ( from typing import Dict, Optional, Union
Dict, class SessionStore(SessionBase):
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: ...
def load(self) -> Dict[str, Union[str, datetime]]: ... 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 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.core.handlers.wsgi import WSGIRequest
from django.http.response import HttpResponseBase from django.http.response import HttpResponseBase
from typing import ( from typing import Callable, Optional
Callable, class SessionMiddleware(MiddlewareMixin):
Optional, get_response: Any = ...
) SessionStore: Any = ...
class SessionMiddleware:
def __init__(self, get_response: Optional[Callable] = ...) -> None: ... def __init__(self, get_response: Optional[Callable] = ...) -> None: ...
def process_request(self, request: WSGIRequest) -> None: ... def process_request(self, request: WSGIRequest) -> None: ...
def process_response( def process_response(self, request: WSGIRequest, response: HttpResponseBase) -> HttpResponseBase: ...
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 datetime import datetime
from django.db.models.base import Model from django.db.models.base import Model
from typing import ( from typing import Dict, Union
Dict,
Union,
)
class PickleSerializer: class PickleSerializer:
def dumps(self, obj: Dict[str, Union[str, datetime]]) -> bytes: ... def dumps(self, obj: Dict[str, Union[str, datetime]]) -> bytes: ...
def loads(self, data: bytes) -> Dict[str, Model]: ... 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 datetime import datetime
from django.contrib.sites.models import Site from django.contrib.sites.models import Site
from django.contrib.sites.requests import RequestSite from django.contrib.sites.requests import RequestSite
from django.core.paginator import Paginator from django.core.paginator import Paginator
from django.db.models.base import Model from django.db.models.base import Model
from django.db.models.query import QuerySet from django.db.models.query import QuerySet
from typing import ( from typing import Any, Dict, List, Optional, Union
Any, PING_URL: str
Dict,
List,
Optional,
Union,
)
def _get_sitemap_full_url(sitemap_url: None): ...
class SitemapNotFound(Exception): ...
def ping_google(sitemap_url: None = ..., ping_url: str = ...) -> None: ... def ping_google(sitemap_url: None = ..., ping_url: str = ...) -> None: ...
def _get_sitemap_full_url(sitemap_url: None): ...
class 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: ...
class Sitemap: class Sitemap:
def _urls( limit: int = ...
self, protocol: Any = ...
page: Union[str, int], def __get(self, name: Any, obj: Any, default: Optional[Any] = ...): ...
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]]]]: ...
def items(self) -> List[Any]: ... def items(self) -> List[Any]: ...
def location(self, obj: Model) -> str: ... def location(self, obj: Model) -> str: ...
@property @property
def paginator(self) -> Paginator: ... 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.flatpages.sitemaps import FlatPageSitemap
from django.contrib.sitemaps import ( from django.contrib.sitemaps import GenericSitemap, Sitemap
GenericSitemap,
Sitemap,
)
from django.core.handlers.wsgi import WSGIRequest from django.core.handlers.wsgi import WSGIRequest
from django.template.response import TemplateResponse from django.template.response import TemplateResponse
from typing import ( from typing import Callable, Dict, Optional, Type, Union
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: ...
def x_robots_tag(func: Callable) -> Callable: ... 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: ... 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.apps.registry import Apps
from django.contrib.sites.apps import SitesConfig from django.contrib.sites.apps import SitesConfig
def create_default_site(app_config: SitesConfig, verbosity: int = ..., interactive: bool = ..., using: str = ..., apps: Apps = ..., **kwargs: Any) -> None: ...
def create_default_site(
app_config: SitesConfig,
verbosity: int = ...,
interactive: bool = ...,
using: str = ...,
apps: Apps = ...,
**kwargs
) -> 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.core.checks.messages import Error
from django.db.models.query import QuerySet from django.db.models.query import QuerySet
from typing import List from typing import List
class CurrentSiteManager(models.Manager):
use_in_migrations: bool = ...
class CurrentSiteManager: __field_name: Any = ...
def __init__(self, field_name: None = ...) -> None: ... def __init__(self, field_name: None = ...) -> None: ...
def check(self, **kwargs: Any) -> List[Error]: ...
def _check_field_name(self) -> List[Error]: ... def _check_field_name(self) -> List[Error]: ...
def _get_field_name(self) -> str: ... def _get_field_name(self) -> str: ...
def check(self, **kwargs) -> List[Error]: ...
def get_queryset(self) -> QuerySet: ... 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 from django.http.request import HttpRequest
class CurrentSiteMiddleware(MiddlewareMixin):
class CurrentSiteMiddleware:
def process_request(self, request: HttpRequest) -> None: ... 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 from django.http.request import HttpRequest
class RequestSite: class RequestSite:
domain: Any = ...
def __init__(self, request: HttpRequest) -> None: ... def __init__(self, request: HttpRequest) -> None: ...
def __str__(self) -> str: ... 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.models import Site
from django.contrib.sites.requests import RequestSite from django.contrib.sites.requests import RequestSite
from django.http.request import HttpRequest from django.http.request import HttpRequest
from typing import ( from typing import Optional, Union
Optional, def get_current_site(request: Optional[HttpRequest]) -> Union[RequestSite, Site]: ...
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: ... def ready(self) -> None: ...

View File

@@ -1,7 +1,8 @@
from typing import ( # Stubs for django.contrib.staticfiles.checks (Python 3.6)
Any, #
List, # 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.contrib.staticfiles.storage import StaticFilesStorage
from django.core.checks.messages import Error from django.core.checks.messages import Error
from django.core.files.storage import ( from django.core.files.storage import DefaultStorage, FileSystemStorage
DefaultStorage, from typing import Iterator, List, Optional, Tuple, Union
FileSystemStorage, searched_locations: Any
)
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]]: ...
class BaseFinder: 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 FileSystemFinder(BaseFinder):
class BaseStorageFinder: locations: Any = ...
def __init__( storages: Any = ...
self, def __init__(self, app_names: None = ..., *args: Any, **kwargs: Any) -> None: ...
storage: Optional[StaticFilesStorage] = ..., def check(self, **kwargs: Any) -> List[Error]: ...
*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]: ...
def find(self, path: str, all: bool = ...) -> Union[str, List[str]]: ... def find(self, path: str, all: bool = ...) -> Union[str, List[str]]: ...
def find_location(self, root: str, path: str, prefix: str = ...) -> Optional[str]: ... def find_location(self, root: str, path: str, prefix: str = ...) -> Optional[str]: ...
def list(self, ignore_patterns: List[str]) -> Iterator[Tuple[str, FileSystemStorage]]: ... 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 from django.core.handlers.wsgi import WSGIRequest
class StaticFilesHandler(WSGIHandler):
handles_files: bool = ...
class StaticFilesHandler: application: Any = ...
def file_path(self, url: str) -> str: ... base_url: Any = ...
def get_response(self, request: WSGIRequest): ... def __init__(self, application: Any) -> None: ...
def load_middleware(self) -> 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 collections import OrderedDict
from django.core.cache import DefaultCacheProxy from django.core.cache import DefaultCacheProxy
from django.core.files.base import File from django.core.files.base import File
from django.core.files.storage import FileSystemStorage
from django.utils.safestring import SafeText from django.utils.safestring import SafeText
from typing import ( from typing import Callable, Dict, Iterator, List, Optional, Tuple, Union
Callable, class StaticFilesStorage(FileSystemStorage):
Dict, base_location: Any = ...
Iterator, location: Any = ...
List, def __init__(self, location: Optional[str] = ..., base_url: None = ..., *args: Any, **kwargs: Any) -> None: ...
Optional, def path(self, name: str) -> str: ...
Tuple,
Union,
)
class CachedFilesMixin:
def __init__(self, *args, **kwargs) -> None: ...
def hash_key(self, name: str) -> str: ...
class ConfiguredStorage:
def _setup(self) -> None: ...
class HashedFilesMixin: class HashedFilesMixin:
def __init__(self, *args, **kwargs) -> None: ... default_template: str = ...
def _post_process( max_post_process_passes: int = ...
self, patterns: Any = ...
paths: Union[OrderedDict, Dict[str, Tuple[FileSystemStorage, str]]], _patterns: Any = ...
adjustable_paths: List[str], hashed_files: Any = ...
hashed_files: OrderedDict def __init__(self, *args: Any, **kwargs: Any) -> None: ...
) -> 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: ...
def file_hash(self, name: str, content: File = ...) -> str: ... 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 hashed_name( def _url(self, hashed_name_func: Callable, name: str, force: bool = ..., hashed_files: Optional[OrderedDict] = ...) -> str: ...
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 url(self, name: SafeText, force: bool = ...) -> str: ... def url(self, name: SafeText, force: bool = ...) -> str: ...
def url_converter(self, name: str, hashed_files: OrderedDict, template: str = ...) -> Callable: ... 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(HashedFilesMixin):
class ManifestFilesMixin: manifest_version: str = ...
def __init__(self, *args, **kwargs) -> None: ... manifest_name: str = ...
def load_manifest(self) -> OrderedDict: ... manifest_strict: bool = ...
def post_process(self, *args, **kwargs) -> None: ... hashed_files: Any = ...
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
def read_manifest(self) -> 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 save_manifest(self) -> None: ...
def stored_name(self, name: SafeText) -> str: ... 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: class _MappingCache:
def __getitem__(self, key: str) -> str: ... cache: Any = ...
def __init__(self, cache: DefaultCacheProxy) -> None: ... def __init__(self, cache: DefaultCacheProxy) -> None: ...
def __setitem__(self, key: str, value: str) -> None: ... def __setitem__(self, key: str, value: str) -> None: ...
def __getitem__(self, key: str) -> str: ...
def clear(self) -> None: ... def clear(self) -> None: ...
def get(self, key: str, default: None = ...) -> Optional[str]: ...
def update(self, data: OrderedDict) -> None: ... 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 ( # Stubs for django.contrib.staticfiles.templatetags.staticfiles (Python 3.6)
Parser, #
Token, # 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 from django.templatetags.static import StaticNode
register: Any
def static(path: Any): ...
def do_static( def do_static(parser: Parser, token: Token) -> StaticNode: ...
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 django.urls.resolvers import URLPattern
from typing import List from typing import List
urlpatterns: Any
def staticfiles_urlpatterns(prefix: None = ...) -> List[URLPattern]: ... 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 collections import OrderedDict
from django.core.files.storage import ( from django.core.files.storage import DefaultStorage, FileSystemStorage
DefaultStorage, from typing import Iterator, List, Tuple, Union
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]: ...
def matches_patterns(path: str, patterns: Union[OrderedDict, List[str], Tuple[str]] = ...) -> bool: ... 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.core.handlers.wsgi import WSGIRequest
from django.http.response import FileResponse from django.http.response import FileResponse
def serve(request: WSGIRequest, path: str, insecure: bool = ..., **kwargs: Any) -> FileResponse: ...
def serve(
request: WSGIRequest,
path: str,
insecure: bool = ...,
**kwargs
) -> 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.core.handlers.wsgi import WSGIRequest
from django.db.models.base import Model from django.db.models.base import Model
from django.http.response import HttpResponse from django.http.response import HttpResponse
from django.utils.feedgenerator import ( from django.utils.feedgenerator import Atom1Feed, Enclosure, Rss201rev2Feed
Atom1Feed,
Enclosure,
Rss201rev2Feed,
)
from django.utils.safestring import SafeText from django.utils.safestring import SafeText
from typing import ( from typing import Any, Dict, List, Optional, Union
Any,
Dict,
List,
Optional,
Union,
)
def add_domain(domain: str, url: str, secure: bool = ...) -> str: ... def add_domain(domain: str, url: str, secure: bool = ...) -> str: ...
class FeedDoesNotExist(ObjectDoesNotExist): ...
class Feed: class Feed:
def __call__( feed_type: Any = ...
self, title_template: Any = ...
request: WSGIRequest, description_template: Any = ...
*args, def __call__(self, request: WSGIRequest, *args: Any, **kwargs: Any) -> HttpResponse: ...
**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: ...
def item_title(self, item: Model) -> SafeText: ... 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 # Stubs for django.core.cache.backends.base (Python 3.6)
from typing import ( #
Any, # NOTE: This dynamically typed stub was automatically generated by stubgen.
Callable,
Dict,
List,
Optional,
Union,
)
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 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: ... def get_key_func(key_func: Optional[Union[str, Callable]]) -> Callable: ...
class BaseCache: 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 __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_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 make_key(self, key: Union[str, int], version: Optional[Union[str, int]] = ...) -> str: ...
def set_many( def add(self, key: Any, value: Any, timeout: Any = ..., version: Optional[Any] = ...) -> None: ...
self, def get(self, key: Any, default: Optional[Any] = ..., version: Optional[Any] = ...) -> None: ...
data: Union[Dict[str, Union[Dict[str, int], str]], OrderedDict, Dict[str, str], Dict[str, int]], def set(self, key: Any, value: Any, timeout: Any = ..., version: Optional[Any] = ...) -> None: ...
timeout: object = ..., def touch(self, key: Any, timeout: Any = ..., version: Optional[Any] = ...) -> None: ...
version: Optional[int] = ... def delete(self, key: Any, version: Optional[Any] = ...) -> None: ...
) -> List[Any]: ... 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 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 datetime import datetime
from django.db.backends.utils import CursorWrapper from django.db.backends.utils import CursorWrapper
from typing import ( from typing import Any, Callable, Dict, Optional, Union
Any, class Options:
Callable, db_table: Any = ...
Dict, app_label: str = ...
Optional, model_name: str = ...
Union, 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(BaseCache):
class BaseDatabaseCache: _table: Any = ...
cache_model_class: Any = ...
def __init__(self, table: str, params: Dict[str, Union[Callable, Dict[str, int], str, int]]) -> None: ... def __init__(self, table: str, params: Dict[str, Union[Callable, Dict[str, int], str, int]]) -> None: ...
class DatabaseCache(BaseDatabaseCache):
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: ...
def get(self, key: str, default: Optional[Union[str, int]] = ..., version: Optional[int] = ...) -> Any: ... 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 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: ... def touch(self, key: str, timeout: Optional[int] = ..., version: None = ...) -> bool: ...
def _base_set(self, mode: str, key: str, value: object, timeout: object = ...): ...
def delete(self, key: str, version: Optional[int] = ...) -> None: ...
class Options: def has_key(self, key: str, version: Optional[int] = ...): ...
def __init__(self, table: str) -> None: ... def _cull(self, db: str, cursor: CursorWrapper, now: datetime) -> None: ...
def clear(self) -> None: ...

View File

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

View File

@@ -1,44 +1,28 @@
from io import ( # Stubs for django.core.cache.backends.filebased (Python 3.6)
BufferedRandom, #
BufferedReader, # NOTE: This dynamically typed stub was automatically generated by stubgen.
BufferedWriter,
)
from typing import (
Any,
Callable,
Dict,
List,
Optional,
Union,
)
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: ... def _write_content(f: Union[BufferedRandom, BufferedWriter], expiry: float, value: object) -> None: ...
class FileBasedCache(BaseCache):
class FileBasedCache: cache_suffix: str = ...
_dir: Any = ...
def __init__(self, dir: str, params: Dict[str, Union[Callable, int]]) -> None: ... def __init__(self, dir: str, params: Dict[str, Union[Callable, int]]) -> None: ...
def _createdir(self) -> None: ... def add(self, key: str, value: Union[str, bytes, int], timeout: object = ..., version: Optional[int] = ...) -> bool: ...
def _cull(self) -> None: ... def get(self, key: str, default: Optional[Union[str, int]] = ..., version: Optional[int] = ...) -> Optional[str]: ...
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 set(self, key: str, value: Any, timeout: object = ..., version: Optional[int] = ...) -> None: ... def set(self, key: str, value: Any, timeout: object = ..., version: Optional[int] = ...) -> None: ...
def touch(self, key: str, timeout: object = ..., version: 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 ( # Stubs for django.core.cache.backends.locmem (Python 3.6)
Any, #
Dict, # NOTE: This dynamically typed stub was automatically generated by stubgen.
Optional,
Union,
)
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 __init__(self, name: str, params: Dict[str, Any]) -> None: ...
def _delete(self, key: str) -> None: ... def add(self, key: str, value: Union[int, str, Dict[str, str], Dict[str, int]], timeout: object = ..., version: Optional[int] = ...): ...
def _has_expired(self, key: str) -> bool: ... 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 _set(self, key: str, value: bytes, timeout: object = ...) -> None: ...
def add( def set(self, key: Union[str, int], value: object, timeout: object = ..., version: Optional[int] = ...) -> None: ...
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 touch(self, key: str, timeout: object = ..., version: 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 ( # Stubs for django.core.cache.utils (Python 3.6)
List, #
Optional, # NOTE: This dynamically typed stub was automatically generated by stubgen.
Union,
)
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: ... 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 django.core.checks.messages import Error
from typing import List from typing import List
E001: Any
def check_default_cache_is_configured(app_configs: None, **kwargs: Any) -> List[Error]: ...
def check_default_cache_is_configured(app_configs: None, **kwargs) -> 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: 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 __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 __str__(self) -> str: ...
def __repr__(self): ...
def is_serious(self, level: int = ...) -> bool: ... def is_serious(self, level: int = ...) -> bool: ...
def is_silenced(self) -> bool: ... def is_silenced(self) -> bool: ...
class Debug(CheckMessage):
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
class Critical: class Info(CheckMessage):
def __init__(self, *args, **kwargs) -> None: ... def __init__(self, *args: Any, **kwargs: Any) -> None: ...
class Warning(CheckMessage):
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
class Error: class Error(CheckMessage):
def __init__(self, *args, **kwargs) -> None: ... def __init__(self, *args: Any, **kwargs: Any) -> None: ...
class Critical(CheckMessage):
class Warning: def __init__(self, *args: Any, **kwargs: Any) -> None: ...
def __init__(self, *args, **kwargs) -> 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.apps.registry import Apps
from django.core.checks.messages import ( from django.core.checks.messages import Error, Warning
Error, from typing import Any, List, Optional, Set, Tuple
Warning, 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]: ...
from typing import ( def check_lazy_references(app_configs: None = ..., **kwargs: Any) -> List[Any]: ...
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]: ...

View File

@@ -1,20 +1,33 @@
from django.core.checks.messages import Warning # Stubs for django.core.checks.registry (Python 3.6)
from typing import ( #
Callable, # NOTE: This dynamically typed stub was automatically generated by stubgen.
List,
Optional,
Union,
)
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: class CheckRegistry:
registered_checks: Any = ...
deployment_checks: Any = ...
def __init__(self) -> None: ... def __init__(self) -> None: ...
def get_checks(self, include_deployment_checks: bool = ...) -> List[Callable]: ... def register(self, check: Union[str, Callable] = ..., *tags: Any, **kwargs: Any) -> 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 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 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 # Stubs for django.core.checks.security.base (Python 3.6)
from typing import ( #
Any, # NOTE: This dynamically typed stub was automatically generated by stubgen.
List,
)
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 _security_middleware() -> bool: ...
def _xframe_middleware() -> bool: ... def _xframe_middleware() -> bool: ...
def check_security_middleware(app_configs: None, **kwargs: Any) -> List[Warning]: ...
def check_xframe_options_middleware(app_configs: Any, **kwargs: Any): ...
def check_content_type_nosniff(app_configs: None, **kwargs) -> List[Warning]: ... 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_debug(app_configs: None, **kwargs) -> List[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) -> 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_security_middleware(app_configs: None, **kwargs) -> List[Warning]: ... def check_allowed_hosts(app_configs: Any, **kwargs: Any): ...
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]: ...

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 django.core.checks.messages import Warning
from typing import List from typing import List
W003: Any
W016: Any
def _csrf_middleware() -> bool: ... def _csrf_middleware() -> bool: ...
def check_csrf_middleware(app_configs: None, **kwargs: Any) -> List[Warning]: ...
def check_csrf_cookie_secure(app_configs: Any, **kwargs: Any): ...
def check_csrf_middleware(app_configs: None, **kwargs) -> List[Warning]: ...

View File

@@ -1,13 +1,23 @@
from typing import ( # Stubs for django.core.checks.security.sessions (Python 3.6)
Any, #
List, # 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 _session_middleware() -> bool: ...
def _session_app() -> bool: ...
def check_session_cookie_secure(app_configs: None, **kwargs) -> List[Any]: ...

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 django.core.checks.messages import Error
from typing import ( from typing import Any, List
Any, E001: Any
List, E002: Any
)
def check_setting_app_dirs_loaders(app_configs: None, **kwargs: Any) -> List[Any]: ...
def check_setting_app_dirs_loaders(app_configs: None, **kwargs) -> List[Any]: ... def check_string_if_invalid_is_string(app_configs: None, **kwargs: Any) -> List[Error]: ...
def check_string_if_invalid_is_string(app_configs: None, **kwargs) -> List[Error]: ...

View File

@@ -1,38 +1,16 @@
from django.core.checks.messages import ( # Stubs for django.core.checks.urls (Python 3.6)
Error, #
Warning, # NOTE: This dynamically typed stub was automatically generated by stubgen.
)
from django.urls.resolvers import (
URLPattern,
URLResolver,
)
from typing import (
Any,
Callable,
List,
Tuple,
Union,
)
def E006(name: str) -> Error: ...
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 _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 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 collections.abc import Iterable
from django.forms.utils import ErrorDict from django.forms.utils import ErrorDict
from typing import ( from typing import Any, Dict, Iterator, List, Optional, Tuple, Union
Any, class FieldDoesNotExist(Exception): ...
Dict, class AppRegistryNotReady(Exception): ...
Iterator,
List,
Optional,
Tuple,
Union,
)
class ObjectDoesNotExist(Exception):
silent_variable_failure: bool = ...
class ValidationError: class MultipleObjectsReturned(Exception): ...
def __init__( class SuspiciousOperation(Exception): ...
self, class SuspiciousMultipartForm(SuspiciousOperation): ...
message: Iterable, class SuspiciousFileOperation(SuspiciousOperation): ...
code: Optional[str] = ..., 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 = ... params: Any = ...
) -> None: ... def __init__(self, message: Iterable, code: Optional[str] = ..., params: Any = ...) -> None: ...
def __iter__(self) -> Iterator[Union[str, Tuple[str, List[str]]]]: ...
def __str__(self) -> str: ...
@property @property
def message_dict(self) -> Dict[str, List[str]]: ... def message_dict(self) -> Dict[str, List[str]]: ...
@property @property
def messages(self) -> List[str]: ... def messages(self) -> List[str]: ...
def update_error_dict( def update_error_dict(self, error_dict: Union[Dict[str, List[ValidationError]], ErrorDict]) -> Union[Dict[str, List[ValidationError]], ErrorDict]: ...
self, def __iter__(self) -> Iterator[Union[str, Tuple[str, List[str]]]]: ...
error_dict: Union[Dict[str, List[ValidationError]], ErrorDict] def __str__(self) -> str: ...
) -> Union[Dict[str, List[ValidationError]], ErrorDict]: ... def __repr__(self): ...
class EmptyResultSet(Exception): ...

View File

@@ -1,36 +1,39 @@
from typing import ( # Stubs for django.core.files.base (Python 3.6)
Any, #
Iterator, # NOTE: This dynamically typed stub was automatically generated by stubgen.
Optional,
Union,
)
from django.core.files.utils import FileProxyMixin
from typing import Any, Optional
def endswith_cr(line: bytes) -> bool: ... from typing import Any, Iterator, Optional, Union
class File(FileProxyMixin):
DEFAULT_CHUNK_SIZE: Any = ...
def endswith_lf(line: Union[str, bytes]) -> bool: ... file: Any = ...
name: Any = ...
mode: Any = ...
def equals_lf(line: bytes) -> bool: ... def __init__(self, file: Any, name: Optional[str] = ...) -> None: ...
def __str__(self) -> str: ...
def __repr__(self) -> str: ...
class ContentFile:
def __bool__(self) -> bool: ...
def __init__(self, content: Union[str, bytes], name: Optional[str] = ...) -> None: ...
def close(self) -> None: ...
class File:
def __bool__(self) -> bool: ... 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 __enter__(self) -> File: ...
def __exit__(self, exc_type: None, exc_value: None, tb: None) -> None: ... def __exit__(self, exc_type: None, exc_value: None, tb: None) -> None: ...
def __init__(self, file: Any, name: Optional[str] = ...) -> None: ... def open(self, mode: Optional[Any] = ...): ...
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 close(self) -> None: ... 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 ( # Stubs for django.core.files.uploadedfile (Python 3.6)
BytesIO, #
StringIO, # 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 tempfile import _TemporaryFileWrapper
from typing import ( from typing import Iterator, Optional, Union
Iterator, class UploadedFile(File):
Optional, size: Any = ...
Union, 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: ...
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: ...
def __repr__(self) -> str: ... def __repr__(self) -> str: ...
def _get_name(self) -> str: ... def _get_name(self) -> str: ...
_name: Any = ...
def _set_name(self, name: str) -> None: ... 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 io import BytesIO
from django.core.files.uploadedfile import ( from django.core.files.uploadedfile import InMemoryUploadedFile, TemporaryUploadedFile
InMemoryUploadedFile,
TemporaryUploadedFile,
)
from django.core.handlers.wsgi import WSGIRequest from django.core.handlers.wsgi import WSGIRequest
from typing import ( from typing import Any, Dict, Optional, Union
Any, class UploadFileException(Exception): ...
Dict,
Optional,
Union,
)
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: 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 __init__(self, request: WSGIRequest = ...) -> None: ...
def handle_raw_input( def handle_raw_input(self, input_data: WSGIRequest, META: Dict[str, Any], content_length: int, boundary: bytes, encoding: str = ...) -> None: ...
self, field_name: Any = ...
input_data: WSGIRequest, 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: ...
META: Dict[str, Any], def receive_data_chunk(self, raw_data: Any, start: Any) -> None: ...
content_length: int, def file_complete(self, file_size: Any) -> None: ...
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 upload_complete(self) -> None: ... def upload_complete(self) -> None: ...
class TemporaryFileUploadHandler(FileUploadHandler):
class MemoryFileUploadHandler: file: Any = ...
def file_complete(self, file_size: int) -> Optional[InMemoryUploadedFile]: ... def new_file(self, *args: Any, **kwargs: Any) -> None: ...
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: ...
def receive_data_chunk(self, raw_data: bytes, start: int) -> 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: 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 @property
def closed(self) -> bool: ... def closed(self) -> bool: ...
def readable(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 # Stubs for django.core.handlers.base (Python 3.6)
from django.http.response import ( #
FileResponse, # NOTE: This dynamically typed stub was automatically generated by stubgen.
HttpResponse,
HttpResponseBase,
)
from typing import (
Callable,
Union,
)
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: class BaseHandler:
def _get_response( _view_middleware: Any = ...
self, _template_response_middleware: Any = ...
request: WSGIRequest _exception_middleware: Any = ...
) -> Union[HttpResponse, FileResponse]: ... _middleware_chain: Any = ...
def get_response(self, request: WSGIRequest) -> HttpResponseBase: ...
def load_middleware(self) -> None: ... def load_middleware(self) -> None: ...
def make_view_atomic(self, view: Callable) -> Callable: ... def make_view_atomic(self, view: Callable) -> Callable: ...
def process_exception_by_middleware( def get_exception_response(self, request: Any, resolver: Any, status_code: Any, exception: Any): ...
self, def get_response(self, request: WSGIRequest) -> HttpResponseBase: ...
exception: Exception, def _get_response(self, request: WSGIRequest) -> Union[HttpResponse, FileResponse]: ...
request: WSGIRequest def process_exception_by_middleware(self, exception: Exception, request: WSGIRequest) -> HttpResponse: ...
) -> HttpResponse: ...

View File

@@ -1,33 +1,16 @@
from django.core.exceptions import ( # Stubs for django.core.handlers.exception (Python 3.6)
PermissionDenied, #
SuspiciousOperation, # 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.core.handlers.wsgi import WSGIRequest
from django.http.multipartparser import MultiPartParserError from django.http.multipartparser import MultiPartParserError
from django.http.response import ( from django.http.response import Http404, HttpResponse
Http404,
HttpResponse,
)
from django.urls.resolvers import URLResolver from django.urls.resolvers import URLResolver
from typing import ( from typing import Callable, Union
Callable,
Union,
)
def convert_exception_to_response(get_response: Callable) -> Callable: ... def convert_exception_to_response(get_response: Callable) -> Callable: ...
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 get_exception_response( def handle_uncaught_exception(request: Any, resolver: Any, exc_info: Any): ...
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: ...

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 io import BytesIO
from django.http.request import QueryDict from django.http.request import QueryDict
from django.http.response import HttpResponse from django.http.response import HttpResponse
from django.test.client import FakePayload from django.test.client import FakePayload
from django.utils.datastructures import MultiValueDict from django.utils.datastructures import MultiValueDict
from typing import ( from typing import Any, Callable, Dict, Optional, Union
Any, _slashes_re: 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: ...
class LimitedStream: class LimitedStream:
def __init__( stream: Any = ...
self, remaining: Any = ...
stream: Union[str, BytesIO, FakePayload], buffer: bytes = ...
limit: int, buf_size: Any = ...
buf_size: int = ... def __init__(self, stream: Union[str, BytesIO, FakePayload], limit: int, buf_size: int = ...) -> None: ...
) -> None: ...
def _read_limited(self, size: Optional[int] = ...) -> bytes: ... def _read_limited(self, size: Optional[int] = ...) -> bytes: ...
def read(self, size: Optional[int] = ...) -> bytes: ... def read(self, size: Optional[int] = ...) -> bytes: ...
def readline(self, size: Optional[int] = ...) -> bytes: ... def readline(self, size: Optional[int] = ...) -> bytes: ...
class WSGIRequest(HttpRequest):
class WSGIHandler: environ: Any = ...
def __call__(self, environ: Dict[str, Any], start_response: Callable) -> HttpResponse: ... path_info: Any = ...
def __init__(self, *args, **kwargs) -> None: ... path: Any = ...
META: Any = ...
method: Any = ...
class WSGIRequest: encoding: Any = ...
@cached_property _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]: ... def COOKIES(self) -> Dict[str, str]: ...
@property @property
def FILES(self) -> MultiValueDict: ... def FILES(self) -> MultiValueDict: ...
@cached_property POST: Any = ...
def GET(self) -> QueryDict: ...
def __init__(self, environ: Dict[str, Any]) -> None: ... class WSGIHandler(base.BaseHandler):
def _get_post(self) -> QueryDict: ... request_class: Any = ...
def _get_scheme(self) -> str: ... def __init__(self, *args: Any, **kwargs: Any) -> None: ...
def _set_post(self, post: QueryDict) -> 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