#27384: Accessing request.POST in Django middlewares 1.10.x make it empty for 
view
--------------------------------------+------------------------------------
     Reporter:  Matheus Ashton Silva  |      Owner:  nobody
         Type:  Bug                   |     Status:  new
    Component:  Uncategorized         |    Version:  1.10
     Severity:  Normal                |   Keywords:  middleware
                                      |  request.POST
 Triage Stage:  Unreviewed            |  Has patch:  0
Easy pickings:  0                     |      UI/UX:  0
--------------------------------------+------------------------------------
 Hello,

 I'm creating a middleware to log every request in my API, following the
 new specification on django 1.10.x.

 When I access the request.POST attr it goes blank to the view

 {{{
 #!div style="font-size: 80%"
 Code highlighting:
   {{{#!python
     def log_request_middleware(get_response):
         logger = logging.getLogger('requests')

         def middleware(request):
             request_body = request.POST.copy().dict()
             response = get_response(request)
   }}}
 }}}

 The request.POST on the view now is blank, it happens even with a simple
 access a print or assignment.

 It also happens with request.GET

--
Ticket URL: <https://code.djangoproject.com/ticket/27384>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/049.65cf788af5d707fb8b2a383dfeb184ab%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to