我一直在尝试在我的博客中添加 RSS 提要(webapp2 应用程序 - Jinja2 模板),这就是我所拥有的:
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 页面在浏览器中的样子。我在这里做错了什么?这是演示