mirror of https://github.com/django/django.git
[1.8.x] Removed InlineAdminForm.field_count()
This method is unused since337d102b86
Backport of327a00f48b
from master
This commit is contained in:
parent
fe770a6452
commit
26e07a996d
|
@ -310,18 +310,6 @@ class InlineAdminForm(AdminForm):
|
|||
return True
|
||||
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):
|
||||
return AdminField(self.form, self.formset._pk_field.name, False)
|
||||
|
||||
|
|
Loading…
Reference in New Issue