Flask-HAL
Flask-HAL copied to clipboard
Add __str__ method to Document class
It is helpful when passing object to logger utilities.
We are using this library and it saves us a lot of time. However when Document objects are passed into logger calls to_dict needs to be called so it provides some information about the object.
With this change you can do:
logger.debug('My document is %s', Document({'foo': 'bar}))