コード例 #1
0
ファイル: fields.py プロジェクト: caiges/populous
 def clean(self, value):
     schema_path = get_absolute_schema_path(self.schema_path)
     xml_validator = RelaxNGValidator(schema_path, self.additional_root_element)
     
     # TODO: This shouldn't be hard-coded to `content`
     value = u"<content>%s</content>" % html_to_unicode(value)
     return xml_validator.forms_validate(value)
コード例 #2
0
ファイル: models.py プロジェクト: caiges/populous
 def get_absolute_schema_path(self):
     return get_absolute_schema_path(self.schema_path)