app/django/utils/thread_support.py
author Sverre Rabbelier <srabbelier@gmail.com>
Thu, 20 Nov 2008 20:59:10 +0000
changeset 515 fa235f6759f3
parent 323 ff1a9aa48cfd
permissions -rw-r--r--
Moved the last remnant of soc.views.user.profile to soc.views.models Sadly, it is non-trivial to port this code to be generic enough to work with soc.views.models.base.edit. On the other hand, this will make customizing the editSelf code a lot easier.

"""
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"