X-Git-Url: http://git.ithinksw.org/philo.git/blobdiff_plain/1c81f61d4e574d439ed2dbfefd599f04b5e2bef9..dbb5ab771be406d90ac522e0ecd644e5ddb21e6f:/contrib/penfield/utils.py?ds=sidebyside diff --git a/contrib/penfield/utils.py b/contrib/penfield/utils.py index 43c7c91..2c550db 100644 --- a/contrib/penfield/utils.py +++ b/contrib/penfield/utils.py @@ -56,13 +56,13 @@ class FeedMultiViewMixin(object): current_site = Site.objects.get_current() #Could this be done with request.path instead somehow? feed_kwargs = { - 'link': 'http://%s/%s/%s/' % (current_site.domain, request.node.get_absolute_url().strip('/'), reverse(reverse_name, urlconf=self, kwargs=kwargs).strip('/')) + 'link': request.node.construct_url(subpath=self.reverse(reverse_name, kwargs=kwargs), request=request, with_domain=True) } feed = self.get_feed(feed_type, extra_context, feed_kwargs) for obj in objects: kwargs = { - 'link': 'http://%s/%s/%s/' % (current_site.domain, request.node.get_absolute_url().strip('/'), self.get_subpath(obj).strip('/')) + 'link': request.node.construct_url(subpath=self.reverse(obj=obj), request=request, with_domain=True) } self.add_item(feed, obj, kwargs=kwargs) @@ -93,7 +93,7 @@ class FeedMultiViewMixin(object): if self.feeds_enabled: feed_name = '%s_feed' % base_name urlpatterns = patterns('', - url(r'^%s/$' % self.feed_suffix, self.feed_view(object_fetcher, feed_name), name=feed_name), + url(r'^%s$' % self.feed_suffix, self.feed_view(object_fetcher, feed_name), name=feed_name), ) + urlpatterns return urlpatterns