import threading

_thread_local = threading.local()

BOOTSTRAP_2 = 'bootstrap-2'
BOOTSTRAP_3 = 'bootstrap-3'


def get_bootstrap_version():
    try:
        bootstrap_version = _thread_local.BOOTSTRAP_VERSION
    except AttributeError:
        bootstrap_version = BOOTSTRAP_2
    return bootstrap_version


def set_bootstrap_version3():
    _thread_local.BOOTSTRAP_VERSION = BOOTSTRAP_3


def set_bootstrap_version2():
    _thread_local.BOOTSTRAP_VERSION = BOOTSTRAP_2

@@ -450,20 +450,1013 @@
 RSION = BOOTSTRAP_2%0A
+%0A%0Adef format_angular_error(error_msg, additional_data=None,%0A                         log_error=False, exception=None, request=None):%0A    %22%22%22Gets the standard angular async error response.%0A    :param error_msg: A string that is the error message you'd like to return%0A    :param additional_data: a dictionary of additional data you'd like to pass%0A    :return: %7B%0A        'error': %3Cerror_msg%3E,%0A        %3C...additional_data...%3E,%0A    %7D%0A    %22%22%22%0A    resp = %7B%0A        'error': error_msg,%0A    %7D%0A    if isinstance(additional_data, dict):%0A        resp.update(additional_data)%0A    return resp%0A%0A%0Adef format_angular_success(additional_data=None):%0A    %22%22%22Gets the standard angular async SUCCESS response.%0A    :param additional_data: a dictionary of additional data you'd like to pass%0A    :return: %7B%0A        'success': True,%0A        %3C...additional_data...%3E,%0A    %7D%0A    %22%22%22%0A    resp = %7B%0A        'success': True,%0A    %7D%0A    if isinstance(additional_data, dict):%0A        resp.update(additional_data)%0A    return resp%0A

add angular js repsonse utils