I need to deal with legacy django code.
Nearly all methods have request
as first parameter. Not only views, that's ok there.
The request
is passed along only to get request.user and to permission checks against the current active user.
I don't see a good solution to solve this mess.
There are tests, but I would like to refactor the code.
Removing request
from the method definitions does not work, since the current active user needs to be accessed.
Update
request
is accessed in:
- views (OK for me)
- forms (not OK for me)
- utility methods (not OK for me)
models
don't use request in this code (good for me).