Skip to content

Commit

Permalink
Make the space between token and token visible, use f-sting
Browse files Browse the repository at this point in the history
  • Loading branch information
hroncok committed Sep 30, 2018
1 parent c8395bf commit f15d9d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lessons/intro/requests/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ Tímto kódem lze například získat popis přihlášeného uživatele, tedy se
>>> session = requests.Session()
>>> session.headers = {'User-Agent': 'Python'}
>>> def token_auth(req):
... req.headers['Authorization'] = 'token ' + token
... req.headers['Authorization'] = f'token {token}'
... return req
...
>>> session.auth = token_auth
Expand Down

0 comments on commit f15d9d0

Please sign in to comment.