Is there any way to add the new node to each item returned by "items()"
Thank you.
Este correo electrónico y, en su caso, cualquier fichero anexo, contiene información confidencial exclusivamente dirigida a su(s) destinatario(s). Toda copia o divulgación deberá ser autorizada por BERTIENTE.
This e-mail and any attachments are confidential and exclusively directed to its address(es). Any copy or distribution will have to be authorized by BERTIENTE.
> Hi all,
>
> I want to add the geo tag (with latitude and longitude) to each item
> of my feeds:
>
> <georss:point>45.256 -71.92</georss:point>
> I am using the feeds framework:
> class LatestEvents(Feed): title = "Latest Events" link
> = "/events/" def items(self): return
> Event.objects.order_by('-start_date')[:5]
> Is there any way to add the new node to each item returned by
> "items()"
> Thank you.
Daniel,
Attached is my current solution which is not really elegant but works.
That's why I cross post to the developers mailing-list, maybe we can
find a better way to handle that? There is a lot of duplicate code in
my solution (and maybe there is a better one?, let me know) but I
could easily generate a patch against the trunk for that.
Btw, I had noticed a bug in the SyndicationFeed class of django
feedgenerator, language is the only parameter where force_unicode is
applied and it returns u"None". This "conversion" cause problem in the
"if self.feed['language'] is not None:" test. If you replace
force_unicode by to_unicode it works. I'd submitted a bug and a patch
on Trac, see #6303.
While we are at feeds, I got a "cosmetic" question. It seems that each
generated feed in Django is not highlighted by Firefox when you read
the source. Is there a reason to that? I can't find a way to find the
cause.
Thanks,
David