Re: [Django] #34427: Improve error message for incorrect context processors

2 views
Skip to first unread message

Django

unread,
Mar 21, 2023, 1:05:49 PM3/21/23
to django-...@googlegroups.com
#34427: Improve error message for incorrect context processors
---------------------------------+------------------------------------
Reporter: Adam Johnson | Owner: nobody
Type: New feature | Status: new
Component: Template system | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+------------------------------------
Changes (by Claude Paroz):

* stage: Unreviewed => Accepted


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

Django

unread,
Mar 22, 2023, 12:17:05 PM3/22/23
to django-...@googlegroups.com
#34427: Improve error message for incorrect context processors
-------------------------------------+-------------------------------------
Reporter: Adam Johnson | Owner: Shahriar
| Sohan
Type: New feature | Status: assigned

Component: Template system | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Shahriar Sohan):

* owner: nobody => Shahriar Sohan
* status: new => assigned


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

Django

unread,
Mar 22, 2023, 12:22:29 PM3/22/23
to django-...@googlegroups.com
#34427: Improve error message for incorrect context processors
---------------------------------+------------------------------------
Reporter: Adam Johnson | Owner: (none)

Type: New feature | Status: new
Component: Template system | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+------------------------------------
Changes (by Shahriar Sohan):

* owner: Shahriar Sohan => (none)
* status: assigned => new


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

Django

unread,
Mar 28, 2023, 4:23:10 AM3/28/23
to django-...@googlegroups.com
#34427: Improve error message for incorrect context processors
---------------------------------+-----------------------------------------
Reporter: Adam Johnson | Owner: David Sanders

Type: New feature | Status: assigned
Component: Template system | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+-----------------------------------------
Changes (by David Sanders):

* owner: (none) => David Sanders


* status: new => assigned


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

Django

unread,
Mar 28, 2023, 4:32:29 AM3/28/23
to django-...@googlegroups.com
#34427: Improve error message for incorrect context processors
---------------------------------+-----------------------------------------
Reporter: Adam Johnson | Owner: David Sanders
Type: New feature | Status: assigned
Component: Template system | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+-----------------------------------------
Changes (by David Sanders):

* has_patch: 0 => 1


Comment:

Thanks Adam, good idea 👍

I've taken a stab, left it as a TypeError but just improved the message.
I'm not sure about the "It returned <blah> instead." part. With templates
the "None" is hardcoded as it's a literal None check. For this I'm not
sure what the best way to generalise the return value/type in English is
😁. If you have any ideas I'm open.

And as I write this the ever so quick felixx has already started reviewing
though so it may all get resolved by the time you read this 🤣

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

Django

unread,
Mar 28, 2023, 4:51:52 AM3/28/23
to django-...@googlegroups.com
#34427: Improve error message for incorrect context processors
-------------------------------------+-------------------------------------

Reporter: Adam Johnson | Owner: David
| Sanders
Type: New feature | Status: assigned
Component: Template system | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* stage: Accepted => Ready for checkin


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

Django

unread,
Mar 29, 2023, 2:54:37 AM3/29/23
to django-...@googlegroups.com
#34427: Improve error message for incorrect context processors
-------------------------------------+-------------------------------------
Reporter: Adam Johnson | Owner: David
| Sanders
Type: New feature | Status: closed

Component: Template system | Version: dev
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by GitHub <noreply@…>):

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


Comment:

In [changeset:"5dba5fda551afe169dce7620b08a99c3455ebb00" 5dba5fd]:
{{{
#!CommitTicketReference repository=""
revision="5dba5fda551afe169dce7620b08a99c3455ebb00"
Fixed #34427 -- Improved error message when context processor does not
return a dict.
}}}

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

Reply all
Reply to author
Forward
0 new messages