entities/__init__.py
changeset 2793 bfb21f7a0d13
parent 2658 5535857eeaa5
child 2819 b864288fd316
equal deleted inserted replaced
2789:39712da6f397 2793:bfb21f7a0d13
   223         else:
   223         else:
   224             tschema = rschema.subjects(cls.e_schema)[0]
   224             tschema = rschema.subjects(cls.e_schema)[0]
   225             wdg = widget(cls.vreg, tschema, rschema, cls, 'object')
   225             wdg = widget(cls.vreg, tschema, rschema, cls, 'object')
   226         return wdg
   226         return wdg
   227 
   227 
   228     @deprecated('use EntityFieldsForm.subject_relation_vocabulary')
   228     @deprecated('[3.4] use EntityFieldsForm.subject_relation_vocabulary')
   229     def subject_relation_vocabulary(self, rtype, limit):
   229     def subject_relation_vocabulary(self, rtype, limit):
   230         form = self.vreg.select('forms', 'edition', self.req, entity=self)
   230         form = self.vreg.select('forms', 'edition', self.req, entity=self)
   231         return form.subject_relation_vocabulary(rtype, limit)
   231         return form.subject_relation_vocabulary(rtype, limit)
   232 
   232 
   233     @deprecated('use EntityFieldsForm.object_relation_vocabulary')
   233     @deprecated('[3.4] use EntityFieldsForm.object_relation_vocabulary')
   234     def object_relation_vocabulary(self, rtype, limit):
   234     def object_relation_vocabulary(self, rtype, limit):
   235         form = self.vreg.select('forms', 'edition', self.req, entity=self)
   235         form = self.vreg.select('forms', 'edition', self.req, entity=self)
   236         return form.object_relation_vocabulary(rtype, limit)
   236         return form.object_relation_vocabulary(rtype, limit)
   237 
   237 
   238     @deprecated('use AutomaticEntityForm.[e]relations_by_category')
   238     @deprecated('[3.4] use AutomaticEntityForm.[e]relations_by_category')
   239     def relations_by_category(self, categories=None, permission=None):
   239     def relations_by_category(self, categories=None, permission=None):
   240         from cubicweb.web.views.autoform import AutomaticEntityForm
   240         from cubicweb.web.views.autoform import AutomaticEntityForm
   241         return AutomaticEntityForm.erelations_by_category(self, categories, permission)
   241         return AutomaticEntityForm.erelations_by_category(self, categories, permission)
   242 
   242 
   243     @deprecated('use AutomaticEntityForm.[e]srelations_by_category')
   243     @deprecated('[3.4] use AutomaticEntityForm.[e]srelations_by_category')
   244     def srelations_by_category(self, categories=None, permission=None):
   244     def srelations_by_category(self, categories=None, permission=None):
   245         from cubicweb.web.views.autoform import AutomaticEntityForm
   245         from cubicweb.web.views.autoform import AutomaticEntityForm
   246         return AutomaticEntityForm.esrelations_by_category(self, categories, permission)
   246         return AutomaticEntityForm.esrelations_by_category(self, categories, permission)
   247 
   247 
   248     def attribute_values(self, attrname):
   248     def attribute_values(self, attrname):