app/django/utils/thread_support.py
author Sverre Rabbelier <srabbelier@gmail.com>
Mon, 20 Oct 2008 23:24:21 +0000
changeset 399 b82852e6963e
parent 323 ff1a9aa48cfd
permissions -rw-r--r--
Various improvements to the generic View code Among others: * Added the 'page' argument to the simple.errorResponse call * Pass the result of getEmptyKeyFields to edit() in create() * Fix typo's in error responses * Fixed a todo to properly redirect on create * Made editPost return something when the form is not valid * Added an _editGet hook Patch by: Sverre Rabbelier Reviewed by: to-be-reviewed

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