def post(self, note_id): iden = int(note_id) note = db.get(db.Key.from_path('Notes', iden)) note.author = self.request.get('author') note.text = self.request.get('text') note.priority = self.request.get('priority') note.status = self.request.get('status') note.date = datetime.now() note.put() return webapp2.redirect('/')
def get(self, note_id): iden = int(note_id) note = db.get(db.Key.from_path('Notes', iden)) db.delete(note) return webapp2.redirect('/')
def get(self, note_id): iden = int(note_id) note = db.get(db.Key.from_path('Notes', iden)) self.render_template('edit.html', {'note': note})