Example #1
0
 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_domain(id)
         return {'status': True, 'msg': 'Ok'}
     except (StatementError, NoResultFound, PySiteError) as exc:
         return {'status': False, 'msg': str(exc), 'errors': {}}