Opened 5 years ago

Closed 5 years ago

#30993 closed Cleanup/optimization (needsinfo)

Class based views and syndications are similar, but not exactly the same

Reported by: Tobias Bengfort Owned by: nobody
Component: contrib.syndication Version: 2.2
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Syndication feeds are created as classes, just like class based views. But that is very much where the similarities end:

  • Feeds do not work with important mixins such as PermissionRequiredMixin
  • You do not need to call as_view() on a feed
  • Instead of overwriting get() or dispatch(), you need to overwrite __call__()

These subtle differences are confusing to me and make it harder to reuse code.

So far for the description of the problem. A solution could be to base feeds on class based views. However, I am not sure if this is possible in a backwards compatible way.

Change History (1)

comment:1 by Carlton Gibson, 5 years ago

Resolution: needsinfo
Status: newclosed

Hi Tobias.

I know what you mean. But I think this is too vague as it stands. Rewrite the syndication views is a big ticket, and would need a plan, in the form of a DEP probably, outline what that would look like. Yes, maybe there's room for improvement here... but something concrete to go on would be needed to push that forward.

I hope that makes sense. Thanks.

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