Skip to content
This repository
Newer
Older
100644 15 lines (11 sloc) 0.406 kb
8b19c4bf »
2011-11-25 first commit. a simple blog system.
1 # -*- coding: utf-8 -*-
2
a8877341 »
2011-11-29 finish convert entry.py to sqlalchemy & set content-type of feed.xml …
3 from sqlalchemy import desc
cb5ca443 »
2011-11-25 finish install
4
8b19c4bf »
2011-11-25 first commit. a simple blog system.
5 from base import BaseHandler
a8877341 »
2011-11-29 finish convert entry.py to sqlalchemy & set content-type of feed.xml …
6 from models import Entry
8b19c4bf »
2011-11-25 first commit. a simple blog system.
7
8 class IndexHandler(BaseHandler):
9 def get(self):
a8877341 »
2011-11-29 finish convert entry.py to sqlalchemy & set content-type of feed.xml …
10 entries = self.session.query(Entry) \
11 .order_by(desc(Entry.PublishTime)) \
12 .limit(5) \
13 .all()
cb5ca443 »
2011-11-25 finish install
14 self.render('index.html', entries = entries)
Something went wrong with that request. Please try again.