Skeletons sync

This commit is contained in:
Ilya.Kazakevich
2016-02-17 00:08:13 +03:00
parent bf226f58ab
commit 9ef33e1ab4
3 changed files with 47 additions and 0 deletions
@@ -0,0 +1,22 @@
from django.forms.forms import BoundField
class BaseForm(object):
"""
This is the main implementation of all the Form logic. Note that this
class is different than Form. See the comments by the Form class for more
information. Any improvements to the form API should be made to *this*
class, not to the Form class.
"""
def __iter__(self):
"""
:rtype: collections.Iterator[BoundField]
"""
pass
def __getitem__(self, index):
"""
:rtype: BoundField
"""
pass
@@ -0,0 +1,25 @@
from django.forms import Form
class BaseFormSet(object):
"""
A collection of instances of the same Form class.
"""
def __init__(self, data=None, files=None, auto_id='id_%s', prefix=None,
initial=None, error_class=ErrorList, form_kwargs=None):
"""
:rtype: BaseFormSet[T <= Form]
"""
def __iter__(self):
"""
:rtype: collections.Iterator[T]
"""
pass
def __getitem__(self, index):
"""
:rtype: T
"""
pass