Changeset 8243
- Timestamp:
- 08/08/08 15:27:48 (3 months ago)
- Files:
-
- django/trunk/django/contrib/admin/options.py (modified) (2 diffs)
- django/trunk/django/forms/models.py (modified) (4 diffs)
- django/trunk/docs/admin.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/django/contrib/admin/options.py
r8240 r8243 2 2 from django.forms.formsets import all_valid 3 3 from django.forms.models import modelform_factory, inlineformset_factory 4 from django.forms.models import BaseInlineForm set4 from django.forms.models import BaseInlineFormSet 5 5 from django.contrib.contenttypes.models import ContentType 6 6 from django.contrib.admin import widgets … … 736 736 model = None 737 737 fk_name = None 738 formset = BaseInlineForm set738 formset = BaseInlineFormSet 739 739 extra = 3 740 740 max_num = 0 django/trunk/django/forms/models.py
r8179 r8243 401 401 # InlineFormSets ############################################################# 402 402 403 class BaseInlineForm set(BaseModelFormSet):403 class BaseInlineFormSet(BaseModelFormSet): 404 404 """A formset for child objects related to a parent.""" 405 405 def __init__(self, data=None, files=None, instance=None, … … 410 410 # is there a better way to get the object descriptor? 411 411 self.rel_name = RelatedObject(self.fk.rel.to, self.model, self.fk).get_accessor_name() 412 super(BaseInlineForm set, self).__init__(data, files, prefix=prefix or self.rel_name)412 super(BaseInlineFormSet, self).__init__(data, files, prefix=prefix or self.rel_name) 413 413 414 414 def _construct_forms(self): … … 416 416 self._total_form_count = self._initial_form_count 417 417 self._initial_form_count = 0 418 super(BaseInlineForm set, self)._construct_forms()418 super(BaseInlineFormSet, self)._construct_forms() 419 419 420 420 def get_queryset(self): … … 467 467 468 468 def inlineformset_factory(parent_model, model, form=ModelForm, 469 formset=BaseInlineForm set, fk_name=None,469 formset=BaseInlineFormSet, fk_name=None, 470 470 fields=None, exclude=None, 471 471 extra=3, can_order=False, can_delete=True, max_num=0, 472 472 formfield_callback=lambda f: f.formfield()): 473 473 """ 474 Returns an ``InlineForm set`` for the given kwargs.474 Returns an ``InlineFormSet`` for the given kwargs. 475 475 476 476 You must provide ``fk_name`` if ``model`` has more than one ``ForeignKey`` django/trunk/docs/admin.txt
r8241 r8243 609 609 ~~~~~~~~~~~ 610 610 611 This defaults to ``BaseInlineForm set``. Using your own formset can give you611 This defaults to ``BaseInlineFormSet``. Using your own formset can give you 612 612 many possibilities of customization. Inlines are built around 613 613 `model formsets`_.
