django-after-response
django-after-response copied to clipboard
Logger Problem
I don't know how exactly this error occurs, but in my case i get the following error:
No handlers could be found for logger "after_response.signals"
More disturbing however is the fact that the database update I placed within the decorated function doesn't happen either. I understand the function isn't getting executed but I have no idea why. Any idea why this is happening?
I'm running django version 1.11.13 on Python 2.7.
The following code will print out any error messages. In my case I attached @after_response.enable to an object method so had to repass the object (for self) in ie obj.method.after_response(obj, 'First arg')
import after_response
import logging
logging.getLogger('after_response.signals').addHandler(logging.StreamHandler());