summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2016-09-11 21:31:44 +0300
committerEfraim Flashner <efraim@flashner.co.il>2016-09-18 23:19:45 +0300
commit894810c7c951d054e4b456f9c03e315cda1bd765 (patch)
treef1aa208bd8a91e4e608bd59c9cf6ca2a0ee7c99b /gnu
parent23b563dcfdc269b51c4bb671d9ba226c8f70e6a3 (diff)
downloadguix-894810c7c951d054e4b456f9c03e315cda1bd765.tar.gz
gnu: Add python-django-filter.
* gnu/packages/django.scm (python-django-filter): New variable.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/django.scm29
1 files changed, 29 insertions, 0 deletions
diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm
index bd39314b00..923c4e2f2b 100644
--- a/gnu/packages/django.scm
+++ b/gnu/packages/django.scm
@@ -162,3 +162,32 @@ useful tools for testing Django applications and projects.")
       (native-inputs
        `(("python2-setuptools" ,python2-setuptools)
          ,@(package-native-inputs base))))))
+
+(define-public python-django-filter
+  (package
+    (name "python-django-filter")
+    (version "0.14.0")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "django-filter" version))
+              (sha256
+               (base32
+                "0f78hmk8c903zwfzlsiw7ivgag81ymmb5hi73rzxbhnlg2v0l3fx"))))
+    (build-system python-build-system)
+    (home-page "https://django-filter.readthedocs.io/en/latest/")
+    (synopsis "Reusable Django application to filter querysets dynamically")
+    (description
+     "Django-filter is a generic, reusable application to alleviate writing
+some of the more mundane bits of view code.  Specifically, it allows users to
+filter down a queryset based on a model’s fields, displaying the form to let
+them do this.")
+    (properties `((python2-variant . ,(delay python2-django-filter))))
+    (license license:bsd-3)))
+
+(define-public python2-django-filter
+  (let ((base (package-with-python2
+                (strip-python2-variant python-django-filter))))
+    (package (inherit base)
+      (native-inputs
+       `(("python2-setuptools" ,python2-setuptools)
+         ,@(package-native-inputs base))))))