Additional template tags...
Sam Ruby
rubys at intertwingly.net
Mon Aug 11 08:41:40 EST 2008
On Sun, Aug 10, 2008 at 3:19 AM, Christopher Stewart
<christopher.stewart at gmail.com> wrote:
> Hey all,
>
> I'm porting some templates from Planet to Venus, and I need additional
> template tags (namely, for geo:lat & geo:long).
>
> According to the Universal Feed Parser documentation [1], the needed
> elements should be available from feed.geo_lat and feed.geo_long. So,
> assuming that I decipher python code correctly, to make them available as
> template variables something like :
>
> ['lat', Plain, 'geo_lat']
> ['long', Plain, 'geo_long']
>
> in the "FeedParser path to Planet tmpl names Map" (defined in
> /planet/shell/tmpl.py) should do the trick. Yet it doesn't, so perhaps
> there's something I'm overlooking ?
The following also needs to be updated:
http://intertwingly.net/code/venus/planet/reconstitute.py
The design of Venus is feed to cache (which involves a normalization)
and cache to template. Some templating engines operate directly off
of the cache representation, but htmltmpl needs to have this data
mapped for it. You have a handle on the second half of the problem.
As a debug aid, there is a main program which can help you directly
see what the output of reconstitute looks like:
python tests/reconstitute.py http://example.com/feed/
> Please advise.
>
> Thanks !
>
> Take care,
> Chris
>
> [1] http://www.feedparser.org/docs/namespace-handling.html
>
> --
> Christopher Stewart
> HQ : http://www.stewart-explorations.net/
> Blog : http://thedailypoligraf.stewart-explorations.net/
> Rock : http://www.poligraf.net/
- Sam Ruby
> --
> devel mailing list
> devel at lists.planetplanet.org
> http://lists.planetplanet.org/mailman/listinfo/devel
>
>
More information about the devel
mailing list