diff --git a/python/helpers/python-skeletons/django/forms/__init__.py b/python/helpers/python-skeletons/django/forms/__init__.py new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/python/helpers/python-skeletons/django/forms/forms.py b/python/helpers/python-skeletons/django/forms/forms.py new file mode 100644 index 000000000000..9f4b7f794348 --- /dev/null +++ b/python/helpers/python-skeletons/django/forms/forms.py @@ -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 \ No newline at end of file diff --git a/python/helpers/python-skeletons/django/forms/formsets.py b/python/helpers/python-skeletons/django/forms/formsets.py new file mode 100644 index 000000000000..2f229065ce19 --- /dev/null +++ b/python/helpers/python-skeletons/django/forms/formsets.py @@ -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