Opened 7 years ago

Closed 4 years ago

#11939 closed Cleanup/optimization (invalid)

Better conventions between generic views and syndication feed framework

Reported by: fractal Owned by: nobody
Component: contrib.syndication Version: 1.1
Severity: Normal Keywords: suggestion, improvement rss object_detail
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

There is a small inconsistency between generic view object_detail and item template from the feed framework.

One names the return object: {{ object }} the other {{ obj }}

Having the same name would simplify the interchange of templates among them.

It is not far fetched to have a generic view for post_detail and using that as the template for item post on the feed.

object_detail documentation:
object: The object. This variable's name depends on the template_object_name parameter, which is 'object' by default. If template_object_name is 'foo', this variable's name will be foo.

syndication feed framework documentation:
feeds/latest_description.html for example uses {{ obj }} -- The current object (one of whichever objects you returned in items()).

Cheers

Change History (5)

comment:1 Changed 7 years ago by Russell Keith-Magee

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Triage Stage: UnreviewedAccepted

comment:2 Changed 5 years ago by Julien Phalip

Severity: Normal
Type: Cleanup/optimization

comment:3 Changed 5 years ago by Aymeric Augustin

UI/UX: unset

Change UI/UX from NULL to False.

comment:4 Changed 5 years ago by Aymeric Augustin

Easy pickings: unset

Change Easy pickings from NULL to False.

comment:5 Changed 4 years ago by Aymeric Augustin

Resolution: invalid
Status: newclosed

This ticket pertains to the function-based generic views which were removed for Django.

See also #19904.

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