- feed_reverse_name = "%s_feed" % reverse_name
- feed_view = http_not_acceptable(self.feed_view(get_items_attr, feed_reverse_name))
- feed_pattern = r'%s%s%s$' % (base, (base and base[-1] != "^") and "/" or "", self.feed_suffix)
- urlpatterns += patterns('',
- url(feed_pattern, feed_view, name=feed_reverse_name),
- )
+ suffixes = [(self.feed_suffix, None)] + [(slug, slug) for slug in registry]
+ for suffix, feed_type in suffixes:
+ feed_reverse_name = "%s_%s" % (reverse_name, suffix)
+ feed_view = http_not_acceptable(self.feed_view(get_items_attr, feed_reverse_name, feed_type))
+ feed_pattern = r'%s%s%s$' % (base, "/" if base and base[-1] != "^" else "", suffix)
+ urlpatterns += patterns('',
+ url(feed_pattern, feed_view, name=feed_reverse_name),
+ )