summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Roelli <charles@adnoto.net>2025-09-24 12:35:01 +0200
committerSharlatan Hellseher <sharlatanus@gmail.com>2025-10-11 21:29:50 +0100
commit899296bfa2aab981ebe0ff388c74fb7ebb32038c (patch)
tree402c3a88afda97cd69f28166cbdf2fb6c72f68b7
parent4719edfff79a3b5c87583cd0dc6e7c7d0153f74a (diff)
gnu: Add python-django-csp.
* gnu/packages/django.scm (python-django-csp): New variable. Change-Id: I8b93daa9ca3a0840f736145d374d8275f1a6ae37 Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
-rw-r--r--gnu/packages/django.scm31
1 files changed, 31 insertions, 0 deletions
diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm
index 5bc9bd85ce..25c3a2fc28 100644
--- a/gnu/packages/django.scm
+++ b/gnu/packages/django.scm
@@ -744,6 +744,37 @@ registration, account management as well as 3rd party (social)
account authentication.")
(license license:expat)))
+(define-public python-django-csp
+ (package
+ (name "python-django-csp")
+ (version "4.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "django_csp" version))
+ (sha256
+ (base32 "0cr8f4lbv8y32gfgnw4b6cnvi8k15ggpi49jmlyhmciff2xi0w5j"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'check 'fix-tests
+ (lambda _
+ (substitute* "pyproject.toml"
+ (("--ruff --ruff-format") ""))
+ (setenv "PYTHONPATH" "."))))))
+ (propagated-inputs (list python-django python-packaging))
+ (native-inputs (list python-jinja2
+ python-pytest
+ python-pytest-django
+ python-setuptools))
+ (home-page "https://django-csp.readthedocs.io/en/latest/")
+ (synopsis "Django Content Security Policy support.")
+ (description "This package adds support for Content-Security-Policy headers
+to Django.")
+ (license license:bsd-3)))
+
(define-public python-django-debug-toolbar
(package
(name "python-django-debug-toolbar")