mirror of
https://github.com/yweber/lodel2.git
synced 2026-08-05 11:58:37 +02:00
fieldtypes: add ftype class attribute
This commit is contained in:
parent
756b0e0b0b
commit
fdf8afc236
4 changed files with 8 additions and 0 deletions
|
|
@ -6,6 +6,8 @@ class EmFieldType(GenericFieldType):
|
|||
|
||||
help = 'A basic boolean field'
|
||||
|
||||
ftype='char'
|
||||
|
||||
## @brief A char field
|
||||
# @brief max_length int : The maximum length of this field
|
||||
def __init__(self, **kwargs):
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ class EmFieldType(GenericFieldType):
|
|||
|
||||
help = 'A datetime field. Take two boolean options now_on_update and now_on_create'
|
||||
|
||||
ftype='datetime'
|
||||
|
||||
## @brief A datetime field
|
||||
# @param now_on_update bool : If true the date is set to NOW on update
|
||||
# @param now_on_create bool : If true the date is set to NEW on creation
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ class EmFieldType(GenericFieldType):
|
|||
|
||||
help = 'A file field. With one options upload_path'
|
||||
|
||||
ftype='char'
|
||||
|
||||
## @brief A char field
|
||||
# @brief max_length int : The maximum length of this field
|
||||
def __init__(self, upload_path=None, **kwargs):
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ class EmFieldType(GenericFieldType):
|
|||
|
||||
help = 'A text field (big string)'
|
||||
|
||||
ftype='text'
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
super(EmFieldType, self).__init__(ftype='text',**kwargs)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue