Skip to content

Commit

Permalink
Fix a django docs error
Browse files Browse the repository at this point in the history
  • Loading branch information
lepture committed Nov 2, 2019
1 parent 7f1f2ae commit 24600c3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions docs/django/2/resource-server.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@ If the resource is not protected by a scope, use ``None``::

# or with None

@app.route('/user')
@require_oauth(None)
def user_profile():
def user_profile(request):
user = request.oauth_token.user
return JsonResponse(dict(sub=user.pk, username=user.username))

Expand Down

0 comments on commit 24600c3

Please sign in to comment.