Hello tonemcd,

Thank you for the link it look interesting.
However I am not understanding where I should add those lines:
# cciw/middleware/threadlocals.py
import threading

_thread_locals = threading.local()

def get_current_user():
    try:
        return _thread_locals.user
    except AttributeError:
        return None

class ThreadLocals(object):
    """Middleware that adds various objects to thread local storage
from the request object."""
    def process_request(self, request):
        _thread_locals.user = getattr(request, 'user', None)

Do you have an idea?

Thank you


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to