def loadlistusers(): if session['logged_in'] and request.method == 'POST': user=User(True) if session['usuario_completo']['codigosucursal']: return jsonify(results=user.all_users("= '"+ str (session['usuario_completo']['codigosucursal']) +"' ")) else: return jsonify(results=user.all_users(" notnull")) else: return render_template('index.html')
def loadlistuser(): try: if session['logged_in'] and request.method == 'POST': user=User(True) return jsonify(results=user.all_users()[1]) except: exceptionType, exceptionValue, exceptionTraceback = sys.exc_info() print exceptionValue return render_template('index.html')