+ def populate_description(self, wldoc=None, infile=None):
+ if wldoc is None:
+ wldoc = self.wldocument(infile)
+ for nagl in wldoc.edoc.findall('.//naglowek_rozdzial'):
+ if (nagl.text or '').strip() == u'Pomysł na lekcję':
+ from lxml import etree
+ self.description = etree.tostring(nagl.getnext(),
+ method='text', encoding='unicode').strip()
+ self.save()
+ return
+