Merge "Minor refactor of dynamic_ui modules"
This commit is contained in:
commit
6574215468
|
@ -360,7 +360,7 @@ class TableWidget(floppyforms.widgets.Input):
|
|||
# FixME: we need to use this hack because TableField passes all kwargs
|
||||
# to TableWidget
|
||||
for kwarg in ('widget', 'description', 'description_title'):
|
||||
ignorable = kwargs.pop(kwarg, None)
|
||||
kwargs.pop(kwarg, None)
|
||||
super(TableWidget, self).__init__(*args, **kwargs)
|
||||
|
||||
def get_context(self, name, value, attrs=None):
|
||||
|
|
|
@ -46,19 +46,12 @@ def decamelize(name):
|
|||
return '_'.join([bit.lower() for bit in bits])
|
||||
|
||||
|
||||
def explode(string):
|
||||
def explode(_string):
|
||||
"""Explodes a string into a list of one-character strings."""
|
||||
if not string:
|
||||
return string
|
||||
bits = []
|
||||
while True:
|
||||
head, tail = string[0], string[1:]
|
||||
bits.append(head)
|
||||
if tail:
|
||||
string = tail
|
||||
else:
|
||||
break
|
||||
return bits
|
||||
if not _string or not isinstance(_string, basestring):
|
||||
return _string
|
||||
else:
|
||||
return list(_string)
|
||||
|
||||
|
||||
def prepare_regexp(regexp):
|
||||
|
|
Loading…
Reference in New Issue