Exemplo n.º 1
0
 def post(self, projectName):
     storyName = self.request.get('storyName')
     starPoints = self.request.get('starPoint')
     currentProject = Project.gql(("WHERE name = '%s'" % projectName)).get()
     story = Story(name=storyName, starPoint=int(starPoints), project = currentProject)
     story.put()
     self.redirect("/project/%s/backlog"%projectName)
Exemplo n.º 2
0
 def post(self, projectName):
     try:
         task = Task(
             name=self.request.get("name"),
             estimate=self.request.get("estimate"),
             story=Story.get(self.request.get("storyKey")),
         )
         task.put()
         result = {"success": True, "message": "Task created", "task_key": str(task.key())}
     except:
         result = {"success": False, "message": sys.exc_info()[0]}
     self.response.out.write(simplejson.dumps(result))