[Django] #25037: Addition to functions http.requests.build_request_repr

21 views
Skip to first unread message

Django

unread,
Jun 30, 2015, 10:23:57 AM6/30/15
to django-...@googlegroups.com
#25037: Addition to functions http.requests.build_request_repr
-------------------------------+--------------------
Reporter: djbaldey | Owner: nobody
Type: New feature | Status: new
Component: Uncategorized | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------
Displays the username in the mail for admins (used in
views.debug.ExceptionReporterFilter) that caused the error:

Request repr():
<HttpRequest
path:/somepath/,
'''USER:None,'''
GET:{'get-key': 'get-value'},
POST:{'post-key': 'post-value'},
COOKIES:{'post-key': 'post-value'},
META:{'post-key': 'post-value'}>

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

Django

unread,
Jun 30, 2015, 10:26:09 AM6/30/15
to django-...@googlegroups.com
#25037: Addition to functions http.requests.build_request_repr
---------------------------+----------------------------

Reporter: djbaldey | Owner: nobody
Type: New feature | Status: new
Component: Uncategorized | Version: master
Severity: Normal | Resolution:

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Easy pickings: 0
UI/UX: 0 |
---------------------------+----------------------------
Changes (by djbaldey):

* Attachment "25037.diff" added.

Django

unread,
Jun 30, 2015, 10:37:18 AM6/30/15
to django-...@googlegroups.com
#25037: Addition to functions http.requests.build_request_repr
---------------------------+----------------------------

Reporter: djbaldey | Owner: nobody
Type: New feature | Status: new
Component: Uncategorized | Version: master
Severity: Normal | Resolution:

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Easy pickings: 0
UI/UX: 0 |
---------------------------+----------------------------
Changes (by djbaldey):

* Attachment "25037.diff" added.


Django

unread,
Jun 30, 2015, 10:46:08 AM6/30/15
to django-...@googlegroups.com
#25037: Addition to functions http.requests.build_request_repr
-------------------------------+--------------------------------------

Reporter: djbaldey | Owner: nobody
Type: New feature | Status: new
Component: Uncategorized | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by djbaldey):

* needs_better_patch: => 0
* has_patch: 0 => 1
* needs_tests: => 0
* needs_docs: => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/25037#comment:1>

Django

unread,
Jun 30, 2015, 12:20:06 PM6/30/15
to django-...@googlegroups.com
#25037: Addition to functions http.requests.build_request_repr
-------------------------------+------------------------------------

Reporter: djbaldey | Owner: nobody
Type: New feature | Status: new
Component: HTTP handling | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------
Changes (by claudep):

* needs_better_patch: 0 => 1
* component: Uncategorized => HTTP handling
* needs_tests: 0 => 1
* stage: Unreviewed => Accepted


Comment:

I think this is a nice addition. Would it be possible to transform the
patch in a pull request?
We'll also need more tests (with anonymous user, authenticated user,
custom user, etc.).

--
Ticket URL: <https://code.djangoproject.com/ticket/25037#comment:2>

Django

unread,
Jun 30, 2015, 1:12:04 PM6/30/15
to django-...@googlegroups.com
#25037: Addition to functions http.requests.build_request_repr
-------------------------------+------------------------------------

Reporter: djbaldey | Owner: nobody
Type: New feature | Status: new
Component: HTTP handling | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------

Comment (by timgraham):

Although it's a common pattern to set `request.user`, I had some
reservations about coupling `HttpRequest` and `contrib.auth` when I first
read this.

Sentry seems to have some way to associate exceptions with users. Maybe it
would be worth looking at how they accomplish that?

--
Ticket URL: <https://code.djangoproject.com/ticket/25037#comment:3>

Django

unread,
Jul 1, 2015, 3:06:30 AM7/1/15
to django-...@googlegroups.com
#25037: Addition to functions http.requests.build_request_repr
-------------------------------+------------------------------------

Reporter: djbaldey | Owner: nobody
Type: New feature | Status: new
Component: HTTP handling | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------

Comment (by djbaldey):

Replying to [comment:3 timgraham]:


> Although it's a common pattern to set `request.user`, I had some
reservations about coupling `HttpRequest` and `contrib.auth` when I first
read this.
>
> Sentry seems to have some way to associate exceptions with users. Maybe
it would be worth looking at how they accomplish that?

This decision does not depend on contrib.auth and request.user. But when
there they - it is of great help to solve the problems of administrators.

--
Ticket URL: <https://code.djangoproject.com/ticket/25037#comment:4>

Django

unread,
Jul 14, 2015, 9:30:00 AM7/14/15
to django-...@googlegroups.com
#25037: Addition to functions http.requests.build_request_repr
-------------------------------+------------------------------------

Reporter: djbaldey | Owner: nobody
Type: New feature | Status: new
Component: HTTP handling | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------

Comment (by vzima):

Note, that `build_request_repr` was removed in #25099.

--
Ticket URL: <https://code.djangoproject.com/ticket/25037#comment:5>

Django

unread,
Jul 24, 2015, 10:14:42 AM7/24/15
to django-...@googlegroups.com
#25037: Add request.user to the debug view
---------------------------------+------------------------------------

Reporter: djbaldey | Owner: nobody
Type: New feature | Status: new
Component: Error reporting | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 1
Easy pickings: 1 | UI/UX: 0
---------------------------------+------------------------------------
Changes (by timgraham):

* component: HTTP handling => Error reporting
* easy: 0 => 1


Comment:

It seems the new alternative would be to add it to
`views.debug.TECHNICAL_500_TEMPLATE` and `TECHNICAL_500_TEXT_TEMPLATE`
under "Request information".

