equal
deleted
inserted
replaced
306 |
306 |
307 def call(self, **kwargs): |
307 def call(self, **kwargs): |
308 """creation view for an entity""" |
308 """creation view for an entity""" |
309 etype = kwargs.pop('etype', self.req.form.get('etype')) |
309 etype = kwargs.pop('etype', self.req.form.get('etype')) |
310 try: |
310 try: |
311 entity = self.vreg.etype_class(etype)(self.req) |
311 entity = self.vreg['etypes'].etype_class(etype)(self.req) |
312 except: |
312 except: |
313 self.w(self.req._('no such entity type %s') % etype) |
313 self.w(self.req._('no such entity type %s') % etype) |
314 else: |
314 else: |
315 self.initialize_varmaker() |
315 self.initialize_varmaker() |
316 entity.eid = self.varmaker.next() |
316 entity.eid = self.varmaker.next() |
495 :param peid: the parent entity's eid hosting the inline form |
495 :param peid: the parent entity's eid hosting the inline form |
496 :param rtype: the relation bridging `etype` and `peid` |
496 :param rtype: the relation bridging `etype` and `peid` |
497 :param role: the role played by the `peid` in the relation |
497 :param role: the role played by the `peid` in the relation |
498 """ |
498 """ |
499 try: |
499 try: |
500 entity = self.vreg.etype_class(etype)(self.req, None, None) |
500 entity = self.vreg['etypes'].etype_class(etype)(self.req, None, None) |
501 except: |
501 except: |
502 self.w(self.req._('no such entity type %s') % etype) |
502 self.w(self.req._('no such entity type %s') % etype) |
503 return |
503 return |
504 self.initialize_varmaker() |
504 self.initialize_varmaker() |
505 entity.eid = self.varmaker.next() |
505 entity.eid = self.varmaker.next() |