Example #1
0
 def post(self, pk):
     img = self.get_argument("img")
     descs = self.get_argument("descs")
     models.update_branch(pk, img, descs)
     branch = models.branch_by_id(pk)[0]
     name = branch.NAME
     projectid = re.match('(\d+)/*', name).group(1)
     self.redirect("/" + str(projectid) + "/")
Example #2
0
 def get(self, pk):
     branch = models.branch_by_id(pk)[0]
     self.render("templates/edit.html", object=branch)