File tree 2 files changed +11
-3
lines changed
2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -117,9 +117,8 @@ def authenticate(self, request):
117
117
Otherwise returns `None`.
118
118
"""
119
119
120
- # Get the underlying HttpRequest object
121
- request = request ._request
122
- user = getattr (request , 'user' , None )
120
+ # Get the session-based user from the underlying HttpRequest object
121
+ user = getattr (request ._request , 'user' , None )
123
122
124
123
# Unauthenticated, CSRF validation not required
125
124
if not user or not user .is_active :
Original file line number Diff line number Diff line change @@ -365,6 +365,15 @@ def DATA(self):
365
365
'since version 3.0, and has been fully removed as of version 3.2.'
366
366
)
367
367
368
+ @property
369
+ def POST (self ):
370
+ # Ensure that request.POST uses our request parsing.
371
+ if not _hasattr (self , '_data' ):
372
+ self ._load_data_and_files ()
373
+ if is_form_media_type (self .content_type ):
374
+ return self .data
375
+ return QueryDict ('' , encoding = self ._request ._encoding )
376
+
368
377
@property
369
378
def FILES (self ):
370
379
# Leave this one alone for backwards compat with Django's request.FILES
You can’t perform that action at this time.
0 commit comments