--
Ticket URL: <https://code.djangoproject.com/ticket/25037#comment:6>

Django

unread,
Jul 25, 2015, 2:51:12 PM7/25/15
to django-...@googlegroups.com
#25037: Add request.user to the debug view
---------------------------------+---------------------------------------
Reporter: djbaldey | Owner: JulianGindi
Type: New feature | Status: assigned

Component: Error reporting | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 1
Easy pickings: 1 | UI/UX: 0
---------------------------------+---------------------------------------
Changes (by JulianGindi):

* status: new => assigned
* owner: nobody => JulianGindi


--
Ticket URL: <https://code.djangoproject.com/ticket/25037#comment:7>

Django

unread,
Jul 25, 2015, 2:54:59 PM7/25/15
to django-...@googlegroups.com
#25037: Add request.user to the debug view
---------------------------------+---------------------------------------
Reporter: djbaldey | Owner: JulianGindi
Type: New feature | Status: assigned
Component: Error reporting | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 1
Easy pickings: 1 | UI/UX: 0
---------------------------------+---------------------------------------

Comment (by JulianGindi):

Based on the latest comment, I'll move ahead with the mentioned
implementation as opposed to continuing the work from the first patch.
Does that sound right?

--
Ticket URL: <https://code.djangoproject.com/ticket/25037#comment:8>

Django

unread,
Jul 25, 2015, 6:02:03 PM7/25/15
to django-...@googlegroups.com
#25037: Add request.user to the debug view
---------------------------------+---------------------------------------
Reporter: djbaldey | Owner: JulianGindi
Type: New feature | Status: assigned
Component: Error reporting | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 1
Easy pickings: 1 | UI/UX: 0
---------------------------------+---------------------------------------

Comment (by timgraham):

Yes, the initial patch will no longer apply.

--
Ticket URL: <https://code.djangoproject.com/ticket/25037#comment:9>

Django

unread,
Oct 2, 2015, 1:39:09 AM10/2/15
to django-...@googlegroups.com
#25037: Add request.user to the debug view
---------------------------------+---------------------------------------
Reporter: djbaldey | Owner: JulianGindi
Type: New feature | Status: assigned
Component: Error reporting | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 1
Easy pickings: 1 | UI/UX: 0
---------------------------------+---------------------------------------

Comment (by jonaldomo):

Where should the associated test with this go?

--
Ticket URL: <https://code.djangoproject.com/ticket/25037#comment:10>

Django

unread,
Oct 2, 2015, 8:14:22 AM10/2/15
to django-...@googlegroups.com
#25037: Add request.user to the debug view
---------------------------------+---------------------------------------
Reporter: djbaldey | Owner: JulianGindi
Type: New feature | Status: assigned
Component: Error reporting | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 1
Easy pickings: 1 | UI/UX: 0
---------------------------------+---------------------------------------

Comment (by timgraham):

There are tests for the debug view in
`tests/view_tests/tests/test_debug.py`.

--
Ticket URL: <https://code.djangoproject.com/ticket/25037#comment:11>

Django

unread,
Oct 2, 2015, 10:47:43 AM10/2/15
to django-...@googlegroups.com
#25037: Add request.user to the debug view
---------------------------------+-------------------------------------
Reporter: djbaldey | Owner: jonaldomo

Type: New feature | Status: assigned
Component: Error reporting | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 1
Easy pickings: 1 | UI/UX: 0
---------------------------------+-------------------------------------
Changes (by jonaldomo):

* owner: JulianGindi => jonaldomo


--
Ticket URL: <https://code.djangoproject.com/ticket/25037#comment:12>

Django

unread,
Oct 2, 2015, 10:47:52 AM10/2/15
to django-...@googlegroups.com
#25037: Add request.user to the debug view
---------------------------------+-------------------------------------
Reporter: djbaldey | Owner: jonaldomo
Type: New feature | Status: assigned
Component: Error reporting | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 1
Easy pickings: 1 | UI/UX: 0
---------------------------------+-------------------------------------

Comment (by jonaldomo):

How does this look? https://github.com/django/django/pull/5381

--
Ticket URL: <https://code.djangoproject.com/ticket/25037#comment:13>

Django

unread,
Oct 3, 2015, 9:34:43 AM10/3/15
to django-...@googlegroups.com
#25037: Add request.user to the debug view
---------------------------------+-------------------------------------
Reporter: djbaldey | Owner: jonaldomo
Type: New feature | Status: assigned
Component: Error reporting | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 1 | UI/UX: 0
---------------------------------+-------------------------------------
Changes (by timgraham):

* needs_tests: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/25037#comment:14>

Django

unread,
Oct 3, 2015, 2:20:42 PM10/3/15
to django-...@googlegroups.com
#25037: Add request.user to the debug view
---------------------------------+-------------------------------------
Reporter: djbaldey | Owner: jonaldomo
Type: New feature | Status: assigned
Component: Error reporting | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
---------------------------------+-------------------------------------
Changes (by jonaldomo):

* needs_better_patch: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/25037#comment:15>

Django

unread,
Oct 5, 2015, 9:37:11 AM10/5/15
to django-...@googlegroups.com
#25037: Add request.user to the debug view
---------------------------------+-------------------------------------
Reporter: djbaldey | Owner: jonaldomo
Type: New feature | Status: closed

Component: Error reporting | Version: master
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
---------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"2b6344e9447b5a62cb779b92b061b783bdef5f1c" 2b6344e]:
{{{
#!CommitTicketReference repository=""
revision="2b6344e9447b5a62cb779b92b061b783bdef5f1c"
Fixed #25037 -- Added request.user to the debug view.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/25037#comment:16>

Reply all
Reply to author
Forward
0 new messages