mirror of
https://github.com/yweber/lodel2.git
synced 2026-06-14 06:20:48 +02:00
[#50] Added the management of "integer" AND "int" in EmField (in the get_field_class method)
This commit is contained in:
parent
ed48c64ab8
commit
d2d193e58f
2 changed files with 6 additions and 2 deletions
|
|
@ -57,7 +57,11 @@ class EmField(EmComponent):
|
||||||
# @throw When not found
|
# @throw When not found
|
||||||
# @see EmField::fieldtypes()
|
# @see EmField::fieldtypes()
|
||||||
def get_field_class(ftype, **kwargs):
|
def get_field_class(ftype, **kwargs):
|
||||||
ftype_module = importlib.import_module('EditorialModel.fieldtypes.%s'%ftype)
|
if ftype == 'integer':
|
||||||
|
ftype_module = importlib.import_module('EditorialModel.fieldtypes.int')
|
||||||
|
else:
|
||||||
|
ftype_module = importlib.import_module('EditorialModel.fieldtypes.%s'%ftype)
|
||||||
|
|
||||||
return ftype_module.fclass
|
return ftype_module.fclass
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,6 @@ class EmFieldInt(EmField):
|
||||||
help = 'Basic integer field'
|
help = 'Basic integer field'
|
||||||
|
|
||||||
def __init__(self, **kwargs):
|
def __init__(self, **kwargs):
|
||||||
super(EmFieldChar, self).__init__(**kwargs)
|
super(EmFieldInt, self).__init__(**kwargs)
|
||||||
|
|
||||||
fclass=EmFieldInt
|
fclass=EmFieldInt
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue