Skip to content
Snippets Groups Projects
Commit c0a4cde9 authored by RheingoldRiver's avatar RheingoldRiver
Browse files

Update example to use text/edit instead of edit/save

parent f2448085
No related branches found
No related tags found
No related merge requests found
...@@ -60,12 +60,12 @@ if site.writeapi: ...@@ -60,12 +60,12 @@ if site.writeapi:
image.delete('Testing history deletion', oldimage=archivename) image.delete('Testing history deletion', oldimage=archivename)
print('History:', list(image.imagehistory())) print('History:', list(image.imagehistory()))
text = page.edit() text = page.text()
text += u'\n[[Image:%s-test-image.png]]' % prefix text += u'\n[[Image:%s-test-image.png]]' % prefix
page.save(text, 'Adding image') page.edit(text, 'Adding image')
print('Images:', list(page.images(generator=False))) print('Images:', list(page.images(generator=False)))
print('Cleaning up') print('Cleaning up')
image.delete('Cleanup') image.delete('Cleanup')
page.delete('Cleanup') page.delete('Cleanup')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment