codes = list(int(q.code) for q in questionaire.questions)
return(len(codes) + 1)
-class test:
- def GET(self):
- render('test.tmpl')
-
- def POST(self):
- render('test_sent.tmpl')
-
-class raw_sms_in:
- def POST(self):
- #TODO magic to parse sms
- pass
+#class test:
+# def GET(self):
+# render('test.tmpl', locals())
+#
+# def POST(self):
+# render('test_sent.tmpl', locals())
+#
+#class raw_sms_in:
+# def POST(self):
+# #TODO magic to parse sms
+# pass
web.webapi.internalerror = web.debugerror
--- /dev/null
+h1, h2, h3 {
+ border-bottom: 3px #000080 solid;
+ width: 66%;
+}
+
+#errormsg {
+ width: 20em;
+ border: 2px red solid;
+}
+
+#errormsg h3 {
+ margin: 0;
+ padding: 0.3em 0 0.3em 0;
+ background: red;
+ color: white;
+ text-align: center;
+ border: 0 0 0 0;
+}
+
+table, td, th {
+ border: 1px #000080 solid;
+ border-collapse: collapse;
+ border-spacing: 0px;
+}
+
+td, th {
+ padding: 0.2em;
+ text-alignt: left;
+}
+
+th {
+ background: #000080;
+ color: white;
+ text-align: center;
+ font-weight: bold;
+}
+
+#footer {
+ clear: both;
+ margin-top: 7em;
+ text-align: center;
+ font-size: 70%;
+}
+
<html>
<head>
<title>UNICEF Phone Application</title>
+<link rel="stylesheet" type="text/css" href="{{homepath}}/static/style.css" />
</head>
<body>
<h1>UNICEF Phone Application</h1>
<div id="content">
{% block content %}
{% endblock %}
+
+<div id="footer">
+<strong>RapidSMS</strong> © 2007
+<a href="http://mako.cc">Benjamin Mako Hill</a> ::
+<a href="http://projects.mako.cc/source/rapidsms">Source Available</a> under
+<a href="http://www.affero.org/oagpl.html">AGPL</a>
+
+</div>
</div>
</body>
</html>
<tr>
<td>{{q.code}}</td>
<td>{{q.description}}</td>
-<td>{{len(q.questions) or 0}}</td>
+<td>{{q.questions.count()}}</td>
<td><a href="{{homepath}}/edit_questions/{{q.id}}">edit</a></td>
</tr>
{% endfor %}