Example #1
0
 def to_dict(self, to_export=False):
     d = super(ImageField, self).to_dict(to_export=to_export)
     d['showPlaceholder'] = is_db_true(d.get('showPlaceholder', '0'))
     types = d.get('mimeTypes', '').split('|')
     d['mimeTypes'] = {}
     for typ in types:
         if typ:
             d['mimeTypes'][typ] = True
     return d
Example #2
0
 def to_dict(self, to_export=False):
     d = super(ImageField, self).to_dict(to_export=to_export)
     d['showPlaceholder'] = is_db_true(d.get('showPlaceholder', '0'))
     types = d.get('mimeTypes', '').split('|')
     d['mimeTypes'] = {}
     for typ in types:
         if typ:
             d['mimeTypes'][typ] = True
     return d
Example #3
0
 def to_dict(self, to_export=False):
     d = super(TextBase, self).to_dict(to_export=to_export)
     d['enableWords'] = is_db_true(d.get('enableWords', '0'))
     d['enableLength'] = is_db_true(d.get('enableLength', '0'))
     return d