def task(self, isAdmin, s): donation_key = self.request.get("id") if donation_key == "": # If they didn't type any arguments into the address bar - meaning it didn't come from the app tools.giveError(self, 500) else: # Getting donation by its key (from address bar argument) d = tools.getKey(donation_key).get() c = d.contact.get() i_key = tools.getUserKey(self) i = i_key.get() donation_date = [d.donation_date.day, d.donation_date.month, d.donation_date.year] donation_date = json.dumps(donation_date) template_variables = {"d": d, "c": c, "s": s, "i": i, "donation_date": donation_date} self.response.write( template.render('pages/rq_details.html', template_variables))
def get(self, address): logging.info("404 error on address: " + str(address)) tools.giveError(self, 404)