web/views/schema.py
changeset 5811 e77cea9721e7
parent 5689 18d4e78b9369
parent 5798 74d9a062965c
child 5819 1017163825c7
equal deleted inserted replaced
5797:7183f32fad13 5811:e77cea9721e7
   573 
   573 
   574     def cell_call(self, row, col):
   574     def cell_call(self, row, col):
   575         entity = self.cw_rset.get_entity(row, col)
   575         entity = self.cw_rset.get_entity(row, col)
   576         rschema = self._cw.vreg.schema.rschema(entity.rtype.name)
   576         rschema = self._cw.vreg.schema.rschema(entity.rtype.name)
   577         rdef = rschema.rdefs[(entity.stype.name, entity.otype.name)]
   577         rdef = rschema.rdefs[(entity.stype.name, entity.otype.name)]
   578         constraints = [xml_escape(str(c)) for c in getattr(rdef, 'constraints')]
   578         constraints = [xml_escape(unicode(c)) for c in getattr(rdef, 'constraints')]
   579         self.w(u'<br/>'.join(constraints))
   579         self.w(u'<br/>'.join(constraints))
   580 
   580 
   581 class CWAttributeOptionsCell(EntityView):
   581 class CWAttributeOptionsCell(EntityView):
   582     __regid__ = 'rdef-options-cell'
   582     __regid__ = 'rdef-options-cell'
   583     __select__ = implements('CWAttribute')
   583     __select__ = implements('CWAttribute')