def rename(self): devsector_id = self.request.get('devsector_id', None) new_name = self.request.get('new_name', None) if new_name: devsector = DevelopmentSector.get(devsector_id) devsector.Name = new_name devsector.put() self.context['devsectors'] = DevelopmentSector.query() self.render('/admin/utils/devsectors_list')
def delete(self): devsector_id = self.request.get('devsector_id', None) mdb.delete(devsector_id) self.context['devsectors'] = DevelopmentSector.query() self.render('/admin/utils/devsectors_list')
def get(self): self.context['devsectors'] = DevelopmentSector.query() self.render('/admin/utils/devsectors_main')