summary refs log tree commit diff
diff options
context:
space:
mode:
authorJulien Lepiller <julien@lepiller.eu>2017-04-22 18:18:30 +0200
committerJulien Lepiller <julien@lepiller.eu>2017-05-11 21:57:51 +0200
commit6c17e963b0cd4095912a90b73b4bc19cb35f2bf2 (patch)
tree25c53fa5ccb5b8722d28282dc527b95742b56107
parent01c64cb83fa98d7d1c33100a4bff37884599f274 (diff)
downloadguix-6c17e963b0cd4095912a90b73b4bc19cb35f2bf2.tar.gz
gnu: Add python-django-jsonfield.
* gnu/packages/django.scm (python-django-jsonfield, python2-django-jsonfield):
New variables.
-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 dad777bdf7..3a4116ba81 100644
--- a/gnu/packages/django.scm
+++ b/gnu/packages/django.scm
@@ -291,3 +291,34 @@ merging, minifying and compiling CSS and Javascript files.")
 
 (define-public python2-django-assets
   (package-with-python2 python-django-assets))
+
+(define-public python-django-jsonfield
+  (package
+    (name "python-django-jsonfield")
+    (version "1.0.3")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "jsonfield" version))
+              (sha256
+               (base32
+                "19x4lak0hg9c20r7mvf27w7i8r6i4sg2g0ypmlmp2665fnk76zvy"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'fix-tests
+           (lambda _
+             (substitute* "jsonfield/tests.py"
+               (("django.forms.util") "django.forms.utils")))))))
+    (propagated-inputs
+     `(("python-django" ,python-django)))
+    (home-page "https://github.com/bradjasper/django-jsonfield")
+    (synopsis "Store validated JSON in your model")
+    (description
+      "Django-jsonfield is a reusable Django field that allows you to store
+validated JSON in your model.  It silently takes care of serialization.  To
+use, simply add the field to one of your models.")
+    (license license:expat)))
+
+(define-public python2-django-jsonfield
+  (package-with-python2 python-django-jsonfield))