web/formfields.py
branchtls-sprint
changeset 1101 0c067de38e46
parent 1095 6917ebe281e9
child 1104 58f27c3c0167
equal deleted inserted replaced
1100:7ca89f4468e4 1101:0c067de38e46
   371     if rschema.is_final():
   371     if rschema.is_final():
   372         if rschema in eschema.format_fields:
   372         if rschema in eschema.format_fields:
   373             return None
   373             return None
   374         if targetschema == 'Password':
   374         if targetschema == 'Password':
   375             return StringField(widget=PasswordInput(), **kwargs)
   375             return StringField(widget=PasswordInput(), **kwargs)
   376         if eschema.has_format(rschema):
   376         if eschema.has_metadata(rschema, 'format'):
   377             constraints = rschema.rproperty(eschema, targetschema, 'constraints')
   377             constraints = rschema.rproperty(eschema, targetschema, 'constraints')
   378             for cstr in constraints:
   378             for cstr in constraints:
   379                 if isinstance(cstr, StaticVocabularyConstraint):
   379                 if isinstance(cstr, StaticVocabularyConstraint):
   380                     raise Exception('rich text field with static vocabulary')
   380                     raise Exception('rich text field with static vocabulary')
   381                 if isinstance(cstr, SizeConstraint) and cstr.max is not None:
   381                 if isinstance(cstr, SizeConstraint) and cstr.max is not None: