diff --git a/registrasion/forms.py b/registrasion/forms.py index 68302f56..f7157c82 100644 --- a/registrasion/forms.py +++ b/registrasion/forms.py @@ -47,7 +47,7 @@ class ManualPaymentForm(forms.ModelForm): # Products forms -- none of these have any fields: they are to be subclassed # and the fields added as needs be. -class _ProductsForm(forms.Form): +class _HasProductsFields(object): PRODUCT_PREFIX = "product_" @@ -57,7 +57,7 @@ class _ProductsForm(forms.Form): initial = self.initial_data(k["product_quantities"]) k["initial"] = initial del k["product_quantities"] - super(_ProductsForm, self).__init__(*a, **k) + super(_ProductsFieldsHelpers, self).__init__(*a, **k) @classmethod def field_name(cls, product): @@ -81,6 +81,10 @@ class _ProductsForm(forms.Form): return iter([]) +class _ProductsForm(_HasProductsFields, forms.Form): + pass + + class _QuantityBoxProductsForm(_ProductsForm): ''' Products entry form that allows users to enter quantities of desired products. '''