From ee516630f8b4ed025ceb8ce4334a7db88dfa0789 Mon Sep 17 00:00:00 2001 From: johnthagen Date: Sun, 23 Dec 2018 15:36:58 -0500 Subject: [PATCH] Make code snippets Python 3 compatible --- docs/tutorial/4-authentication-and-permissions.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/tutorial/4-authentication-and-permissions.md b/docs/tutorial/4-authentication-and-permissions.md index ef5b45c90..d616b6539 100644 --- a/docs/tutorial/4-authentication-and-permissions.md +++ b/docs/tutorial/4-authentication-and-permissions.md @@ -197,7 +197,7 @@ If we're interacting with the API programmatically we need to explicitly provide If we try to create a snippet without authenticating, we'll get an error: - http POST http://127.0.0.1:8000/snippets/ code="print 123" + http POST http://127.0.0.1:8000/snippets/ code="print(123)" { "detail": "Authentication credentials were not provided." @@ -205,13 +205,13 @@ If we try to create a snippet without authenticating, we'll get an error: We can make a successful request by including the username and password of one of the users we created earlier. - http -a admin:password123 POST http://127.0.0.1:8000/snippets/ code="print 789" + http -a admin:password123 POST http://127.0.0.1:8000/snippets/ code="print(789)" { "id": 1, "owner": "admin", "title": "foo", - "code": "print 789", + "code": "print(789)", "linenos": false, "language": "python", "style": "friendly"