improved version

This commit is contained in:
Maxim Kurnikov
2018-07-29 20:06:41 +03:00
parent c180555415
commit 89bb6eac75
160 changed files with 1007 additions and 607 deletions

View File

@@ -1,11 +1,13 @@
from django.forms.fields import Field
from django.forms.forms import BaseForm
from django.forms.forms import Form
from django.forms.models import ModelForm
from django.forms.renderers import DjangoTemplates
from django.forms.utils import ErrorList
from django.forms.widgets import (
ChoiceWidget,
HiddenInput,
SplitHiddenDateTimeWidget,
Widget,
)
from django.utils.safestring import SafeText
from typing import (
@@ -20,9 +22,14 @@ from typing import (
class BoundField:
def __getitem__(
self,
idx: Union[str, slice, int]
) -> Union[BoundWidget, List[BoundWidget]]: ...
def __init__(self, form: BaseForm, field: Field, name: str) -> None: ...
idx: Union[slice, str, int]
) -> Union[List[BoundWidget], BoundWidget]: ...
def __init__(
self,
form: Union[Form, ModelForm],
field: Field,
name: str
) -> None: ...
def __len__(self) -> int: ...
def as_hidden(self, attrs: None = ..., **kwargs) -> SafeText: ...
def as_text(self, attrs: None = ..., **kwargs) -> SafeText: ...
@@ -35,7 +42,11 @@ class BoundField:
) -> SafeText: ...
@property
def auto_id(self) -> str: ...
def build_widget_attrs(self, attrs: Dict[str, str], widget: Any = ...) -> Dict[str, Union[bool, str]]: ...
def build_widget_attrs(
self,
attrs: Dict[str, str],
widget: Optional[Widget] = ...
) -> Dict[str, Union[bool, str]]: ...
def css_classes(self, extra_classes: None = ...) -> str: ...
@property
def data(self) -> Any: ...