| Index: display/handler_stats.py |
| =================================================================== |
| --- display/handler_stats.py (revision 11) |
| +++ display/handler_stats.py (working copy) |
| @@ -5,8 +5,10 @@ |
| import os |
| import logging |
| +import cgi |
|
provos
2008/05/16 17:24:51
this is no alpha ordered.
Panayiotis
2008/05/16 17:33:57
On 2008/05/16 17:24:51, provos wrote:
> this is no
|
| import handler_lib |
| +import model |
|
provos
2008/05/16 17:24:51
there is a comment missing here about what model p
|
| from google.appengine.ext import db |
| from google.appengine.ext import webapp |
| @@ -25,3 +27,15 @@ |
| } |
| path = os.path.join(os.path.dirname(__file__), 'html/stats.html') |
| self.response.out.write(template.render(path, values)) |
| + |
| + |
| + def post(self): |
|
provos
2008/05/16 17:24:51
how about you provide comments for your methods? h
Panayiotis
2008/05/16 17:33:57
On 2008/05/16 17:24:51, provos wrote:
> how about
|
| + hash = self.request.get("digest") |
| + if model.models.Digest.gql("WHERE hash = :1", hash).get() is None: |
|
provos
2008/05/16 17:24:51
this looks like SQL, but SQL does not have a = spa
|
| + digest = model.models.Digest(hash=hash) |
| + digest.put() |
| + |
| + logging.info("Added digest %s" % hash) |
|
provos
2008/05/16 17:24:51
i have seen this kind of code somewhere else befor
|
| + self.response.out.write('<html><body>Added:<pre>') |
| + self.response.out.write(cgi.escape(hash)) |
| + self.response.out.write('</pre></body></html>') |