def feed(self, since=None, until=None, page=None, limit=None): username = c.project.shortname.split('/')[1] user = User.by_username(username) if request.environ['PATH_INFO'].endswith('.atom'): feed_type = 'atom' else: feed_type = 'rss' title = 'Recent posts by %s' % user.display_name feed = Notification.feed( {'author_id':user._id}, feed_type, title, c.project.url(), title, since, until, page, limit) response.headers['Content-Type'] = '' response.content_type = 'application/xml' return feed.writeString('utf-8')