-
Couldn't load subscription status.
- Fork 145
Fix: Add compatibility for django-csp 4.x in CSP update decorator #416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: Add compatibility for django-csp 4.x in CSP update decorator #416
Conversation
@jcrtexidor I did not see your PR, I made something very similar in #417 .
I'm happy if either of the PRs are merged.
Let me know.
Also, the Readme mentions making PRs against the dev branch. Yet that branch has not been updated for more than 2 years...
@gabriels1234 could you please merge @jcrtexidor commints into your branch and fix the conflicts, to have him in our officialc contributors in the next release?
I would therefore merge your last PR
I should align dev branch with the master one. Thank you for having raised this
f1f8df6
into
IdentityPython:master
This PR updates
_django_csp_update_decoratorto support both legacy (<4.0) and modern (>=4.0)versions of
django-csp, addressing the breaking change in decorator arguments.The version is checked dynamically using
importlib.metadata.version.