def post(self): flyer = Flyer() pdf = self.request.get("flyer") flyer.flyer = db.Blob(pdf) flyer.name = self.request.get("name") flyer.put() flyer.id = str(flyer.key().id()) flyer.put() recipients = self.request.get("content") lines = [ r.split(" ") for r in recipients.strip(" \t").split("\n") if len(r) > 0 ] for line in lines: email = line[0] msg = " ".join(line[1:]) job = Job(flyer_id=flyer.id, email=email, msg=msg, count=5, state="init", flyer=flyer) job.put() self.response.out.write(template.render("templates/finish.html", {}))
def post(self): flyer = Flyer() pdf = self.request.get("flyer") flyer.flyer = db.Blob(pdf) flyer.name = self.request.get("name") flyer.put() flyer.id = str(flyer.key().id()) flyer.put() recipients = self.request.get("content") lines = [r.split(" ") for r in recipients.strip(" \t").split("\n") if len(r)>0] for line in lines: email = line[0] msg = " ".join(line[1:]) job = Job(flyer_id=flyer.id, email=email, msg=msg, count=5, state="init", flyer=flyer) job.put() self.response.out.write(template.render("templates/finish.html", {}))