def put(self): post = self.request recording = Recording.get_by_id(int(post.get("id"))) if recording is not None: recording.mp3 = post.get("mp3", "") recording.put() else: self.error(404)
def get(self, recording_id): recording = Recording.get_by_id(int(recording_id)) if recording is None: self.redirect("/") return recordings = Recording.query().fetch() self.set_template("recording.html") self.template_values["recordings"] = recordings self.template_values["recording"] = recording self.render() return
def delete(self, recording_id): recording = Recording.get_by_id(int(recording_id)) if recording is not None: recording.key.delete()