Browse files

added encryption

  • Loading branch information...
1 parent fa100a0 commit 204f77fef9635b8df540619f812fa76257fc27af unknown committed May 5, 2012
Showing with 6 additions and 4 deletions.
  1. +6 −4 main.py
View
10 main.py
@@ -52,6 +52,7 @@ def post(self):
duration_amount = int(self.request.get('duration_amount'))
multiplier = int(self.request.get('duration_multiplier'))
+ hashcode = random_string()
issue = Issue(
title = cgi.escape(self.request.get('title')),
description = cgi.escape(self.request.get('description')),
@@ -69,9 +70,8 @@ def post(self):
if self.request.get('option5'):
issue.add_choice(cgi.escape(self.request.get('option5')))
- self.redirect('/issue/%s' % (issue.key().id()))
-
-
+ #self.redirect('/issue/%s' % (issue.key().id()))
+ self.redirect('/issue/%s' % hashcode)
class EditHandler(webapp.RequestHandler):
def get(self,id):
@@ -163,7 +163,9 @@ def post(self,id):
self.redirect('/?success=vote')
-
+def random_string():
+ hashbase = 'abcd1234'
+ return ''.join(random.sample(hashbase,len(hashbase)))
def main():
application = webapp.WSGIApplication([

0 comments on commit 204f77f

Please sign in to comment.