예제 #1
0
파일: principal.py 프로젝트: dmdm/PySite
 def xhr_delete(self):
     try:
         ids = [int(x) for x in self.request.POST['id'].split(',')
             if int(x) != 0]
         for id in ids:
             manager.delete_principal(id)
         return {'status': True, 'msg': 'Ok'}
     except (StatementError, NoResultFound, PySiteError) as exc:
         return {'status': False, 'msg': str(exc), 'errors': {}}
예제 #2
0
파일: pysite.py 프로젝트: dmdm/PySite
 def delete_principal(self):
     rs = usrmanager.delete_principal(self._args.id)