私は自分のブログ(webapp2アプリケーション-Jinja2テンプレート)にRSSフィードを追加しようとしていますが、これは私が持っているものです:
class XMLHandler(Handler):
def get(self):
posts = db.GqlQuery("SELECT * FROM Post WHERE is_draft = FALSE ORDER BY created DESC")
self.render("xmltemplate.xml", posts=posts, mimetype='application/xml')
xmltemplate.xmlは次のようになります。
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<channel>
<title>Blag</title>
<link>http://www.blagonudacity.appspot.com/</link>
<description>Yet Another Blag</description>
{%for post in posts %}
<entry>
<title>{{post.subject}}></title>
<link href="http://www.blagonudacity.appspot.com/post/{{ post.key().id()}}" rel="alternate" />
<updated>{{post.created}}</updated>
<author><name>Prakhar Srivastav</name></author>
<summary type="html"> {{ post.content }} </summary>
</entry>
{%endfor%}
</channel>
</feed>
関連するページに移行したときにブラウザに表示される/feeds/all.atom.xml
のは、マークアップのあるhtmlページだけです。XMLページがブラウザでどのように見えるかとは異なります。私はここで何が間違っているのですか?これがデモです