can now give context to rschema.display_name(...)
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 25 Sep 2009 11:23:11 +0200
changeset 3471 8c57c71b859c
parent 3469 1e28876c4b55
child 3472 5345570eefc6
can now give context to rschema.display_name(...)
schema.py
--- a/schema.py	Fri Sep 25 09:09:02 2009 +0200
+++ b/schema.py	Fri Sep 25 11:23:11 2009 +0200
@@ -119,11 +119,11 @@
 
 __builtins__['display_name'] = deprecated('[3.4] display_name should be imported from cubicweb.schema')(display_name)
 
-def ERSchema_display_name(self, req, form=''):
+def ERSchema_display_name(self, req, form='', context=None):
     """return a internationalized string for the entity/relation type name in
     a given form
     """
-    return display_name(req, self.type, form)
+    return display_name(req, self.type, form, context)
 ERSchema.display_name = ERSchema_display_name
 
 @cached