Commits

Anonymous committed dd18925 Draft

Added a games page.

Comments (0)

Files changed (4)

 - url: /
   script: handlers/home.py
 
+- url: /games(/.*)?
+  script: handlers/games.py
+
 - url: /admin(/.*)?
   script: handlers/admin.py
 

handlers/games.py

+"""
+Games page.
+"""
+
+__author__ = 'Kerry Xing (kxing@mit.edu)'
+
+from common import database
+from common.utils import ChessClubHandler
+from google.appengine.ext.webapp import WSGIApplication
+from google.appengine.ext.webapp.util import run_wsgi_app
+
+class Games(ChessClubHandler):
+  def get(self):
+    self.render('games.html')
+
+if __name__ == '__main__':
+  app = WSGIApplication([('/games', Games)], debug=True)
+  run_wsgi_app(app)

templates/_base.html

             <ul class="nav">
               {% if not logged_in_member %}
               <li><a href="/">Home</a></li>
+              <li><a href="/games">Games</a></li>
               <li><a href="/login">Login</a></li>
               <li><a href="/contact">Contact Us</a></li>
               {% else %}

templates/games.html

+{% extends "_container.html" %}
+{% block title %}Games{% endblock %}
+{% block content %}
+<div class="row">
+  <div class="span12">
+    <p>Here's an interesting game:</p>
+    <p>1. f3 e5 2. g4 Qh4#</p>
+  </div>
+</div>
+<hr/>
+{% endblock %}