doc-publik: update mallard conversion script to python 3
This commit is contained in:
parent
77f093a9d3
commit
3cef70bcb2
|
@ -32,6 +32,7 @@ for cell in TextCell.objects.filter(slug__startswith='mallard-'):
|
|||
for img in document.find_all('img'):
|
||||
img.attrs['src'] = 'https://doc.entrouvert.org/%s/dev/%s' % (module, img.attrs['src'])
|
||||
|
||||
new_content = unicode(content).replace(unicode(more_info), '')
|
||||
cell.text = new_content
|
||||
cell.save()
|
||||
if more_info:
|
||||
new_content = content.decode().replace(more_info.decode(), '')
|
||||
cell.text = new_content
|
||||
cell.save()
|
||||
|
|
Loading…
Reference in New Issue