Groups
Sign in
Groups
Django updates
Conversations
About
Send feedback
Help
[Django] #35401: Document the `conditional_page` decorator
8 views
Skip to first unread message
Django
unread,
Apr 24, 2024, 8:46:11 AM
Apr 24
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django-...@googlegroups.com
#35401: Document the `conditional_page` decorator
-----------------------------------------+------------------------
Reporter: Keryn Knight | Owner: nobody
Type: Uncategorized | Status: new
Component: Documentation | Version: dev
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+------------------------
The [
https://docs.djangoproject.com/en/dev/ref/middleware/#module-
django.middleware.gzip GZip Middleware documentation] makes mention of the
[
https://docs.djangoproject.com/en/dev/topics/http/decorators/#django.views.decorators.gzip.gzip_page
gzip_page decorator], but the
[
https://docs.djangoproject.com/en/dev/ref/middleware/#module-
django.middleware.http Conditional GET middleware] doesn't mention there's
an equivalent `conditional_page` decorator, likely ecause there's no
mention of that in the
[
https://docs.djangoproject.com/en/dev/topics/http/decorators/
HTTP
decorators] or in the [
https://docs.djangoproject.com/en/dev/topics
/conditional-view-processing/ Conditional View Processing] topics.
As far as I can tell, the named decorator has been around since
[
https://github.com/django/django/blob/stable/0.90.x/django/views/decorators/http.py#L9
0.9x] and it's probably just accidentally not described anywhere, when
everything else in that module is.
See also: #6181 and [
https://www.b-list.org/weblog/2007/dec/11/http/
this
blog post describing the intent, from James Bennett back in 2007] (yay for
cool URIs which haven't suffered link rot!)
--
Ticket URL: <
https://code.djangoproject.com/ticket/35401
>
Django <
https://code.djangoproject.com/
>
The Web framework for perfectionists with deadlines.
Django
unread,
Apr 24, 2024, 11:45:29 AM
Apr 24
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django-...@googlegroups.com
#35401: Document the `conditional_page` decorator
--------------------------------------+------------------------------------
Reporter: Keryn Knight | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | 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 Sarah Boyce):
* stage: Unreviewed => Accepted
* type: Uncategorized => Cleanup/optimization
Comment:
Good find, thank you!
It might also make sense for the
[
https://docs.djangoproject.com/en/dev/ref/middleware/#csrf-protection-
middleware CsrfViewMiddleware] to similarly mention
[
https://docs.djangoproject.com/en/5.0/ref/csrf/#django.views.decorators.csrf.csrf_protect
csrf_protect].
--
Ticket URL: <
https://code.djangoproject.com/ticket/35401#comment:1
>
Django
unread,
Apr 28, 2024, 7:58:37 AM
Apr 28
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django-...@googlegroups.com
#35401: Document the `conditional_page` decorator
-------------------------------------+-------------------------------------
Reporter: Keryn Knight | Owner: Lufafa
Type: | Joshua
Cleanup/optimization | Status: assigned
Component: Documentation | 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 Lufafa Joshua):
* owner: nobody => Lufafa Joshua
* status: new => assigned
--
Ticket URL: <
https://code.djangoproject.com/ticket/35401#comment:2
>
Django
unread,
May 9, 2024, 5:36:16 AM
May 9
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django-...@googlegroups.com
#35401: Document the `conditional_page` decorator
-------------------------------------+-------------------------------------
Reporter: Keryn Knight | Owner: Lufafa
Type: | Joshua
Cleanup/optimization | Status: assigned
Component: Documentation | 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 Lufafa Joshua):
* has_patch: 0 => 1
Comment:
[
https://github.com/django/django/pull/18150
PR]
--
Ticket URL: <
https://code.djangoproject.com/ticket/35401#comment:3
>
Django
unread,
May 10, 2024, 10:45:19 AM
May 10
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django-...@googlegroups.com
#35401: Document the `conditional_page` decorator
-------------------------------------+-------------------------------------
Reporter: Keryn Knight | Owner: Lufafa
Type: | Joshua
Cleanup/optimization | Status: assigned
Component: Documentation | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Sarah Boyce):
* needs_better_patch: 0 => 1
--
Ticket URL: <
https://code.djangoproject.com/ticket/35401#comment:4
>
Reply all
Reply to author
Forward
0 new messages