diff options
| author | OddBloke | 2013-12-11 13:55:54 +0000 | 
|---|---|---|
| committer | OddBloke | 2013-12-11 13:55:54 +0000 | 
| commit | 5acefd3b17e498af756fa48e27d7f8ce19322c7a (patch) | |
| tree | 7c31b0e65e356231b99df9210b5064113f9e74d1 /docs/api-guide/authentication.md | |
| parent | d3440f03118567495e331a51a76e8bce695a7128 (diff) | |
| download | django-rest-framework-5acefd3b17e498af756fa48e27d7f8ce19322c7a.tar.bz2 | |
Add full required imports to Generating Tokens example
Previously we were missing User and post_save.
Diffstat (limited to 'docs/api-guide/authentication.md')
| -rwxr-xr-x | docs/api-guide/authentication.md | 2 | 
1 files changed, 2 insertions, 0 deletions
| diff --git a/docs/api-guide/authentication.md b/docs/api-guide/authentication.md index 1a1c68b8..ef77e02c 100755 --- a/docs/api-guide/authentication.md +++ b/docs/api-guide/authentication.md @@ -162,6 +162,8 @@ The `curl` command line tool may be useful for testing token authenticated APIs.  If you want every user to have an automatically generated Token, you can simply catch the User's `post_save` signal. +    from django.contrib.auth.models import User +    from django.db.models.signals import post_save      from django.dispatch import receiver      from rest_framework.authtoken.models import Token | 
