diff --git a/HISTORY.rst b/HISTORY.rst index b6fed37bee..101c0a2a38 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -17,6 +17,7 @@ - Fix reverse inheritance permissions. - Remove index create permission as an ACL permission for indexes. +- Fix API example. 3.2.10 (2019-11-19) =================== diff --git a/docs/chapters/api.rst b/docs/chapters/api.rst index 4c542ae163..ee76a618c8 100644 --- a/docs/chapters/api.rst +++ b/docs/chapters/api.rst @@ -57,7 +57,7 @@ Get a list of document types:: Upload a new document:: - with open('test_document.pdf', mode='rb') as + with open('test_document.pdf', mode='rb') as file_object: requests.post('http://127.0.0.1:8000/api/documents/', auth=('username', 'password'), files={'file': file_object}, data={'document_type': 1}).json() {u'description': u'',