Opened 17 years ago
Closed 15 years ago
#6618 closed (fixed)
Make use of templates in feeds.py optional
Reported by: | 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
Change History (9)
comment:1 by , 17 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 17 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
by , 17 years ago
Attachment: | syndication-optionaltemplates.diff added |
---|
comment:3 by , 17 years ago
Has patch: | set |
---|
comment:4 by , 17 years ago
milestone: | → post-1.0 |
---|
comment:5 by , 17 years ago
Cc: | added |
---|
comment:7 by , 16 years ago
Owner: | removed |
---|---|
Status: | assigned → new |
Note:
See TracTickets
for help on using tickets.
Makes templates optional + includes the fix for #6533