return the proper atom and rss content types for the feeds
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
This commit is contained in:
@@ -14,7 +14,7 @@ import os
|
||||
import re
|
||||
|
||||
from feedgen.feed import FeedGenerator
|
||||
from flask import Blueprint, abort
|
||||
from flask import Blueprint, Response, abort
|
||||
from flask import current_app as app
|
||||
|
||||
from incorporealcms.lib import instance_resource_path_to_request_path, parse_md
|
||||
@@ -61,9 +61,9 @@ def serve_feed(feed_type):
|
||||
fe.content(content, type='html')
|
||||
|
||||
if feed_type == 'atom':
|
||||
return fg.atom_str(pretty=True)
|
||||
return Response(fg.atom_str(pretty=True), mimetype='application/atom+xml')
|
||||
else:
|
||||
return fg.rss_str(pretty=True)
|
||||
return Response(fg.rss_str(pretty=True), mimetype='application/rss+xml')
|
||||
|
||||
|
||||
def _generate_feed_id(feed_entry_path):
|
||||
|
||||
Reference in New Issue
Block a user