From 9ef33e1ab4eab298af3b6f81fbdd08146aa2b89d Mon Sep 17 00:00:00 2001 From: "Ilya.Kazakevich" Date: Wed, 17 Feb 2016 00:08:13 +0300 Subject: [PATCH] Skeletons sync --- .../python-skeletons/django/forms/__init__.py | 0 .../python-skeletons/django/forms/forms.py | 22 ++++++++++++++++ .../python-skeletons/django/forms/formsets.py | 25 +++++++++++++++++++ 3 files changed, 47 insertions(+) create mode 100644 python/helpers/python-skeletons/django/forms/__init__.py create mode 100644 python/helpers/python-skeletons/django/forms/forms.py create mode 100644 python/helpers/python-skeletons/django/forms/formsets.py 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