smaller default size for newforms floats and ints
This commit is contained in:
parent
35ebf57060
commit
ab8362432b
|
@ -209,6 +209,10 @@ class DelugeInt(newforms.IntegerField):
|
|||
value = -1
|
||||
return int(newforms.IntegerField.clean(self, value))
|
||||
|
||||
def widget_attrs(self, widget):
|
||||
return {'size': "8"}
|
||||
|
||||
|
||||
class DelugeFloat(DelugeInt):
|
||||
def clean(self, value):
|
||||
try:
|
||||
|
@ -217,6 +221,14 @@ class DelugeFloat(DelugeInt):
|
|||
pass
|
||||
return float(DelugeInt.clean(self, value))
|
||||
|
||||
def widget_attrs(self, widget):
|
||||
return {'size': "8"}
|
||||
|
||||
class FloatField(newforms.FloatField):
|
||||
def widget_attrs(self, widget):
|
||||
return {'size': "8"}
|
||||
|
||||
|
||||
|
||||
class StringList(Field):
|
||||
"""for a list of strings """
|
||||
|
|
Loading…
Reference in New Issue