def refresh_catalog(request): if request.method != 'POST': raise PopupException(_('A POST request is required.')) try: db = server.get(request.user) res = db.resetCatalog() response = {'status': res.status_code, 'data': res.error_msgs} except Exception, e: response = {'status': -1, 'data': str(e)}
def refresh_catalog(request): response = {'status': -1, 'message': ''} if request.method != 'POST': response['message'] = _('A POST request is required.') else: try: db = server.get(request.user) res = db.resetCatalog() response = {'status': res.status.status_code, 'message': res.status.error_msgs} except Exception, e: response = {'message': str(e)}
def refresh_catalog(request): response = {'status': -1, 'message': ''} if request.method != 'POST': response['message'] = _('A POST request is required.') else: try: db = server.get(request.user) res = db.resetCatalog() response = { 'status': res.status.status_code, 'message': res.status.error_msgs } except Exception, e: response = {'message': str(e)}