Use flasktools.atom_response.
This commit is contained in:
parent
e4b6e629c1
commit
732c13440e
1 changed files with 2 additions and 5 deletions
|
@ -483,14 +483,11 @@ def get_search_atom():
|
||||||
search = get_search_core()
|
search = get_search_core()
|
||||||
soup = etiquette.helpers.make_atom_feed(
|
soup = etiquette.helpers.make_atom_feed(
|
||||||
search.results,
|
search.results,
|
||||||
feed_id=request.query_string.decode('utf-8'),
|
feed_id='/search' + request.query_string.decode('utf-8'),
|
||||||
feed_title='etiquette search',
|
feed_title='etiquette search',
|
||||||
feed_link=request.url.replace('/search.atom', '/search'),
|
feed_link=request.url.replace('/search.atom', '/search'),
|
||||||
)
|
)
|
||||||
outgoing_headers = {
|
response = flasktools.atom_response(soup)
|
||||||
'Content-Type': 'application/atom+xml; charset=utf-8',
|
|
||||||
}
|
|
||||||
response = flask.Response(str(soup), headers=outgoing_headers)
|
|
||||||
return response
|
return response
|
||||||
|
|
||||||
@site.route('/search.json')
|
@site.route('/search.json')
|
||||||
|
|
Loading…
Reference in a new issue