306 def tag_relation(self, key, formtype, section=None): |
306 def tag_relation(self, key, formtype, section=None): |
307 if section is None: |
307 if section is None: |
308 tag = formtype |
308 tag = formtype |
309 for formtype, section in self.bw_tag_map[tag].iteritems(): |
309 for formtype, section in self.bw_tag_map[tag].iteritems(): |
310 warn('[3.6] add tag to autoform section by specifying form ' |
310 warn('[3.6] add tag to autoform section by specifying form ' |
311 'type and tag. Replace %s by formtype=%s, section=%s' |
311 'type and tag. Replace %s by formtype="%s", section="%s"' |
312 % (tag, formtype, section), DeprecationWarning, |
312 % (tag, formtype, section), DeprecationWarning, |
313 stacklevel=3) |
313 stacklevel=3) |
314 self.tag_relation(key, formtype, section) |
314 self.tag_relation(key, formtype, section) |
315 assert formtype in self._allowed_form_types, \ |
315 assert formtype in self._allowed_form_types, \ |
316 'formtype should be in (%s), not %s' % ( |
316 'formtype should be in (%s), not %s' % ( |