PEP8 cleanups
This commit is contained in:
@@ -236,18 +236,6 @@ class Link(object):
|
||||
return resolved_link
|
||||
|
||||
|
||||
class ModelListColumn(object):
|
||||
_model_list_columns = {}
|
||||
|
||||
@classmethod
|
||||
def get_model(cls, model):
|
||||
return cls._model_list_columns.get(model)
|
||||
|
||||
def __init__(self, model, name, attribute):
|
||||
self.__class__._model_list_columns.setdefault(model, [])
|
||||
self.__class__._model_list_columns[model].extend(columns)
|
||||
|
||||
|
||||
class SourceColumn(object):
|
||||
_registry = {}
|
||||
|
||||
|
||||
@@ -8,20 +8,7 @@ class MultiItemForm(forms.Form):
|
||||
def __init__(self, *args, **kwargs):
|
||||
actions = kwargs.pop('actions', [])
|
||||
super(MultiItemForm, self).__init__(*args, **kwargs)
|
||||
choices = []
|
||||
group = []
|
||||
|
||||
for action in actions:
|
||||
if not action[0]:
|
||||
if group:
|
||||
choices.append((link_spacer['text'], group))
|
||||
group = []
|
||||
else:
|
||||
group.append(action)
|
||||
|
||||
if choices:
|
||||
self.fields['action'].choices = choices
|
||||
else:
|
||||
self.fields['action'].choices = group
|
||||
self.fields['action'].choices = actions
|
||||
|
||||
action = forms.ChoiceField(label=_('Actions'), required=False)
|
||||
|
||||
Reference in New Issue
Block a user