Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def list_request(request, function_name, args=list()):
- if request.COOKIES.has_key('connection'):
- current_connection = request.COOKIES['connection']
- else:
- current_connection = 'default'
- try:
- cursor = connections[current_connection].cursor()
- print(connections[current_connection].connection.username)
- client_cursor = cursor.callfunc(execute_function(function_name), cx_Oracle.CURSOR, args)
- data = client_cursor.fetchall()
- row_names = _get_row_names(client_cursor.description)
- return row_names, data
- except cx_Oracle.DatabaseError:
- raise AccessDeniedError()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement