larssg / gae-score-keeper

Score Keeper for Google App Engine - just playing around (live at scorekeepr.appspot.com)

This URL has Read+Write access

Lars Sehested (author)
Sat Apr 26 16:51:13 -0700 2008
commit  4b559304e4cf993ca4368a25f0f8b0dce4d46e3c
tree    cedb6813af8829ff5bf10b2ceb6689bfdff2bd9b
parent  11464edce059044f907d7f9dbff84604eb3c7359
gae-score-keeper / dashboard.py
100644 25 lines (20 sloc) 0.594 kb
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
import wsgiref.handlers
import os
import sys
import string
 
from google.appengine.ext import webapp
from models import *
from scorekeepr import *
 
class Dashboard(ScoreKeeper):
def get(self):
matches = Match.gql("ORDER BY played_at DESC LIMIT 10")
 
template_values = self.default_template_values('dashboard')
template_values['matches'] = matches
self.render_default_template('dashboard', 'index', template_values)
 
def main():
application = webapp.WSGIApplication(
[('/', Dashboard)],
debug=True)
wsgiref.handlers.CGIHandler().run(application)
 
if __name__ == "__main__":
main()