http://geekaa3.appspot.com/
底部的 “Day Day Up” 和 “Plan”
我是照着原来的 mission 页面改的。
我把 page.py 里面 mission那段,改成:
class PlanHandler(webapp.RequestHandler):
def get(self):
template_values = {}
template_values['site_name'] = SITE_NAME
template_values['site_tagline'] = SITE_TAGLINE
template_values['site_description'] = SITE_DESCRIPTION
template_values['site_footnote'] = SITE_FOOTNOTE
template_values['rnd'] = random.randrange(1, 100)
note = GetKindByNum('Note', 5)
if note is False:
note = GetKindByNum('Note', 6)
template_values['note'] = note
member = CheckAuth(self)
if member:
template_values['member'] = member
template_values['page_title'] = u' › Plan'
path = os.path.join(os.path.dirname(__file__), 'tpl', 'desktop', 'plan.html')
output = template.render(path, template_values)
self.response.out.write(output)
class UpdatesHandler(webapp.RequestHandler):
def get(self):
template_values = {}
template_values['site_name'] = SITE_NAME
template_values['site_tagline'] = SITE_TAGLINE
template_values['site_description'] = SITE_DESCRIPTION
template_values['site_footnote'] = SITE_FOOTNOTE
template_values['rnd'] = random.randrange(1, 100)
note = GetKindByNum('Note', 7)
if note is False:
note = GetKindByNum('Note', 8)
template_values['note'] = note
member = CheckAuth(self)
if member:
template_values['member'] = member
template_values['page_title'] = u' › Updates'
path = os.path.join(os.path.dirname(__file__), 'tpl', 'desktop', 'updates.html')
output = template.render(path, template_values)
self.response.out.write(output)