tags:

views:

68

answers:

3

How would you replace these tags with actual data:

[|RSSITEMS:]

[|RSSITEM:TITLE|]
[|RSSITEM:CONTENT|]

[|END:RSSITEMS|] 

[|RSSITEMS:] starts loop at the top and ends its [|END:RSSITEMS|]

[|RSSITEM:TITLE|] and [|RSSITEM:CONTENT|] should be replaced with data from rss feeds.

Feed data is already in database.

Can not use django templates, as HTML above will be different in most cases, can not use templates. the HTML is stored in database.

A: 

Don't use custom templates for RSS. There is a syndication framework:

http://docs.djangoproject.com/en/dev/ref/contrib/syndication/

Matt Williamson
feed syndication is already in place. just need to replace tags to actual data.
bobsr
{% for entry in entries %} {{ entry.title }} {{ entry.content }} {% endfor %}
Matt Williamson
+2  A: 

Maybe you could use an existing template engine instead, such as Cheetah (example) or the one from Django (example with for loop).

Thomas
A: 

you can always use a custom template loader to use django templates from the database.

Jason