# HG changeset patch # User Sylvain Thénault # Date 1260259839 -3600 # Node ID 4f8235204dda422ebecb9f80ed61c0c5da8fa8ee # Parent 24f7d7eb4c23917226c462d660c2ca84c2a2a68f some cw 3.6 api update diff -r 24f7d7eb4c23 -r 4f8235204dda test/unittest_entity.py --- a/test/unittest_entity.py Tue Dec 08 09:10:16 2009 +0100 +++ b/test/unittest_entity.py Tue Dec 08 09:10:39 2009 +0100 @@ -405,7 +405,7 @@ e['data_name'] = 'an html file' e['data_format'] = 'text/html' e['data_encoding'] = 'ascii' - e.req.transaction_data = {} # XXX req should be a session + e._cw.transaction_data = {} # XXX req should be a session self.assertEquals(set(e.get_words()), set(['an', 'html', 'file', 'du', 'html', 'some', 'data'])) diff -r 24f7d7eb4c23 -r 4f8235204dda web/uicfg.py --- a/web/uicfg.py Tue Dec 08 09:10:16 2009 +0100 +++ b/web/uicfg.py Tue Dec 08 09:10:39 2009 +0100 @@ -360,7 +360,7 @@ continue rdef = rschema.role_rdef(eschema, tschema, role) if not ((not strict and rdef.has_local_role(permission)) or - rdef.has_perm(entity.req, permission, fromeid=eid)): + rdef.has_perm(entity._cw, permission, fromeid=eid)): continue _targetschemas.append(tschema) if not _targetschemas: diff -r 24f7d7eb4c23 -r 4f8235204dda web/views/autoform.py --- a/web/views/autoform.py Tue Dec 08 09:10:16 2009 +0100 +++ b/web/views/autoform.py Tue Dec 08 09:10:39 2009 +0100 @@ -59,9 +59,9 @@ try: return super(AutomaticEntityForm, cls_or_self).field_by_name(name, role) except form.FieldNotFound: - if eschema is None or not name in cls_or_self._cw.schema: + if eschema is None or not name in cls_or_self._cw.vreg.schema: raise - rschema = cls_or_self._cw.schema.rschema(name) + rschema = cls_or_self._cw.vreg.schema.rschema(name) # XXX use a sample target type. Document this. tschemas = rschema.targets(eschema, role) fieldcls = cls_or_self.rfields.etype_get(eschema, rschema, role,