Opened 3 years ago

Closed 3 years ago

#18411 closed Bug (fixed)

Slightly misleading paragraph in documentation about HttpRequest

Reported by: torkel.bjornson@… Owned by: 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 westfeld 3 years ago.
First draft of a fix

Download all attachments as: .zip

Change History (6)

comment:1 Changed 3 years ago by claudep

  • Easy pickings set
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted
  • Type changed from Uncategorized to Bug

comment:2 Changed 3 years ago by westfeld

  • Owner changed from nobody to westfeld
  • Status changed from new to assigned

Changed 3 years ago by westfeld

First draft of a fix

comment:3 Changed 3 years ago by westfeld

  • Has patch set

comment:4 Changed 3 years ago by aaugustin

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 3 years ago by Aymeric Augustin <aymeric.augustin@…>

  • Resolution set to fixed
  • Status changed from assigned to closed

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