Skip to content

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

Merged

Conversation

jcrtexidor
Copy link
Contributor

This PR updates _django_csp_update_decorator to 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.

@gabriels1234
Copy link
Contributor

@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...

@peppelinux
Copy link
Member

@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

@peppelinux peppelinux merged commit f1f8df6 into IdentityPython:master May 19, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants