mirror of
https://github.com/davidhalter/django-stubs.git
synced 2026-05-11 09:08:28 +08:00
enable bunch of folders
This commit is contained in:
@@ -15,6 +15,25 @@ from .widgets import (
|
||||
Select as Select,
|
||||
CheckboxInput as CheckboxInput,
|
||||
CheckboxSelectMultiple as CheckboxSelectMultiple,
|
||||
Media as Media,
|
||||
MultiWidget as MultiWidget,
|
||||
TextInput as TextInput,
|
||||
Textarea as Textarea,
|
||||
Input as Input,
|
||||
ClearableFileInput as ClearableFileInput,
|
||||
DateInput as DateInput,
|
||||
DateTimeBaseInput as DateTimeBaseInput,
|
||||
DateTimeInput as DateTimeInput,
|
||||
EmailInput as EmailInput,
|
||||
FileInput as FileInput,
|
||||
HiddenInput as HiddenInput,
|
||||
MultipleHiddenInput as MultipleHiddenInput,
|
||||
NullBooleanSelect as NullBooleanSelect,
|
||||
PasswordInput as PasswordInput,
|
||||
RadioSelect as RadioSelect,
|
||||
SelectMultiple as SelectMultiple,
|
||||
TimeInput as TimeInput,
|
||||
URLInput as URLInput,
|
||||
)
|
||||
|
||||
from .fields import (
|
||||
@@ -26,4 +45,23 @@ from .fields import (
|
||||
ImageField as ImageField,
|
||||
DateTimeField as DateTimeField,
|
||||
DateField as DateField,
|
||||
BooleanField as BooleanField,
|
||||
EmailField as EmailField,
|
||||
FloatField as FloatField,
|
||||
MultiValueField as MultiValueField,
|
||||
MultipleChoiceField as MultipleChoiceField,
|
||||
NullBooleanField as NullBooleanField,
|
||||
SplitDateTimeField as SplitDateTimeField,
|
||||
TimeField as TimeField,
|
||||
IntegerField as IntegerField,
|
||||
FilePathField as FilePathField,
|
||||
DecimalField as DecimalField,
|
||||
UUIDField as UUIDField,
|
||||
URLField as URLField,
|
||||
ComboField as ComboField,
|
||||
GenericIPAddressField as GenericIPAddressField,
|
||||
RegexField as RegexField,
|
||||
SlugField as SlugField,
|
||||
TypedChoiceField as TypedChoiceField,
|
||||
TypedMultipleChoiceField as TypedMultipleChoiceField,
|
||||
)
|
||||
|
||||
@@ -6,6 +6,16 @@ from django.forms.utils import ErrorList
|
||||
|
||||
from django.forms import Form
|
||||
|
||||
TOTAL_FORM_COUNT: str = ...
|
||||
INITIAL_FORM_COUNT: str = ...
|
||||
MIN_NUM_FORM_COUNT: str = ...
|
||||
MAX_NUM_FORM_COUNT: str = ...
|
||||
ORDERING_FIELD_NAME: str = ...
|
||||
DELETION_FIELD_NAME: str = ...
|
||||
|
||||
DEFAULT_MIN_NUM: int = ...
|
||||
DEFAULT_MAX_NUM: int = ...
|
||||
|
||||
class ManagementForm(Form):
|
||||
auto_id: Union[bool, str]
|
||||
cleaned_data: Dict[str, Optional[int]]
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
from collections import OrderedDict
|
||||
from datetime import date, datetime
|
||||
from typing import Any, Callable, Dict, Iterator, List, Optional, Tuple, Type, Union
|
||||
from typing import Any, Callable, Dict, Iterator, List, Optional, Tuple, Type, Union, Sequence
|
||||
from unittest.mock import MagicMock
|
||||
from uuid import UUID
|
||||
|
||||
from django.core.files.uploadedfile import SimpleUploadedFile
|
||||
from django.db.models import ForeignKey
|
||||
from django.db.models.base import Model
|
||||
from django.db.models.manager import Manager
|
||||
from django.db.models.query import QuerySet
|
||||
@@ -136,23 +137,23 @@ class BaseModelFormSet(BaseFormSet):
|
||||
def modelformset_factory(
|
||||
model: Type[Model],
|
||||
form: Type[ModelForm] = ...,
|
||||
formfield_callback: None = ...,
|
||||
formfield_callback: Optional[Callable] = ...,
|
||||
formset: Type[BaseModelFormSet] = ...,
|
||||
extra: int = ...,
|
||||
can_delete: bool = ...,
|
||||
can_order: bool = ...,
|
||||
max_num: None = ...,
|
||||
fields: None = ...,
|
||||
exclude: None = ...,
|
||||
widgets: None = ...,
|
||||
min_num: Optional[int] = ...,
|
||||
max_num: Optional[int] = ...,
|
||||
fields: Optional[Union[str, Sequence[str]]] = ...,
|
||||
exclude: Optional[Sequence[str]] = ...,
|
||||
widgets: Optional[Dict[str, Any]] = ...,
|
||||
validate_max: bool = ...,
|
||||
localized_fields: None = ...,
|
||||
labels: None = ...,
|
||||
help_texts: None = ...,
|
||||
error_messages: None = ...,
|
||||
min_num: None = ...,
|
||||
labels: Optional[Dict[str, str]] = ...,
|
||||
help_texts: Optional[Dict[str, str]] = ...,
|
||||
error_messages: Optional[Dict[str, Dict[str, str]]] = ...,
|
||||
validate_min: bool = ...,
|
||||
field_classes: None = ...,
|
||||
field_classes: Optional[Dict[str, Any]] = ...,
|
||||
) -> Any: ...
|
||||
|
||||
class BaseInlineFormSet(BaseModelFormSet):
|
||||
@@ -182,22 +183,22 @@ def inlineformset_factory(
|
||||
form: Type[ModelForm] = ...,
|
||||
formset: Type[BaseInlineFormSet] = ...,
|
||||
fk_name: Optional[str] = ...,
|
||||
fields: Optional[str] = ...,
|
||||
exclude: None = ...,
|
||||
fields: Optional[Union[str, Sequence[str]]] = ...,
|
||||
exclude: Optional[Sequence[str]] = ...,
|
||||
extra: int = ...,
|
||||
can_order: bool = ...,
|
||||
can_delete: bool = ...,
|
||||
max_num: None = ...,
|
||||
formfield_callback: None = ...,
|
||||
widgets: None = ...,
|
||||
max_num: Optional[int] = ...,
|
||||
formfield_callback: Optional[Callable] = ...,
|
||||
widgets: Optional[Dict[str, Any]] = ...,
|
||||
validate_max: bool = ...,
|
||||
localized_fields: None = ...,
|
||||
labels: None = ...,
|
||||
help_texts: None = ...,
|
||||
error_messages: None = ...,
|
||||
min_num: None = ...,
|
||||
labels: Optional[Dict[str, str]] = ...,
|
||||
help_texts: Optional[Dict[str, str]] = ...,
|
||||
error_messages: Optional[Dict[str, Dict[str, str]]] = ...,
|
||||
min_num: Optional[int] = ...,
|
||||
validate_min: bool = ...,
|
||||
field_classes: None = ...,
|
||||
field_classes: Optional[Dict[str, Any]] = ...,
|
||||
) -> Any: ...
|
||||
|
||||
class InlineForeignKeyField(Field):
|
||||
@@ -266,3 +267,7 @@ class ModelMultipleChoiceField(ModelChoiceField):
|
||||
hidden_widget: Any = ...
|
||||
default_error_messages: Any = ...
|
||||
def __init__(self, queryset: QuerySet, **kwargs: Any) -> None: ...
|
||||
|
||||
def _get_foreign_key(
|
||||
parent_model: Type[Model], model: Type[Model], fk_name: Optional[str] = ..., can_fail: bool = ...
|
||||
) -> ForeignKey: ...
|
||||
|
||||
Reference in New Issue
Block a user