Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Start on first Diary page if no page given
- @route('/diary')
- def diary():
- return diary(0)
- # Diary Page - Diary Template - list all articles
- @route('/diary/<page:int>')
- def diary(page):
- """diary page"""
- loc = 'diary/entries/'
- assert isinstance(page, int)
- info = {'css': 'diary', 'title': 'blessfrey - developer diary', 'year': datetime.datetime.now(), 'snippets': list_snippets(gather_and_sort(loc)), 'latest': list_headlines(gather_and_sort(loc)[0:5]), 'total': len(curate_files(gather_files(loc))), 'limit': 8, 'cluster': 3, 'page': page}
- return template('diary.tpl', info)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement