doc-publik: update redmine doc conversion for python 3
This commit is contained in:
parent
3cef70bcb2
commit
a9b14bf67e
|
@ -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})
|
||||
|
|
Loading…
Reference in New Issue