mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Start attacking E231 violations
This commit is contained in:
@@ -859,7 +859,7 @@ class BaseInlineFormSet(BaseModelFormSet):
|
||||
@classmethod
|
||||
def get_default_prefix(cls):
|
||||
from django.db.models.fields.related import RelatedObject
|
||||
return RelatedObject(cls.fk.rel.to, cls.model, cls.fk).get_accessor_name().replace('+','')
|
||||
return RelatedObject(cls.fk.rel.to, cls.model, cls.fk).get_accessor_name().replace('+', '')
|
||||
|
||||
def save_new(self, form, commit=True):
|
||||
# Use commit=False so we can assign the parent key afterwards, then
|
||||
|
||||
@@ -660,7 +660,7 @@ class ChoiceFieldRenderer(object):
|
||||
output = [start_tag]
|
||||
for i, choice in enumerate(self.choices):
|
||||
choice_value, choice_label = choice
|
||||
if isinstance(choice_label, (tuple,list)):
|
||||
if isinstance(choice_label, (tuple, list)):
|
||||
attrs_plus = self.attrs.copy()
|
||||
if id_:
|
||||
attrs_plus['id'] += '_{0}'.format(i)
|
||||
|
||||
Reference in New Issue
Block a user