Browse Source

fieldtypes: add ftype class attribute

ArnAud 9 years ago
parent
commit
fdf8afc236

+ 2
- 0
EditorialModel/fieldtypes/bool.py View File

@@ -6,6 +6,8 @@ class EmFieldType(GenericFieldType):
6 6
 
7 7
     help = 'A basic boolean field'
8 8
 
9
+    ftype='char'
10
+
9 11
     ## @brief A char field
10 12
     # @brief max_length int : The maximum length of this field
11 13
     def __init__(self, **kwargs):

+ 2
- 0
EditorialModel/fieldtypes/datetime.py View File

@@ -6,6 +6,8 @@ class EmFieldType(GenericFieldType):
6 6
 
7 7
     help = 'A datetime field. Take two boolean options now_on_update and now_on_create'
8 8
 
9
+    ftype='datetime'
10
+
9 11
     ## @brief A datetime field
10 12
     # @param now_on_update bool : If true the date is set to NOW on update
11 13
     # @param now_on_create bool : If true the date is set to NEW on creation

+ 2
- 0
EditorialModel/fieldtypes/file.py View File

@@ -6,6 +6,8 @@ class EmFieldType(GenericFieldType):
6 6
 
7 7
     help = 'A file field. With one options upload_path'
8 8
 
9
+    ftype='char'
10
+
9 11
     ## @brief A char field
10 12
     # @brief max_length int : The maximum length of this field
11 13
     def __init__(self, upload_path=None, **kwargs):

+ 2
- 0
EditorialModel/fieldtypes/text.py View File

@@ -6,6 +6,8 @@ class EmFieldType(GenericFieldType):
6 6
 
7 7
     help = 'A text field (big string)'
8 8
 
9
+    ftype='text'
10
+
9 11
     def __init__(self, **kwargs):
10 12
         super(EmFieldType, self).__init__(ftype='text',**kwargs)
11 13
 

Loading…
Cancel
Save