Opened 4 months ago
Closed 3 months ago
#36026 closed Cleanup/optimization (fixed)
Document that View.setup() sets attributes such as request, args, kwargs
Description ¶
A question at StackOverflow asks where it is documented that self.kwargs
is set, and although it is mentioned for example in the Built-in class-based generic views section, it does not appear in the documentation of the Base views nor in the documentation for the .setup(..)
method.
Perhaps the documentation regarding base views should explain what setup is doing?
Change History (9)
comment:1 by , 4 months ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 4 months ago
Component: | Documentation → Generic views |
---|---|
Summary: | Add what .setup()` does to a view to the documentation → Document that View.setup() sets attributes such as request, args, kwargs |
I agree we could be clear in the docs here - would you like to prepare a patch?
comment:3 by , 4 months ago
Has patch: | set |
---|---|
Owner: | set to |
Status: | new → assigned |
comment:4 by , 4 months ago
Added a PR for this - https://github.com/django/django/pull/18952
Let me know if the wording looks good! Thank you.
comment:5 by , 4 months ago
Patch needs improvement: | set |
---|
comment:6 by , 3 months ago
Patch needs improvement: | unset |
---|
comment:7 by , 3 months ago
Patch needs improvement: | set |
---|
comment:8 by , 3 months ago
Patch needs improvement: | unset |
---|---|
Triage Stage: | Accepted → Ready for checkin |
Seems reasonable, yes.