Opened 4 years ago

Closed 4 years ago

#18411 closed Bug (fixed)

Slightly misleading paragraph in documentation about HttpRequest

Reported by: torkel.bjornson@… Owned by: Thomas Westfeld
Component: Documentation Version: 1.4
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

https://docs.djangoproject.com/en/dev/ref/request-response/#django.http.HttpRequest

«All attributes except session should be considered read-only.»

But bellow it states that HttpRequest.encoding can be written to.

So maybe change the paragraph to: «All attributes should be considered
read-only unless stated otherwise bellow».

Attachments (1)

Ticket_18411.diff (429 bytes) - added by Thomas Westfeld 4 years ago.
First draft of a fix

Download all attachments as: .zip

Change History (6)

comment:1 Changed 4 years ago by Claude Paroz

Easy pickings: set
Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Triage Stage: UnreviewedAccepted
Type: UncategorizedBug

comment:2 Changed 4 years ago by Thomas Westfeld

Owner: changed from nobody to Thomas Westfeld
Status: newassigned

Changed 4 years ago by Thomas Westfeld

Attachment: Ticket_18411.diff added

First draft of a fix

comment:3 Changed 4 years ago by Thomas Westfeld

Has patch: set

comment:4 Changed 4 years ago by Aymeric Augustin

Strictly speaking, request.user is also writable. Of cours, it'll usually be written by django.contrib.auth, not by you own code.

For this reason I tend to prefer the original suggestion: "unless stated otherwise".

comment:5 Changed 4 years ago by Aymeric Augustin <aymeric.augustin@…>

Resolution: fixed
Status: assignedclosed

In [b48432201bae813027c045e412e28ba4c1806d92]:

Fixed #18411 -- Clarified HttpRequest doc slightly.

Thanks torkel.bjornson AT gmail.com for the report.

Note: See TracTickets for help on using tickets.
Back to Top