diff options
| author | Mark Hughes | 2012-11-24 17:18:32 +0000 | 
|---|---|---|
| committer | Mark Hughes | 2012-11-24 17:18:32 +0000 | 
| commit | 85a921c7efcea50a5d594082f0e4ddeefd95402f (patch) | |
| tree | 79f2f6696e46fc8a5781c6ba3cdd9a927fea5718 /rest_framework/request.py | |
| parent | fd89bca35f065cd3917fffc79b59927460a88a3a (diff) | |
| download | django-rest-framework-85a921c7efcea50a5d594082f0e4ddeefd95402f.tar.bz2 | |
Added setter to user property
Diffstat (limited to 'rest_framework/request.py')
| -rw-r--r-- | rest_framework/request.py | 9 | 
1 files changed, 9 insertions, 0 deletions
| diff --git a/rest_framework/request.py b/rest_framework/request.py index a1827ba4..39c64321 100644 --- a/rest_framework/request.py +++ b/rest_framework/request.py @@ -169,6 +169,15 @@ class Request(object):              self._user, self._auth = self._authenticate()          return self._user +    @user.setter +    def user(self, value): +         """ +         Sets the user on the current request. This is necessary to maintain +         compatilbility with django.contrib.auth where the user proprety is +         set in the login and logout functions. +         """ +         self._user = value +      @property      def auth(self):          """ | 
