Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(64)

Unified Diff: display/handler_stats.py

Issue 933: Add Link to Safe Browsing Diagnostic for matching URLs SVN Base: http://malfind2.googlecode.com/svn/trunk/
Patch Set: Created 3 months, 3 weeks ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side by-side-diff with in-line comments
Download patch
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>')
« no previous file | display/html/results.html » ('j')

Powered by Google App Engine
This is Rietveld r305