55 lines
1.4 KiB
Plaintext
55 lines
1.4 KiB
Plaintext
# HG changeset patch
|
|
# Parent a110c540b0769ee849a404324cf8594d116cc982
|
|
|
|
diff --git a/controllers/academy.py b/controllers/academy.py
|
|
--- a/controllers/academy.py
|
|
+++ b/controllers/academy.py
|
|
@@ -3,12 +3,45 @@
|
|
from openerp import http
|
|
from openerp.addons.web.controllers import main
|
|
|
|
+teaching_assistants = [
|
|
+ {'name': "Diana Padilla"},
|
|
+ {'name': "Jody Carroll"},
|
|
+ {'name': "Lester Vaughn"},
|
|
+ {'name': "Paul Jimenez"},
|
|
+ {'name': "Tanya Harris"},
|
|
+]
|
|
+
|
|
class academy(main.Home):
|
|
@http.route('/', auth='none')
|
|
def index(self):
|
|
+ tas = [
|
|
+ '<li><a href="/tas/?id=%d">%s</a></li>' % (i, ta['name'])
|
|
+ for i, ta in enumerate(teaching_assistants)
|
|
+ ]
|
|
+
|
|
return """<!doctype html>
|
|
<link href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
|
|
<body class="container">
|
|
- Hello, world!
|
|
+ <h1>Introduction to something</h1>
|
|
+ <h2>Teaching Assistants</h2>
|
|
+ <ul>
|
|
+ %(tas)s
|
|
+ </ul>
|
|
</body>
|
|
-"""
|
|
+""" % {
|
|
+ 'tas': '\n'.join(tas)
|
|
+ }
|
|
+
|
|
+ @http.route('/tas', auth='none')
|
|
+ def ta(self, id):
|
|
+ return """<!doctype html>
|
|
+<html>
|
|
+ <head>
|
|
+ <title>AcademyAcademy TA %(name)s</title>
|
|
+ <link href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
|
|
+ </head>
|
|
+ <body class="container">
|
|
+ <h1>%(name)s</h1>
|
|
+ </body>
|
|
+</html>
|
|
+""" % teaching_assistants[int(id)]
|