diff --git a/django/contrib/contenttypes/generic.py b/django/contrib/contenttypes/generic.py
index c294f74..13e7cd7 100644
a
|
b
|
class BaseGenericInlineFormSet(BaseModelFormSet):
|
307 | 307 | # Avoid a circular import. |
308 | 308 | from django.contrib.contenttypes.models import ContentType |
309 | 309 | if self.instance is None: |
310 | | return self.model._default_manager.empty() |
| 310 | return self.model._default_manager.none() |
311 | 311 | return self.model._default_manager.filter(**{ |
312 | 312 | self.ct_field.name: ContentType.objects.get_for_model(self.instance), |
313 | 313 | self.ct_fk_field.name: self.instance.pk, |
diff --git a/tests/modeltests/generic_relations/models.py b/tests/modeltests/generic_relations/models.py
index db5ae47..e6c1ee2 100644
a
|
b
|
__test__ = {'API_TESTS':"""
|
219 | 219 | >>> from django.contrib.contenttypes.generic import generic_inlineformset_factory |
220 | 220 | |
221 | 221 | >>> GenericFormSet = generic_inlineformset_factory(TaggedItem, extra=1) |
| 222 | >>> formset = GenericFormSet() |
| 223 | >>> for form in formset.forms: |
| 224 | ... print form.as_p() |
| 225 | <p><label for="id_generic_relations-taggeditem-content_type-object_id-0-tag">Tag:</label> <input id="id_generic_relations-taggeditem-content_type-object_id-0-tag" type="text" name="generic_relations-taggeditem-content_type-object_id-0-tag" maxlength="50" /></p> |
| 226 | <p><label for="id_generic_relations-taggeditem-content_type-object_id-0-DELETE">Delete:</label> <input type="checkbox" name="generic_relations-taggeditem-content_type-object_id-0-DELETE" id="id_generic_relations-taggeditem-content_type-object_id-0-DELETE" /><input type="hidden" name="generic_relations-taggeditem-content_type-object_id-0-id" id="id_generic_relations-taggeditem-content_type-object_id-0-id" /></p> |
222 | 227 | >>> formset = GenericFormSet(instance=Animal()) |
223 | 228 | >>> for form in formset.forms: |
224 | 229 | ... print form.as_p() |