web/views/editforms.py
branchstable
changeset 3331 8e63b72287b1
parent 3327 44efba78afac
child 3346 b1fd9d4ef579
equal deleted inserted replaced
3330:2fa09be849e7 3331:8e63b72287b1
   519         :param peid: the parent entity's eid hosting the inline form
   519         :param peid: the parent entity's eid hosting the inline form
   520         :param rtype: the relation bridging `etype` and `peid`
   520         :param rtype: the relation bridging `etype` and `peid`
   521         :param role: the role played by the `peid` in the relation
   521         :param role: the role played by the `peid` in the relation
   522         """
   522         """
   523         try:
   523         try:
   524             entity = self.vreg['etypes'].etype_class(etype)(self.req, None, None)
   524             cls = self.vreg['etypes'].etype_class(etype)
   525         except:
   525         except:
   526             self.w(self.req._('no such entity type %s') % etype)
   526             self.w(self.req._('no such entity type %s') % etype)
   527             return
   527             return
   528         self.initialize_varmaker()
   528         self.initialize_varmaker()
       
   529         entity = cls(self.req)
   529         entity.eid = self.varmaker.next()
   530         entity.eid = self.varmaker.next()
   530         self.render_form(entity, peid, rtype, role, i18nctx)
   531         self.render_form(entity, peid, rtype, role, i18nctx)