-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathatom.py
More file actions
25 lines (19 loc) · 758 Bytes
/
atom.py
File metadata and controls
25 lines (19 loc) · 758 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from tipfy import RequestHandler, request, Response, url_for
from tipfy.ext.jinja2 import render_template
from google.appengine.ext import db
import models
from filters import FilterCollection, filters
class AtomViewHandler(RequestHandler):
def get(self, **kwargs):
response = Response(mimetype = 'application/atom+xml')
collection = FilterCollection(filters, request, response, cookies=False)
q = models.accepted_quotes()
collection.add_to_query(q)
q.order('-creation_date')
out = render_template(
'cppbash/atom.xml',
title = "C++ Bash",
link = url_for('home', full=True),
quotes = q)
response.response = [out]
return response