#25434 closed Bug (fixed)
Missing documentation for request.site attribute
Reported by: | Nick Pope | Owned by: | Nick Pope |
---|---|---|---|
Component: | Documentation | Version: | 1.7 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
When CurrentSiteMiddleware
was added in 1.7, the documentation for the attribute HttpRequest.site
was missed.
Change History (10)
comment:1 by , 9 years ago
comment:2 by , 9 years ago
Triage Stage: | Unreviewed → Accepted |
---|
It seems a bit odd to me to document attributes that middleware set as "attributes of HttpRequest
" but given we have request.user
documented like that, I don't see a big reason not to document this other than request.user
is far more common (enabled my default in new projects) than request.site
. Maybe such attributes could be documented in a separate section (as a separate ticket) to make it more obvious.
FYI, we aren't making non-critical updates to the 1.7 docs since there's no workflow for allowing translating those updates, so we'll probably limit this to 1.8.
comment:3 by , 9 years ago
You've suggested exactly what I was thinking as an alternative - a separate section detailing the attributes that are added to the request by middleware. As well as request.user
and request.site
, there is also request.session
which is set by middleware but currently doesn't mention the fact. I feel that it is useful to know where these attributes are meant to come from if they have not been set on the request object.
Would you rather that I just altered this ticket and the pull request instead of creating a separate ticket? One ticket along the lines of "separated docs for attributes set by middleware and added missing entries" seems sufficient.
comment:5 by , 9 years ago
Patch needs improvement: | set |
---|
comment:7 by , 9 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
As mentioned in the PR, this should also be backported to 1.7 and 1.8 with
.. versionadded:: 1.7