Opened 17 years ago

Closed 15 years ago

#6618 closed (fixed)

Make use of templates in feeds.py optional

Reported by: christoph.neuroth@… Owned by:
Component: contrib.syndication Version: dev
Severity: Keywords:
Cc: albrecht.andi@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

When creating a feed you have to specify title, description and link for each item. For the link this is really easy by overriding the item_link method, which is called for every item.

def item_link(self, obj):
  return '/feed/'+str(obj.id)

However for the description and title fields you have to create two template files which in most cases will consist of only a single line of code("{{ obj.foo }}"). IMHO this is extremely ugly - it would be much nicer if you could just overide one method similar to item_link:

def item_title(self, obj):
  return obj.header
def item_description(self, obj):
  return obj.teaser

Attachments (1)

syndication-optionaltemplates.diff (4.3 KB ) - added by Julian Bez 16 years ago.
Makes templates optional + includes the fix for #6533

Download all attachments as: .zip

Change History (9)

comment:1 by Simon Greenhill, 17 years ago

Triage Stage: UnreviewedAccepted

comment:2 by Julian Bez, 16 years ago

Owner: changed from nobody to Julian Bez
Status: newassigned

by Julian Bez, 16 years ago

Makes templates optional + includes the fix for #6533

comment:3 by Julian Bez, 16 years ago

Has patch: set

comment:4 by Malcolm Tredinnick, 16 years ago

milestone: post-1.0

comment:5 by Andi Albrecht, 16 years ago

Cc: albrecht.andi@… added

comment:6 by (none), 16 years ago

milestone: post-1.0

Milestone post-1.0 deleted

comment:7 by Julian Bez, 16 years ago

Owner: Julian Bez removed
Status: assignednew

comment:8 by Russell Keith-Magee, 15 years ago

Resolution: fixed
Status: newclosed

(In [12338]) Fixed #6188, #6304, #6618, #6969, #8758, #8989, #10334, #11069, #11973 and #12403 -- Modified the syndication framework to use class-based views. Thanks to Ben Firshman for his work on this patch.

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