google/sqlcommenter

Support extra generic key/values in django middleware

thomas-riccardi opened this issue · 0 comments

It would be great to be able to add extra/custom/generic key/value in the django middleware.

The usage could be something like that:

SQLCOMMENTER_WITH_EXTRA_VALUES = 'my.get_extra_values'
# or
SQLCOMMENTER_WITH_EXTRA_VALUES = my.get_extra_values

def get_extra_values(request):
    # ... using `request`
    return {'my_custom_key': 'my_custom_value'}

I'm willing to work on a PR if the idea is accepted.