schema.py
branchtls-sprint
changeset 745 3e46854acf58
parent 715 83228d379cbe
child 1016 26387b836099
equal deleted inserted replaced
744:4da6e0f4df2a 745:3e46854acf58
   974         """
   974         """
   975         return cls()
   975         return cls()
   976     
   976     
   977     def vocabulary(self, entity=None):
   977     def vocabulary(self, entity=None):
   978         if entity and entity.req.user.has_permission(PERM_USE_TEMPLATE_FORMAT):
   978         if entity and entity.req.user.has_permission(PERM_USE_TEMPLATE_FORMAT):
   979             return self.regular_formats + self.need_perm_formats
   979             return self.regular_formats + tuple(self.need_perm_formats)
   980         return self.regular_formats
   980         return self.regular_formats
   981     
   981     
   982     def __str__(self):
   982     def __str__(self):
   983         return 'value in (%s)' % u', '.join(repr(unicode(word)) for word in self.vocabulary())
   983         return 'value in (%s)' % u', '.join(repr(unicode(word)) for word in self.vocabulary())
   984     
   984