Opened 2 hours ago

Last modified 93 minutes ago

#36026 new Cleanup/optimization

Document that View.setup() sets attributes such as request, args, kwargs

Reported by: Willem Van Onsem Owned by:
Component: Generic views Version: 5.1
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

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 (2)

comment:1 by Carlton Gibson, 94 minutes ago

Triage Stage: UnreviewedAccepted

Seems reasonable, yes.

comment:2 by Sarah Boyce, 93 minutes ago

Component: DocumentationGeneric views
Summary: Add what .setup()` does to a view to the documentationDocument 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?

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