Django Atom feed Item Category
Hi everyone,
I'm geting a little confused with the 'item category' section of
Django's atom feed framework. I want to extend each entry in a feed
with a further piece of information beyond the standard title, id,
etc. The only way I see how to do this is to make use of the
'category' element (correct me if I shoudn't be doing things in this
way). For example I want to tag each entry with say
'institution' (without going down the path of breaking out into
seperate feeds for each institution). So I'm hoping for a feed along
the lines of:
<feed>
<id>xxxxxxxxxxxxxxxxx</id>
<title>xxxxxxxxxxxxxx</title>
<subtitle>xxxxxxxxxxxxxxxxxxxxx</subtitle>
<updated>xxxxxxx</updated>
..................
...................
<entry>
<id>urn:uuid:354ed4ec-e346-11df-9343-00163e9152a5</id>
<title>xxxxxxxxxxxxxxxxxxxxxxxxx</title>
<updated>xxxxxxxxxxxxxxxx</updated>
.........................
.........................
<category term="Institution"> My_Institution </category>
</entry>
At the moment I have the following in my feed class:
def item_categories(self,item):
return [{'term':'Insitution'}]
which generates the element with the attribute correctly. But how do I
get the value embedded, i.e. the 'My_Institution'?
Any help or even advice if I'm using atom feed wrongly here would be
much appreciated.
Thanks,
G
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home