Skip to content

Commit 7749e4e

Browse files
johnthagenrpkilby
authored andcommitted
Make code snippet Python 3 compatible (#6377)
1 parent 1e2fd25 commit 7749e4e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/tutorial/4-authentication-and-permissions.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,21 +197,21 @@ If we're interacting with the API programmatically we need to explicitly provide
197197

198198
If we try to create a snippet without authenticating, we'll get an error:
199199

200-
http POST http://127.0.0.1:8000/snippets/ code="print 123"
200+
http POST http://127.0.0.1:8000/snippets/ code="print(123)"
201201

202202
{
203203
"detail": "Authentication credentials were not provided."
204204
}
205205

206206
We can make a successful request by including the username and password of one of the users we created earlier.
207207

208-
http -a admin:password123 POST http://127.0.0.1:8000/snippets/ code="print 789"
208+
http -a admin:password123 POST http://127.0.0.1:8000/snippets/ code="print(789)"
209209

210210
{
211211
"id": 1,
212212
"owner": "admin",
213213
"title": "foo",
214-
"code": "print 789",
214+
"code": "print(789)",
215215
"linenos": false,
216216
"language": "python",
217217
"style": "friendly"

0 commit comments

Comments
 (0)