Categories not showing up
Sam Ruby
rubys at intertwingly.net
Sat Oct 14 01:19:27 EST 2006
Michel Klijmij wrote:
> Op vr, 13-10-2006 te 23:48 +1000, schreef Jeff Waugh:
>> <quote who="Michel Klijmij">
>>
>>> Op vr, 13-10-2006 te 14:31 +0200, schreef Eric van der Vlist:
>>>> the categories do not show up in the entries that include <category/>
>>>> elements.
>>> I have mentioned this several times on this list but never gotten a reply.
>>>
>>> I'm using the plain 2.0 version by the way, not Venus.
>> When feedparser was upgraded, category transfer from the feeds through to
>> the template was disabled (see the ignored elements in planet/__init__.py),
>> as it became a list instead of a string. Venus ought to handle this better.
>
> Thanks for the quick response. Switching to Venus isn't really an option
> right now as that would require a lot of work on the template, and Venus
> seems to be in rather active development while I prefer something that
> works stably and predictably. I might test it out though.
If your current Planet 2.0 templates don't work with Venus, then that's
a bug. (*)
> Is there a way I can get it back by editing the planet files? I've tried
> removing "categories" from the ignored_keys, but that doesn't seem to do
> the trick.
The problem is that FeedParserDict is a bit "magical", and overrides
__getitem__ so that if you attempt to fetch a property by an old name,
it will do the conversion. That's good, but what Planet does is ask the
dictionary "what keys do you have?", and with the latest Feed Parser,
the key you will get back is tags:
http://feedparser.org/docs/reference-feed-tags.html
The htmltmpl support in Venus specifically requests individual keys to
avoid this problem in the future.
- Sam Ruby
(*) Not to say that Venus is bug free, or that all bugs will be quickly
addressed; but fixes with test cases in bzr repositories can be shared
by everyone; patches with test cases are gratefully accepted; and even
simply creating a test case will likely get attention.
More information about the devel
mailing list