def get(self): notelist=[] for note in DaTingNote.all(): note.groupobj=getGroup(note.group) notelist.append(note) self.render('templates/daTingNoteList.html',{'datingNoteList':notelist}) pass
def get(self): datingNoteId=self.request.get('id') if datingNoteId: n=DaTingNote.get_by_id(int('id')) if n: n.delete() self.redirect('/daTingNoteList') return notelist=[] for note in DaTingNote.all(): note.groupobj=getGroup(note.group) notelist.append(note) self.render('templates/daTingNoteList.html',{'datingNoteList':notelist}) pass