--- a/web/test/unittest_views_editforms.py Wed Apr 29 11:53:08 2009 +0200
+++ b/web/test/unittest_views_editforms.py Wed Apr 29 12:13:47 2009 +0200
@@ -64,8 +64,8 @@
])
def test_inlined_view(self):
- self.failUnless(AEF.rinlined.etype_rtag('CWUser', 'use_email', 'subject'))
- self.failIf(AEF.rinlined.etype_rtag('CWUser', 'primary_email', 'subject'))
+ self.failUnless(AEF.rinlined.etype_get('CWUser', 'use_email', 'subject'))
+ self.failIf(AEF.rinlined.etype_get('CWUser', 'primary_email', 'subject'))
def test_personne_relations_by_category(self):
e = self.etype_instance('Personne')
--- a/web/views/autoform.py Wed Apr 29 11:53:08 2009 +0200
+++ b/web/views/autoform.py Wed Apr 29 12:13:47 2009 +0200
@@ -95,14 +95,14 @@
# permission which may imply rql queries
if categories is not None:
targetschemas = [tschema for tschema in targetschemas
- if rtags.etype_rtag(eschema, rschema, role, tschema) in categories]
+ if rtags.etype_get(eschema, rschema, role, tschema) in categories]
if not targetschemas:
continue
if permission is not None:
# tag allowing to hijack the permission machinery when
# permission is not verifiable until the entity is actually
# created...
- if eid is None and '%s_on_new' % permission in permsoverrides.etype_rtags(eschema, rschema, role):
+ if eid is None and '%s_on_new' % permission in permsoverrides.etype_get(eschema, rschema, role):
yield (rschema, targetschemas, role)
continue
if rschema.is_final():
@@ -161,10 +161,10 @@
if eschema is None or not name in cls_or_self.schema:
raise
rschema = cls_or_self.schema.rschema(name)
- fieldcls = cls_or_self.rfields.etype_rtag(eschema, rschema, role)
+ fieldcls = cls_or_self.rfields.etype_get(eschema, rschema, role)
if fieldcls:
return fieldcls(name=name, role=role, eidparam=True)
- widget = cls_or_self.rwidgets.etype_rtag(eschema, rschema, role)
+ widget = cls_or_self.rwidgets.etype_get(eschema, rschema, role)
if widget:
field = guess_field(eschema, rschema, role,
eidparam=True, widget=widget)
@@ -306,7 +306,7 @@
"""return true if the given relation with entity has role and a
targettype target should be inlined
"""
- return self.rinlined.etype_rtag(self.edited_entity.id, rschema, role, targettype)
+ return self.rinlined.etype_get(self.edited_entity.id, rschema, role, targettype)
def should_display_inline_creation_form(self, rschema, existant, card):
"""return true if a creation form should be inlined
--- a/web/views/baseforms.py Wed Apr 29 11:53:08 2009 +0200
+++ b/web/views/baseforms.py Wed Apr 29 12:13:47 2009 +0200
@@ -320,8 +320,8 @@
# should_* method extracted to allow overriding
def should_inline_relation_form(self, entity, rschema, targettype, role):
- return AutomaticEntityForm.rinlined.etype_rtag(entity.id, rschema, role,
- targettype)
+ return AutomaticEntityForm.rinlined.etype_get(entity.id, rschema, role,
+ targettype)
def should_display_inline_relation_form(self, rschema, existant, card):
return not existant and card in '1+'
@@ -423,8 +423,8 @@
def should_inline_relation_form(self, entity, rschema, targettype, role):
if rschema == self.rschema:
return False
- return AutomaticEntityForm.rinlined.etype_rtag(entity.id, rschema, role,
- targettype)
+ return AutomaticEntityForm.rinlined.etype_get(entity.id, rschema, role,
+ targettype)
@cached
def keep_entity(self, entity):
--- a/web/views/boxes.py Wed Apr 29 11:53:08 2009 +0200
+++ b/web/views/boxes.py Wed Apr 29 12:13:47 2009 +0200
@@ -72,8 +72,8 @@
to a new entity ('create' mode) or to an existant entity ('link' mode)
"""
if role == 'subject':
- return cls.rmode.rtag(rtype, role, etype, targettype)
- return cls.rmode.rtag(rtype, role, targettype, etype)
+ return cls.rmode.get(rtype, role, etype, targettype)
+ return cls.rmode.get(rtype, role, targettype, etype)
def call(self, view=None, **kwargs):