diff options
| author | Marko Tibold | 2012-12-06 23:47:47 +0100 |
|---|---|---|
| committer | Marko Tibold | 2012-12-06 23:47:47 +0100 |
| commit | c65f22e0e4e5475aebd848b4db6b282ce524a8f3 (patch) | |
| tree | bc9a30099abfca3aa11bf4969db64db2affe950c /rest_framework/request.py | |
| parent | 899f96ae9186e68009dba5d54246232d34457354 (diff) | |
| parent | 6a5f4f2a90ab19a8586a9d762c9b2618e8db5c30 (diff) | |
| download | django-rest-framework-c65f22e0e4e5475aebd848b4db6b282ce524a8f3.tar.bz2 | |
Merge branch 'master' of https://github.com/tomchristie/django-rest-framework into #431
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): """ |
