doc-publik: update redmine doc conversion for python 3

This commit is contained in:
Frédéric Péters 2019-10-25 00:37:47 +02:00
parent 3cef70bcb2
commit a9b14bf67e
1 changed files with 2 additions and 2 deletions

View File

@ -20,12 +20,12 @@ for cell in TextCell.objects.filter(slug__in=DOCS.keys(), page__snapshot__isnull
continue
document = BeautifulSoup(resp.content, 'html5lib')
content = document.find('body')
new_content = unicode(content).replace('<body>', '').replace('</body>', '')
new_content = content.decode().replace('<body>', '').replace('</body>', '')
cell.text = new_content
cell.order = 1
cell.save()
url = DOCS[cell.slug].replace('.html', '').decode('utf-8')
url = DOCS[cell.slug].replace('.html', '')
cell, created = TextCell.objects.get_or_create(
page=cell.page,
slug='editor-warning', defaults={'order': 0})