mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-09 05:24:53 +08:00
initial commit
This commit is contained in:
61
django/forms/forms.pyi
Normal file
61
django/forms/forms.pyi
Normal file
@@ -0,0 +1,61 @@
|
||||
from django.core.exceptions import ValidationError
|
||||
from django.core.files.uploadedfile import SimpleUploadedFile
|
||||
from django.forms.boundfield import BoundField
|
||||
from django.forms.utils import (
|
||||
ErrorDict,
|
||||
ErrorList,
|
||||
)
|
||||
from django.utils.datastructures import MultiValueDict
|
||||
from django.utils.safestring import SafeText
|
||||
from typing import (
|
||||
Any,
|
||||
Dict,
|
||||
Iterator,
|
||||
List,
|
||||
Optional,
|
||||
Type,
|
||||
Union,
|
||||
)
|
||||
|
||||
|
||||
class BaseForm:
|
||||
def __getitem__(self, name: str) -> BoundField: ...
|
||||
def __init__(
|
||||
self,
|
||||
data: Any = ...,
|
||||
files: Optional[Union[Dict[str, SimpleUploadedFile], MultiValueDict]] = ...,
|
||||
auto_id: Optional[Union[str, bool]] = ...,
|
||||
prefix: Optional[str] = ...,
|
||||
initial: Any = ...,
|
||||
error_class: Type[ErrorList] = ...,
|
||||
label_suffix: None = ...,
|
||||
empty_permitted: bool = ...,
|
||||
field_order: None = ...,
|
||||
use_required_attribute: Optional[bool] = ...,
|
||||
renderer: object = ...
|
||||
) -> None: ...
|
||||
def __iter__(self) -> Iterator[BoundField]: ...
|
||||
def __repr__(self) -> str: ...
|
||||
def _clean_fields(self) -> None: ...
|
||||
def _clean_form(self) -> None: ...
|
||||
def _html_output(
|
||||
self,
|
||||
normal_row: str,
|
||||
error_row: str,
|
||||
row_ender: str,
|
||||
help_text_html: str,
|
||||
errors_on_separate_row: bool
|
||||
) -> SafeText: ...
|
||||
def _post_clean(self) -> None: ...
|
||||
def add_error(self, field: Optional[str], error: Union[str, ValidationError]) -> None: ...
|
||||
def add_initial_prefix(self, field_name: str) -> str: ...
|
||||
def add_prefix(self, field_name: str) -> str: ...
|
||||
def as_p(self) -> SafeText: ...
|
||||
def as_table(self) -> SafeText: ...
|
||||
def as_ul(self) -> SafeText: ...
|
||||
@cached_property
|
||||
def changed_data(self) -> List[str]: ...
|
||||
def clean(self) -> Dict[str, Any]: ...
|
||||
@property
|
||||
def errors(self) -> ErrorDict: ...
|
||||
def full_clean(self) -> None: ...
|
||||
Reference in New Issue
Block a user