def create_custom_text(self, tup):
"""Create custom text based on config.FORM_TEXT_FIELDS tuple"""
text = Text(value="", description=tup[0])
text._workattr = tup[1]
self.custom_widgets.append(text)
if tup[2]:
if hasattr(self, tup[2]):
warnings.warn("ArticleNavigator already has the attribute {}. Skipping".format(tup[2]))
else:
setattr(self, tup[2], text)
return text
评论列表
文章目录