app/django/utils/thread_support.py
author Sverre Rabbelier <srabbelier@gmail.com>
Thu, 12 Feb 2009 20:14:17 +0000
changeset 1282 005be2cf889d
parent 323 ff1a9aa48cfd
permissions -rw-r--r--
Do not attempt to render a field if it is disabled This is required to make it possible to disable fields dynamically. Patch by: Sverre Rabbelier

"""
Code used in a couple of places to work with the current thread's environment.
Current users include i18n and request prefix handling.
"""

try:
    import threading
    currentThread = threading.currentThread
except ImportError:
    def currentThread():
        return "no threading"