示例#1
0
 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('/')
示例#2
0
 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('/')
示例#3
0
 def get(self, note_id):
     iden = int(note_id)
     note = db.get(db.Key.from_path('Notes', iden))
     db.delete(note)
     return webapp2.redirect('/')
示例#4
0
 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})
示例#5
0
 def get(self, note_id):
     iden = int(note_id)
     note = db.get(db.Key.from_path('Notes', iden))
     db.delete(note)
     return webapp2.redirect('/')
示例#6
0
 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})