#28999: Document how to use class-based views if you want to reverse by them by
instance
--------------------------------------+------------------------------------
Reporter: airstandley | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: 2.0
Severity: Normal | Resolution:
Keywords: url reverse cbv | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Comment (by airstandley):
Replying to [comment:4 Marten Kenbeek]:
> The `callable_view` would compare equal regardless of its `initkwargs`,
I don't think that's the behaviour we'd want.
>
> <snip>
Alright, thanks for the insight. I was not entirely sure what the
intention of the `initkwargs` was. If the intent is that a CBV will be
used more than once with different `initkwargs` then I can not think of
any approach with `callable_view` that would work.
The latest docs suggest using `CBV.as_view()` in the urlconf
`urlpatterns`. Would you change all of those references or add an addendum
stating the downside of that approach and documenting the pattern that
Marten described?
--
Ticket URL: <https://code.djangoproject.com/ticket/28999#comment:6>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/069.8a5a17c572a888484fbb8eff4fb2bc96%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.