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
|
value = -1
|
||||||
return int(newforms.IntegerField.clean(self, value))
|
return int(newforms.IntegerField.clean(self, value))
|
||||||
|
|
||||||
|
def widget_attrs(self, widget):
|
||||||
|
return {'size': "8"}
|
||||||
|
|
||||||
|
|
||||||
class DelugeFloat(DelugeInt):
|
class DelugeFloat(DelugeInt):
|
||||||
def clean(self, value):
|
def clean(self, value):
|
||||||
try:
|
try:
|
||||||
|
@ -217,6 +221,14 @@ class DelugeFloat(DelugeInt):
|
||||||
pass
|
pass
|
||||||
return float(DelugeInt.clean(self, value))
|
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):
|
class StringList(Field):
|
||||||
"""for a list of strings """
|
"""for a list of strings """
|
||||||
|
|
Loading…
Reference in New Issue