#25763: Django missing repr friendly formatting of request
------------------------------+--------------------------------------
     Reporter:  atarkowska    |                    Owner:  nobody
         Type:  Bug           |                   Status:  new
    Component:  Core (Other)  |                  Version:  1.8
     Severity:  Normal        |               Resolution:
     Keywords:                |             Triage Stage:  Unreviewed
    Has patch:  0             |      Needs documentation:  0
  Needs tests:  0             |  Patch needs improvement:  0
Easy pickings:  0             |                    UI/UX:  0
------------------------------+--------------------------------------

Comment (by atarkowska):

 Tim is it not what logging formatting is for?

 class HttpRequest(object):
 {{{
     def __repr__(self):
         return build_request_repr(self)

     def __str__(self):
         if self.method is None or not self.get_full_path():
             return force_str('<%s>' % self.__class__.__name__)
         return force_str(
             '<%s: %s %r>' % (self.__class__.__name__, self.method,
 force_str(self.get_full_path()))
         )
 }}}


 logging formatter
 {{{
 ' HTTP %(status_code)d %(request)r'
 }}}



 {{{
 <WSGIRequest: GET '/webapp/error_page/'>
 [16/Nov/2015 16:29:46] "GET /webapp/error_page/ HTTP/1.1" 200 8366
 }}}

 works for me

 I will create a patch for that

--
Ticket URL: <https://code.djangoproject.com/ticket/25763#comment:2>
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/068.23a129492a491c3aad28c4945a3c30c0%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to