title: Can someone show me an example of how to use threadlocals in Django?
body: <p>Essentially, I'm trying to access the current user in the models.py in one of my apps. I've already read about how you're not supposed to do this and how you're supposed to do this in the views.py, etc. etc. What I'm trying to accomplish only utilizes the Django admin backend, meaning views.py is not used at all.</p>
  
  <p>Which is why I'm turning to threadlocals. I've looked through a number of questions pertaining to this and all I've found is this dead link: <a href="http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser" rel="nofollow">http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser</a></p>
  
  <p>Frankly, I'm stumped and was hoping someone could provide me with some information on how to use threadlocals, including details on what settings I need to add to my settings.py and what files I need to make.</p>