mirror of https://github.com/django/django.git
Removed InlineAdminForm.field_count()
This method is unused since 337d102b86
This commit is contained in:
parent
62df1834b8
commit
327a00f48b
|
@ -310,18 +310,6 @@ class InlineAdminForm(AdminForm):
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def field_count(self):
|
|
||||||
# tabular.html uses this function for colspan value.
|
|
||||||
num_of_fields = 0
|
|
||||||
if self.has_auto_field():
|
|
||||||
num_of_fields += 1
|
|
||||||
num_of_fields += len(self.fieldsets[0][1]["fields"])
|
|
||||||
if self.formset.can_order:
|
|
||||||
num_of_fields += 1
|
|
||||||
if self.formset.can_delete:
|
|
||||||
num_of_fields += 1
|
|
||||||
return num_of_fields
|
|
||||||
|
|
||||||
def pk_field(self):
|
def pk_field(self):
|
||||||
return AdminField(self.form, self.formset._pk_field.name, False)
|
return AdminField(self.form, self.formset._pk_field.name, False)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue