1 2 3 4 5 6 7 8 9 10 11 12 13 14 | class ModPythonSetLoggedinUser(object):
def process_request(self, request):
if not isinstance(request, ModPythonRequest):
return None
if not hasattr(request, '_req'):
return None
if not hasattr(request, 'user') or not request.user.is_authenticated():
return None
request._req.user = request.user.username
return None
|
More like this
- Log username in Apache access logs by arthur 3 years, 3 months ago
- Simple solution for model schema evolution / database changelog by kahless 6 years ago
- Custom mod_python AuthenHandler by aeby 5 years, 10 months ago
- MODPYTHON Sample Site Logging by adroffner 4 years, 10 months ago
- Logging and statistic middleware by feuervogel 5 years, 4 months ago
Comments