Tuesday, March 13, 2012

Post url incorrect on syndication

Hi all:

In order to show my feeds blog I have a class:

class BlogFeed(Feed):
title = "MySite"
description = "Some ramblings of mine"
link = "/blog/feed/"

def items(self):
return Post.objects.all().order_by("-created")[:2]
def item_title(self, item):
return item.title
def item_description(self, item):
return item.body
def item_link(self, item):
return u"/blog/%d" % item.id

And the url for the feed is:

url(r'^feed/$', BlogFeed()),

All works fine but the post url.

The post url that is shown in feeds is
http://example.com/blog/4

when It should be
http://vcubells.net/blog/4

What's the problem? I don't see what I'm doing wrong.

Thanks a lot!


--

cubells

web: vcubells.net
microblogging: identi.ca/cubells
xmpp: cubells@jabber.org

--

--
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


Real Estate