[uicfg] allow autoform_section's formtype parameter to be a tuple stable
authorAdrien Di Mascio <Adrien.DiMascio@logilab.fr>
Fri, 12 Feb 2010 16:48:57 +0100
branchstable
changeset 4564 38f0562b744b
parent 4560 23e0632df615
child 4565 9f991ee66e19
[uicfg] allow autoform_section's formtype parameter to be a tuple Typical usage is: afs.tag_attribute(('X', 'y'), formtype=('main', 'muledit'), section='attributes')
web/uicfg.py
--- a/web/uicfg.py	Fri Feb 12 13:35:12 2010 +0100
+++ b/web/uicfg.py	Fri Feb 12 16:48:57 2010 +0100
@@ -312,6 +312,10 @@
             formsections.add('%s_%s' % (formtype, section))
 
     def tag_relation(self, key, formtype, section=None):
+        if isinstance(formtype, tuple):
+            for ftype in formtype:
+                self.tag_relation(key, ftype, section)
+            return
         if section is None:
             tag = formtype
             for formtype, section in self.bw_tag_map[tag].iteritems():