diff options
| author | Tom Christie | 2013-11-18 09:29:09 +0000 | 
|---|---|---|
| committer | Tom Christie | 2013-11-18 09:29:09 +0000 | 
| commit | 075b8c1037588a590360ab5290b25648367a26c5 (patch) | |
| tree | 9a672ea661c83c3cb454d3b3a3474a22a1479253 /docs/tutorial | |
| parent | 128bda5712ef041514c5e2feadef0ad248f33f54 (diff) | |
| download | django-rest-framework-075b8c1037588a590360ab5290b25648367a26c5.tar.bz2 | |
Add User import.  Refs #599
Diffstat (limited to 'docs/tutorial')
| -rw-r--r-- | docs/tutorial/4-authentication-and-permissions.md | 3 | 
1 files changed, 3 insertions, 0 deletions
| diff --git a/docs/tutorial/4-authentication-and-permissions.md b/docs/tutorial/4-authentication-and-permissions.md index ecf92a7b..b472322a 100644 --- a/docs/tutorial/4-authentication-and-permissions.md +++ b/docs/tutorial/4-authentication-and-permissions.md @@ -67,6 +67,9 @@ Because `'snippets'` is a *reverse* relationship on the User model, it will not  We'll also add a couple of views to `views.py`.  We'd like to just use read-only views for the user representations, so we'll use the `ListAPIView` and `RetrieveAPIView` generic class based views. +    from django.contrib.auth.models import User + +      class UserList(generics.ListAPIView):          queryset = User.objects.all()          serializer_class = UserSerializer | 
