web/uicfg.py
changeset 5849 9db65b381028
parent 5712 e136d392bd71
parent 5842 10efd227648e
child 5869 8a129b3a5aff
equal deleted inserted replaced
5840:60880c81e32e 5849:9db65b381028
   282                 if tag.startswith(formtype):
   282                 if tag.startswith(formtype):
   283                     rtags.remove(tag)
   283                     rtags.remove(tag)
   284         rtags.add('%s_%s' % (formtype, section))
   284         rtags.add('%s_%s' % (formtype, section))
   285         return rtags
   285         return rtags
   286 
   286 
   287     def init_get(self, *key):
   287     def init_get(self, stype, rtype, otype, tagged):
   288         return super(AutoformSectionRelationTags, self).get(*key)
   288         key = (stype, rtype, otype, tagged)
       
   289         rtags = {}
       
   290         for key in self._get_keys(stype, rtype, otype, tagged):
       
   291             tags = self._tagdefs.get(key, ())
       
   292             for tag in tags:
       
   293                 assert '_' in tag, (tag, tags)
       
   294                 section, value = tag.split('_', 1)
       
   295                 rtags[section] = value
       
   296         cls = self.tag_container_cls
       
   297         rtags = cls('_'.join([section,value]) for section,value in rtags.iteritems())
       
   298         return rtags
       
   299 
   289 
   300 
   290     def get(self, *key):
   301     def get(self, *key):
   291         # overriden to avoid recomputing done in parent classes
   302         # overriden to avoid recomputing done in parent classes
   292         return self._tagdefs.get(key, ())
   303         return self._tagdefs.get(key, ())
   293 
   304