Example #1
0
    def post(self, id):
        entity = PassengerAlert.get_by_id(long(id))
        # if(self.request.get("onoffswitch") == 'true'):
        # entity.on_off = True
        # else:
        # entity.on_off = False

        entity.put()
        self.redirect("/operator/viewalert/id=" + id)
Example #2
0
    def get(self, id):
        page_title = "View Alert"

        entity = PassengerAlert.get_by_id(long(id))

        template_values = {"page_title": page_title, "entity": entity, "extends_template": self.get_template()}

        template = JINJA_ENVIRONMENT.get_template("templates/viewalertdetails.html")
        self.response.write(template.render(template_values))