[magic-removal] [patch] Allow access to the current user outside of a request
|Reported by:||jkocherhans||Owned by:||Adrian Holovaty|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
A common request is for modified_by and added_by fields. It's not currently possible to do these automatically in django beacuse the model/manipulator is decoupled from the request object, and the request is the only place that has access to the current user. A couple of attempts to address this issue have been made in #1132 and #1164. These were generally rejected. A common solution for this problem is to store the current user in a thread local. This ticket uses that approach.