1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
3 ;;; Copyright © 2016, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
4 ;;; Copyright © 2017 Nikita <nikita@n0.is>
5 ;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
6 ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
7 ;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
8 ;;; Copyright © 2019 Sam <smbaines8@gmail.com>
9 ;;; Copyright © 2020, 2021 Marius Bakke <marius@gnu.org>
10 ;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
12 ;;; This file is part of GNU Guix.
14 ;;; GNU Guix is free software; you can redistribute it and/or modify it
15 ;;; under the terms of the GNU General Public License as published by
16 ;;; the Free Software Foundation; either version 3 of the License, or (at
17 ;;; your option) any later version.
19 ;;; GNU Guix is distributed in the hope that it will be useful, but
20 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
21 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 ;;; GNU General Public License for more details.
24 ;;; You should have received a copy of the GNU General Public License
25 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
27 (define-module (gnu packages django)
28 #:use-module ((guix licenses) #:prefix license:)
29 #:use-module (guix packages)
30 #:use-module (guix download)
31 #:use-module (guix git-download)
32 #:use-module (guix build-system python)
33 #:use-module (gnu packages)
34 #:use-module (gnu packages base)
35 #:use-module (gnu packages databases)
36 #:use-module (gnu packages check)
37 #:use-module (gnu packages finance)
38 #:use-module (gnu packages geo)
39 #:use-module (gnu packages openldap)
40 #:use-module (gnu packages python)
41 #:use-module (gnu packages python-compression)
42 #:use-module (gnu packages python-crypto)
43 #:use-module (gnu packages python-web)
44 #:use-module (gnu packages python-xyz)
45 #:use-module (gnu packages sphinx)
46 #:use-module (gnu packages time)
47 #:use-module (gnu packages xml))
49 (define-public python-django
51 (name "python-django")
55 (uri (pypi-uri "Django" version))
58 "08p0gf1n548fjba76wspcj1jb3li6lr7xi87w2xq7hylr528azzj"))))
59 (build-system python-build-system)
62 (modify-phases %standard-phases
63 (add-before 'check 'pre-check
64 (lambda* (#:key inputs #:allow-other-keys)
65 ;; The test-suite tests timezone-dependent functions, thus tzdata
66 ;; needs to be available.
68 (search-input-directory inputs "share/zoneinfo"))
70 ;; Disable test for incorrect timezone: it only raises the
71 ;; expected error when /usr/share/zoneinfo exists, even though
72 ;; the machinery gracefully falls back to TZDIR. According to
73 ;; django/conf/__init__.py, lack of /usr/share/zoneinfo is
74 ;; harmless, so just ignore this test.
75 (substitute* "tests/settings_tests/tests.py"
76 ((".*def test_incorrect_timezone.*" all)
77 (string-append " @unittest.skipIf(True, 'Disabled by Guix')\n"
80 (lambda* (#:key tests? #:allow-other-keys)
82 (with-directory-excursion "tests"
83 ;; Tests expect PYTHONPATH to contain the root directory.
84 (setenv "PYTHONPATH" "..")
85 (invoke "python" "runtests.py"
86 ;; By default tests run in parallel, which may cause
87 ;; various race conditions. Run sequentially for
88 ;; consistent results.
90 (format #t "test suite not run~%"))))
91 ;; XXX: The 'wrap' phase adds native inputs as runtime dependencies,
92 ;; see <https://bugs.gnu.org/25235>. The django-admin script typically
93 ;; runs in an environment that has Django and its dependencies on
94 ;; PYTHONPATH, so just disable the wrapper to reduce the size from
95 ;; ~710 MiB to ~203 MiB.
97 ;; TODO: Install extras/django_bash_completion.
99 `(("tzdata" ,tzdata-for-tests)
100 ;; Remaining packages are test requirements taken from
101 ;; tests/requirements/py3.txt
102 ("python-docutils" ,python-docutils)
103 ;; optional for tests: ("python-geoip2" ,python-geoip2)
104 ;; optional for tests: ("python-memcached" ,python-memcached)
105 ("python-numpy" ,python-numpy)
106 ("python-pillow" ,python-pillow)
107 ("python-pyyaml" ,python-pyyaml)
108 ;; optional for tests: ("python-selenium" ,python-selenium)
109 ("python-tblib" ,python-tblib)))
111 `(("python-asgiref" ,python-asgiref)
112 ("python-pytz" ,python-pytz)
113 ("python-sqlparse" ,python-sqlparse)
115 ;; Optional dependencies.
116 ("python-argon2-cffi" ,python-argon2-cffi)
117 ("python-bcrypt" ,python-bcrypt)
119 ;; This input is not strictly required, but in practice many Django
120 ;; libraries need it for test suites and similar.
121 ("python-jinja2" ,python-jinja2)))
122 (home-page "https://www.djangoproject.com/")
123 (synopsis "High-level Python Web framework")
125 "Django is a high-level Python Web framework that encourages rapid
126 development and clean, pragmatic design. It provides many tools for building
127 any Web site. Django focuses on automating as much as possible and adhering
128 to the @dfn{don't repeat yourself} (DRY) principle.")
129 (license license:bsd-3)
130 (properties `((cpe-name . "django")))))
132 (define-public python-django-2.2
134 (inherit python-django)
138 (uri (pypi-uri "Django" version))
141 "1dvx3x85lggm91x7mpvaf9nmpxyz7r97pbpnmr2k1qfy0c7gyf9k"))))
143 `(;; XXX: In 2.2 and 3.0, selenium is required for the test suite.
144 ("python-selenium" ,python-selenium)
145 ,@(package-native-inputs python-django)))))
147 (define-public python-django-extensions
149 (name "python-django-extensions")
154 ;; Fetch from the git repository, so that the tests can be run.
156 (url "https://github.com/django-extensions/django-extensions")
158 (file-name (string-append name "-" version))
161 "0sra6hazqvspxd1pnx5cj7gia1rkaz3hn06ib4wd0frc167f5afy"))))
162 (build-system python-build-system)
164 '(#:tests? #f)) ;XXX: requires a Postgres or MySQL database
166 `(("python-six" ,python-six)
167 ("python-vobject" ,python-vobject)
168 ("python-werkzeug" ,python-werkzeug)
169 ("python-dateutil" ,python-dateutil)))
171 `(("python-django" ,python-django)
172 ("python-mock" ,python-mock)
173 ("python-factory-boy" ,python-factory-boy)
174 ("python-tox" ,python-tox)
175 ("python-pytest" ,python-pytest)
176 ("python-pytest-cov" ,python-pytest-cov)
177 ("python-pytest-django" ,python-pytest-django)
178 ("python-shortuuid" , python-shortuuid)))
180 "https://github.com/django-extensions/django-extensions")
181 (synopsis "Custom management extensions for Django")
183 "Django-extensions extends Django providing, for example, management
184 commands, additional database fields and admin extensions.")
185 (license license:expat)))
187 (define-public python-django-localflavor
189 (name "python-django-localflavor")
194 (uri (pypi-uri "django-localflavor" version))
196 (base32 "0i1s0ijfd9rv2cp5x174jcyjpwn7fyg7s1wpbvlwm96bpdvs6bxc"))))
197 (build-system python-build-system)
200 (modify-phases %standard-phases
202 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
204 (add-installed-pythonpath inputs outputs)
207 (getenv "PYTHONPATH")))
208 (invoke "invoke" "test")))))))
210 `(("python-coverage" ,python-coverage)
211 ("python-invoke" ,python-invoke)
212 ("python-pytest-django" ,python-pytest-django)
215 `(("python-django" ,python-django)
216 ("python-stdnum" ,python-stdnum)))
217 (home-page "https://django-localflavor.readthedocs.io/en/latest/")
218 (synopsis "Country-specific Django helpers")
219 (description "Django-LocalFlavor is a collection of assorted pieces of code
220 that are useful for particular countries or cultures.")
221 (license license:bsd-3)))
223 (define-public python-django-simple-math-captcha
225 (name "python-django-simple-math-captcha")
227 (home-page "https://github.com/alsoicode/django-simple-math-captcha")
232 (commit (string-append "v" version))))
233 (file-name (git-file-name name version))
236 "0fhy9k8haqa1296v0qpg1b5w7y3pyw9qi9z9laj5ijry1gk35qaw"))))
237 (build-system python-build-system)
239 '(#:phases (modify-phases %standard-phases
240 (add-after 'unpack 'patch-six-imports
242 ;; Django no longer bundles six, adjust the imports
243 ;; accordingly. The six dependency can likely be
244 ;; removed in the next version.
245 (substitute* (find-files "." "\\.py$")
246 (("from django\\.utils import six")
251 (invoke "python" "runtests.py"))))))
253 `(("python-django" ,python-django)
254 ("python-mock" ,python-mock)))
256 `(("python-six" ,python-six)))
257 (synopsis "Easy-to-use math field/widget captcha for Django forms")
259 "A multi-value-field that presents a human answerable question,
260 with no settings.py configuration necessary, but instead can be configured
261 with arguments to the field constructor.")
262 (license license:asl2.0)))
264 (define-public python-django-classy-tags
266 (name "python-django-classy-tags")
271 (uri (pypi-uri "django-classy-tags" version))
274 "1javam3zqi3y3j0r490mm61v48yh75jaha99gb7lsxkaz6yri7fm"))))
275 (build-system python-build-system)
276 ;; FIXME: How to make the test templates available to Django?
277 (arguments '(#:tests? #f))
278 (home-page "https://github.com/divio/django-classy-tags")
279 (synopsis "Class based template tags for Django")
281 "@code{django-classy-tags} is an approach at making writing template tags
282 in Django easier, shorter and more fun. It provides an extensible argument
283 parser which reduces most of the boiler plate code you usually have to write
284 when coding custom template tags.")
285 (license license:bsd-3)))
287 (define-public python-django-taggit
289 (name "python-django-taggit")
294 (uri (pypi-uri "django-taggit" version))
297 "0bbkabbs77z229ps0800gxfhf75yagp4x4j5jzfysbac3zvkp0sa"))))
298 (build-system python-build-system)
301 (modify-phases %standard-phases
304 (invoke "python3" "-m" "django" "test" "--settings=tests.settings"))))))
306 `(("python-isort" ,python-isort)))
308 `(("python-django" ,python-django)
309 ("python-pytest" ,python-pytest)
310 ("python-mock" ,python-mock)))
312 "https://github.com/jazzband/django-taggit")
314 "Reusable Django application for simple tagging")
316 "Django-taggit is a reusable Django application for simple tagging.")
317 (license license:bsd-3)))
319 (define-public python-easy-thumbnails
321 (name "python-easy-thumbnails")
326 (uri (pypi-uri "easy-thumbnails" version))
329 "14gzp5cv24z0qhxb7f7k7v9jgzpaj4n8yhjq83ynpx8183fs1rz4"))))
330 (build-system python-build-system)
332 `(("python-django" ,python-django)))
334 `(("python-pillow" ,python-pillow)))
335 (home-page "https://github.com/SmileyChris/easy-thumbnails")
336 (synopsis "Easy thumbnails for Django")
338 "Easy thumbnails is a Django plugin to dynamically create thumbnails
339 based on source images. Multiple thumbnails can be created from a single
340 source image, using different options to control parameters like the image
342 (license license:bsd-3)))
344 (define-public python-pytest-django
346 (name "python-pytest-django")
350 (uri (pypi-uri "pytest-django" version))
353 "0mglnz0w6k7dgw1jn6giv56pmdjd6a3zwwkhxb2kyzmzk0viw5xm"))))
354 (build-system python-build-system)
356 ;; The test suite is disabled because there are many test failures (see:
357 ;; https://github.com/pytest-dev/pytest-django/issues/943).
360 (modify-phases %standard-phases
362 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
365 (setenv "PYTEST_DJANGO_TEST_RUNNER" "pytest")
366 (setenv "DJANGO_SETTINGS_MODULE"
367 "pytest_django_test.settings_sqlite_file")
368 (invoke "python" "-m" "pytest" "-vv" "-k"
369 ;; FIXME: these tests fail to locate Django templates ...
370 (string-append "not test_django_not_loaded_without_settings"
371 " and not test_settings"
372 ;; ... and this does not discover
373 ;; 'pytest_django_test'.
374 " and not test_urls_cache_is_cleared")))
375 (format #t "test suite not run~%")))))))
377 `(("python-django" ,python-django)
378 ("python-setuptools-scm" ,python-setuptools-scm)
380 ("python-pytest-xdist" ,python-pytest-xdist-next)))
382 `(("python-pytest" ,python-pytest)))
383 (home-page "https://pytest-django.readthedocs.org/")
384 (synopsis "Django plugin for py.test")
385 (description "Pytest-django is a plugin for py.test that provides a set of
386 useful tools for testing Django applications and projects.")
387 (license license:bsd-3)))
389 (define-public python-django-haystack
391 (name "python-django-haystack")
396 (uri (pypi-uri "django-haystack" version))
399 "1302fqsrx8w474xk5cmnmg3hjqfprlxnjg9qlg86arsr4v4vqm4b"))))
400 (build-system python-build-system)
403 (modify-phases %standard-phases
404 (add-after 'unpack 'loosen-verion-restrictions
406 (substitute* "setup.py"
407 (("geopy.*") "geopy',\n"))
409 (add-before 'check 'set-gdal-lib-path
410 (lambda* (#:key inputs #:allow-other-keys)
411 (setenv "GDAL_LIBRARY_PATH"
412 (string-append (assoc-ref inputs "gdal")
415 #:tests? #f)) ; OSError: libgdal.so.27: cannot open shared object file
418 ("python-coverage" ,python-coverage)
419 ("python-django" ,python-django)
420 ("python-dateutil" ,python-dateutil)
421 ("python-geopy" ,python-geopy)
422 ("python-mock" ,python-mock)
423 ("python-nose" ,python-nose)
424 ("python-requests" ,python-requests)
425 ("python-setuptools-scm" ,python-setuptools-scm)
426 ("python-pysolr" ,python-pysolr)
427 ("python-whoosh" ,python-whoosh)))
428 (home-page "http://haystacksearch.org/")
429 (synopsis "Pluggable search for Django")
430 (description "Haystack provides modular search for Django. It features a
431 unified, familiar API that allows you to plug in different search backends
432 (such as Solr, Elasticsearch, Whoosh, Xapian, etc.) without having to modify
434 (license license:bsd-3)))
436 (define-public python-django-filter
438 (name "python-django-filter")
442 (uri (pypi-uri "django-filter" version))
445 "1bz5qzdk9pk4a2lp2yacrdnqmkv24vxnz4k3lykrnpc3b7bkvrhi"))))
446 (build-system python-build-system)
449 (modify-phases %standard-phases
452 (invoke "python" "runtests.py"))))))
454 `(("python-django" ,python-django)
455 ("python-djangorestframework" ,python-djangorestframework)
456 ("python-django-crispy-forms" ,python-django-crispy-forms)
457 ("python-mock" ,python-mock)))
458 (home-page "https://django-filter.readthedocs.io/en/latest/")
459 (synopsis "Reusable Django application to filter querysets dynamically")
461 "Django-filter is a generic, reusable application to alleviate writing
462 some of the more mundane bits of view code. Specifically, it allows users to
463 filter down a queryset based on a model’s fields, displaying the form to let
465 (license license:bsd-3)))
467 (define-public python-django-allauth
469 (name "python-django-allauth")
474 (uri (pypi-uri "django-allauth" version))
477 "0c0x8izvrnjhrr48w6pwsfk9ddbi6yfxg7v3hh5dm1vz1d0hjwpi"))))
478 (build-system python-build-system)
481 (modify-phases %standard-phases
484 (setenv "DJANGO_SETTINGS_MODULE" "test_settings")
485 (invoke "django-admin" "test" "allauth.tests"
486 "--pythonpath=."))))))
488 `(("python-openid" ,python-openid)
489 ("python-requests" ,python-requests)
490 ("python-requests-oauthlib" ,python-requests-oauthlib)))
492 `(("python-django" ,python-django)
493 ("python-mock" ,python-mock)))
494 (home-page "https://github.com/pennersr/django-allauth")
495 (synopsis "Set of Django applications addressing authentication")
497 "Integrated set of Django applications addressing authentication,
498 registration, account management as well as 3rd party (social)
499 account authentication.")
500 (license license:expat)))
502 (define-public python-django-debug-toolbar
504 (name "python-django-debug-toolbar")
510 (url "https://github.com/jazzband/django-debug-toolbar")
512 (file-name (git-file-name name version))
515 "1m1j2sx7q0blma0miswj3c8hrfi5q4y5cq2b816v8gagy89xgc57"))))
516 (build-system python-build-system)
518 `(("python-sqlparse" ,python-sqlparse)))
520 `(("python-django" ,python-django)
521 ("python-django-jinja" ,python-django-jinja)
522 ("python-html5lib" ,python-html5lib)))
525 (modify-phases %standard-phases
528 (invoke "make" "test"))))))
530 "https://github.com/jazzband/django-debug-toolbar")
531 (synopsis "Toolbar to help with developing Django applications")
533 "A configurable set of panels that display information about the current
534 request and response as a toolbar on the rendered page.")
535 (license license:bsd-3)))
537 (define-public python-django-debug-toolbar-alchemy
539 (name "python-django-debug-toolbar-alchemy")
541 (home-page "https://github.com/miki725/django-debug-toolbar-alchemy")
544 (uri (pypi-uri "django-debug-toolbar-alchemy" version))
547 "1kmpzghnsc247bc1dl22s4y62k9ijgy1pjms227018h5a4frsa5b"))))
548 (build-system python-build-system)
549 (arguments '(#:tests? #f)) ;XXX: 'make check' does "echo TODO"
551 `(("python-django-debug-toolbar" ,python-django-debug-toolbar)
552 ("python-jsonplus" ,python-jsonplus)
553 ("python-six" ,python-six)
554 ("python-sqlalchemy" ,python-sqlalchemy)))
555 (synopsis "Django Debug Toolbar panel for SQLAlchemy")
557 "This package completely mimics the default Django Debug Toolbar SQL
558 panel (internally it is actually subclassed), but instead of displaying
559 queries done via the Django ORM, SQLAlchemy generated queries are displayed.")
560 (license license:expat)))
562 (define-public python-django-gravatar2
564 (name "python-django-gravatar2")
569 (uri (pypi-uri "django-gravatar2" version))
572 "1vn921fb6jjx7rf5dzhy66rkb71nwmh9ydd0xs9ys72icw4jh4y8"))))
573 (build-system python-build-system)
575 '(;; TODO: The django project for the tests is missing from the release.
578 `(("python-django" ,python-django)))
579 (home-page "https://github.com/twaddington/django-gravatar")
580 (synopsis "Gravatar support for Django, improved version")
582 "Essential Gravatar support for Django. Features helper methods,
583 templatetags and a full test suite.")
584 (license license:expat)))
586 (define-public python-django-assets
588 (name "python-django-assets")
592 (uri (pypi-uri "django-assets" version))
595 "0fc6i77faxxv1gjlp06lv3kw64b5bhdiypaygfxh5djddgk83fwa"))))
596 (build-system python-build-system)
598 `(("python-django" ,python-django)
599 ("python-nose" ,python-nose)))
601 `(("python-webassets" ,python-webassets)))
602 (home-page "https://github.com/miracle2k/django-assets")
603 (synopsis "Asset management for Django")
605 "Asset management for Django, to compress and merge CSS and Javascript
606 files. Integrates the webassets library with Django, adding support for
607 merging, minifying and compiling CSS and Javascript files.")
608 (license license:bsd-2)))
610 (define-public python-django-jinja
612 (name "python-django-jinja")
618 (url "https://github.com/niwinz/django-jinja")
620 (file-name (git-file-name name version))
623 "06ldbkfkm6sc0p9sqpjph06gxrqpj78ih3dc2yik2fcba2y5mak1"))))
624 (build-system python-build-system)
626 `(("python-jinja2" ,python-jinja2)
627 ("python-pytz" ,python-pytz)
628 ("python-django-pipeline" ,python-django-pipeline)))
630 '(;; TODO Tests currently fail due to issues with the configuration for
634 (modify-phases %standard-phases
636 (lambda* (#:key tests? #:allow-other-keys)
639 (with-directory-excursion "testing"
640 (invoke "python" "runtests.py"))))))))
642 "https://niwinz.github.io/django-jinja/latest/")
643 (synopsis "Simple jinja2 templating backend for Django")
645 "This package provides a templating backend for Django, using Jinja2. It
646 provides certain advantages over the builtin Jinja2 backend in Django, for
647 example, explicit calls to callables from templates and better performance.")
648 (license license:bsd-3)))
650 ;; JSONField is now built-in to Django, obsoleting this package.
651 (define-public python-django-jsonfield
652 (deprecated-package "python-django-jsonfield" python-django))
654 (define-public python-dj-database-url
656 (name "python-dj-database-url")
660 (uri (pypi-uri "dj-database-url" version))
663 "0qs16g5y3lflxibsl8gwkwap21crhmmv98l60rdq6x1wawgypsja"))))
664 (build-system python-build-system)
665 (home-page "https://github.com/kennethreitz/dj-database-url")
666 (synopsis "Use Database URLs in your Django Application")
668 "This simple Django utility allows you to utilize the 12factor inspired
669 DATABASE_URL environment variable to configure your Django application.
671 The dj_database_url.config method returns a Django database connection
672 dictionary, populated with all the data specified in your URL. There is also a
673 conn_max_age argument to easily enable Django’s connection pool.")
674 (license license:bsd-2)))
676 (define-public python-django-picklefield
678 (name "python-django-picklefield")
680 (home-page "https://github.com/gintas/django-picklefield")
681 ;; Use a git checkout because the PyPI release lacks tests.
687 (commit (string-append "v" version))))
688 (file-name (git-file-name name version))
691 "0ni7bc86k0ra4pc8zv451pzlpkhs1nyil1sq9jdb4m2mib87b5fk"))))
692 (build-system python-build-system)
694 '(#:phases (modify-phases %standard-phases
697 (invoke "python" "-m" "django" "test" "-v2"
698 "--settings=tests.settings"))))))
700 ;; XXX: Picklefield has not been updated in 10+ years and fails tests
702 `(("python-django@2.2" ,python-django-2.2)))
703 (synopsis "Pickled object field for Django")
704 (description "Pickled object field for Django")
705 (license license:expat)))
707 (define-public python-django-bulk-update
709 (name "python-django-bulk-update")
713 (uri (pypi-uri "django-bulk-update" version))
716 "0dxkmrm3skyw82i0qa8vklxw1ma1y308kh9w2hcnvhpacn5cxdss"))))
717 (build-system python-build-system)
719 ;; XXX: Tests require a Postgres database.
721 (home-page "https://github.com/aykut/django-bulk-update")
722 (synopsis "Simple bulk update over Django ORM or with helper function")
724 "Simple bulk update over Django ORM or with helper function. This
725 project aims to bulk update given objects using one query over Django ORM.")
726 (license license:expat)))
728 (define-public python-django-contact-form
730 (name "python-django-contact-form")
734 (uri (pypi-uri "django-contact-form" version))
737 "1zv7bcjfrg32gcsq3bclkld79l6mcy2wcvlj81h7q2ppv1wm8vqs"))))
738 (build-system python-build-system)
741 (modify-phases %standard-phases
744 (invoke "coverage" "run" "--source" "contact_form"
747 `(("python-coverage" ,python-coverage)
748 ("python-django" ,python-django)))
749 (home-page "https://github.com/ubernostrum/django-contact-form")
750 (synopsis "Contact form for Django")
752 "This application provides simple, extensible contact-form functionality
754 (license license:bsd-3)))
756 (define-public python-django-contrib-comments
758 (name "python-django-contrib-comments")
762 (uri (pypi-uri "django-contrib-comments" version))
765 "0ccdiv784a5vnpfal36km4dyg12340rwhpr0riyy0k89wfnjn8yi"))))
766 (build-system python-build-system)
768 `(("python-django" ,python-django)))
770 `(("python-six" ,python-six)))
771 (home-page "https://github.com/django/django-contrib-comments")
772 (synopsis "Comments framework")
774 "Django used to include a comments framework; since Django 1.6 it's been
775 separated to a separate project. This is that project. This framework can be
776 used to attach comments to any model, so you can use it for comments on blog
777 entries, photos, book chapters, or anything else.")
778 (license license:bsd-3)))
780 (define-public python-django-pipeline
782 (name "python-django-pipeline")
787 (uri (pypi-uri "django-pipeline" version))
790 "19vrbd5s12qw4qlg5n8ldv7zz2rs5y2sdid1i7lvgp92m71dayvc"))))
791 (build-system python-build-system)
794 (modify-phases %standard-phases
795 (add-after 'unpack 'patch-source
797 (substitute* "tests/tests/test_compiler.py"
798 (("\\/usr\\/bin\\/env")
801 (lambda*(#:key tests? #:allow-other-keys)
803 (setenv "DJANGO_SETTINGS_MODULE" "tests.settings")
804 (invoke "django-admin" "test" "tests")))))))
806 `(("python-django" ,python-django)))
808 `(("python-css-html-js-minify" ,python-css-html-js-minify)
809 ("python-slimit" ,python-slimit)
810 ("python-jsmin" ,python-jsmin)))
812 "https://github.com/jazzband/django-pipeline")
813 (synopsis "Asset packaging library for Django")
815 "Pipeline is an asset packaging library for Django, providing both CSS
816 and JavaScript concatenation and compression, built-in JavaScript template
817 support, and optional data-URI image and font embedding.")
818 (license license:expat)))
820 (define-public python-django-redis
822 (name "python-django-redis")
826 (uri (pypi-uri "django-redis" version))
829 "0qvsm8yjchl0d3i7g20wba6px9lb5gv8kp3fcnr6hr0y0b3qjr9h"))))
830 (build-system python-build-system)
833 (modify-phases %standard-phases
836 (invoke "redis-server" "--daemonize" "yes")
837 (with-directory-excursion "tests"
838 (invoke "python" "runtests.py")))))))
840 `(("python-django" ,python-django)
841 ("python-fakeredis" ,python-fakeredis)
842 ("python-hiredis" ,python-hiredis)
843 ("python-mock" ,python-mock)
844 ("python-msgpack" ,python-msgpack)
847 `(("python-redis" ,python-redis)))
848 (home-page "https://github.com/niwibe/django-redis")
849 (synopsis "Full featured redis cache backend for Django")
851 "Full featured redis cache backend for Django.")
852 (license license:bsd-3)))
854 (define-public python-django-rq
856 (name "python-django-rq")
860 (uri (pypi-uri "django-rq" version))
863 "0lksnjn3q3f7y72bj2yr8870w28a5b6x0vjnd9nhpq2ah6xfz6pf"))))
864 (build-system python-build-system)
867 (modify-phases %standard-phases
870 (invoke "redis-server" "--daemonize" "yes")
871 (invoke "django-admin.py" "test" "django_rq"
872 "--settings=django_rq.tests.settings"
873 "--pythonpath=."))))))
875 `(("python-django" ,python-django)
876 ("python-django-redis" ,python-django-redis)
877 ("python-mock" ,python-mock)
878 ("python-rq-scheduler" ,python-rq-scheduler)
881 `(("python-rq" ,python-rq)))
882 (home-page "https://github.com/ui/django-rq")
883 (synopsis "Django integration with RQ")
885 "Django integration with RQ, a Redis based Python queuing library.
886 Django-RQ is a simple app that allows you to configure your queues in django's
887 settings.py and easily use them in your project.")
888 (license license:expat)))
890 (define-public python-django-q
892 (name "python-django-q")
897 (uri (pypi-uri "django-q" version))
899 (base32 "03z1pf6wlf47i7afr79a8fiiidfk1vq19yaqnv0m4qdny7f58gaj"))))
900 (build-system python-build-system)
901 ;; FIXME: Tests require disque, Redis, MongoDB, Docker.
902 (arguments '(#:tests? #f))
904 `(("python-django" ,python-django)))
906 `(("python-arrow" ,python-arrow)
907 ("python-blessed" ,python-blessed)
908 ("python-django-picklefield" ,python-django-picklefield)))
909 (home-page "https://django-q.readthedocs.io/")
910 (synopsis "Multiprocessing distributed task queue for Django")
912 "Django Q is a native Django task queue, scheduler and worker application
913 using Python multiprocessing.")
914 (license license:expat)))
916 (define-public python-django-sortedm2m
918 (name "python-django-sortedm2m")
922 (uri (pypi-uri "django-sortedm2m" version))
925 "0z0yymmrr2l5cznqbzwziw624df0qsiflvbpqwrpan52nww3dk4a"))))
926 (build-system python-build-system)
928 `(#:phases (modify-phases %standard-phases
931 (invoke "python" "django-admin.py"
932 "test" "--settings=settings"))))))
934 `(("python-django" ,python-django)))
935 (home-page "https://github.com/jazzband/django-sortedm2m")
936 (synopsis "Drop-in replacement for django's own ManyToManyField")
938 "Sortedm2m is a drop-in replacement for django's own ManyToManyField.
939 The provided SortedManyToManyField behaves like the original one but remembers
940 the order of added relations.")
941 (license license:bsd-3)))
943 (define-public python-django-appconf
945 (name "python-django-appconf")
949 (uri (pypi-uri "django-appconf" version))
952 "101k8nkc7xlffpjdi2qbrp9pc4v8hzvmkzi12qp7vms39asxwn5y"))))
953 (build-system python-build-system)
955 '(#:phases (modify-phases %standard-phases
958 (setenv "DJANGO_SETTINGS_MODULE" "tests.test_settings")
959 (invoke "python" "django-admin.py" "test" "-v2"))))))
961 `(("python-django" ,python-django)))
962 (home-page "https://github.com/django-compressor/django-appconf")
963 (synopsis "Handle configuration defaults of packaged Django apps")
965 "This app precedes Django's own AppConfig classes that act as \"objects
966 [to] store metadata for an application\" inside Django's app loading mechanism.
967 In other words, they solve a related but different use case than
968 django-appconf and can't easily be used as a replacement. The similarity in
969 name is purely coincidental.")
970 (license license:bsd-3)))
972 (define-public python-django-statici18n
974 (name "python-django-statici18n")
976 (home-page "https://github.com/zyegfryed/django-statici18n")
981 (commit (string-append "v" version))))
982 (file-name (git-file-name name version))
985 "0x0xvfqd40is2ks43d65awgqkx3wk10lvdim15scvbjhkh301b6v"))))
986 (build-system python-build-system)
988 '(#:phases (modify-phases %standard-phases
991 (setenv "PYTHONPATH" "./tests/test_project")
992 (setenv "DJANGO_SETTINGS_MODULE" "project.settings")
993 (invoke "pytest" "-vv"))))))
995 `(("python-django" ,python-django)
996 ("python-pytest" ,python-pytest)
997 ("python-pytest-django" ,python-pytest-django)))
999 `(("django-appconf" ,python-django-appconf)))
1000 (synopsis "Generate JavaScript catalog to static files")
1002 "A Django app that provides helper for generating JavaScript catalog to
1004 (license license:bsd-3)))
1006 (define-public python-django-tagging
1008 (name "python-django-tagging")
1013 (uri (pypi-uri "django-tagging" version))
1016 "13afxx30chssclxzd9gqnvwm9qyrdpnlbs6iswdfa18phfj8zmi8"))))
1017 (build-system python-build-system)
1020 (modify-phases %standard-phases
1023 (setenv "DJANGO_SETTINGS_MODULE" "tagging.tests.settings")
1024 (invoke "django-admin" "test" "--pythonpath=."))))))
1026 `(("python-django" ,python-django)))
1027 (home-page "https://github.com/Fantomas42/django-tagging")
1028 (synopsis "Generic tagging application for Django")
1029 (description "This package provides a generic tagging application for
1030 Django projects, which allows association of a number of tags with any
1031 @code{Model} instance and makes retrieval of tags simple.")
1032 (license license:bsd-3)))
1034 (define-public python-djangorestframework
1036 (name "python-djangorestframework")
1042 (url "https://github.com/encode/django-rest-framework")
1044 (file-name (git-file-name name version))
1047 "16n17dw35wqv47m8k8fixn0yywrvd6v4r573yr4nx6lbbiyi2cqn"))))
1048 (build-system python-build-system)
1051 (modify-phases %standard-phases
1053 (lambda* (#:key tests? #:allow-other-keys)
1054 ;; Add a fix from the master branch for compatibility with Django
1055 ;; 3.2: https://github.com/encode/django-rest-framework/pull/7911
1056 ;; Remove for versions > 3.12.4.
1057 (substitute* "tests/test_fields.py"
1058 (("class MockTimezone:")
1059 "class MockTimezone(pytz.BaseTzInfo):"))
1061 (invoke "python" "runtests.py" "--nolint")
1062 (format #t "test suite not run~%")))))))
1064 `(("python-django" ,python-django)
1065 ("python-pytest" ,python-pytest)
1066 ("python-pytest-django" ,python-pytest-django)))
1067 (home-page "https://www.django-rest-framework.org")
1068 (synopsis "Toolkit for building Web APIs with Django")
1070 "The Django REST framework is for building Web APIs with Django. It
1071 provides features like a Web-browsable API and authentication policies.")
1072 (license license:bsd-2)))
1074 (define-public python-django-sekizai
1076 (name "python-django-sekizai")
1081 (uri (pypi-uri "django-sekizai" version))
1084 "0vrkli625b5s1wldri3dyrfvqbxg7zxy2pg0rpjixw3b1ndz0ag8"))))
1085 (build-system python-build-system)
1086 (arguments '(#:tests? #f)) ; Tests not included with release.
1088 `(("python-django" ,python-django)))
1090 `(("python-django-classy-tags" ,python-django-classy-tags)
1091 ("python-six" ,python-six)))
1092 (home-page "https://github.com/divio/django-sekizai")
1093 (synopsis "Template blocks for Django projects")
1094 (description "Sekizai means blocks in Japanese, and that is what this app
1095 provides. A fresh look at blocks. With @code{django-sekizai} you can define
1096 placeholders where your blocks get rendered and at different places in your
1097 templates append to those blocks. This is especially useful for css and
1098 javascript. Your subtemplates can now define css and javscript files to be
1099 included, and the css will be nicely put at the top and the javascript to the
1100 bottom, just like you should. Also sekizai will ignore any duplicate content in
1102 (license license:bsd-3)))
1104 (define-public python-django-crispy-forms
1106 (name "python-django-crispy-forms")
1111 (uri (pypi-uri "django-crispy-forms" version))
1114 "0fxlf233f49hjax786p4r650rd0ilvhnpyvw8hv1d1aqnkxy1wgj"))))
1115 (build-system python-build-system)
1117 '(;; No included tests
1120 `(("python-django" ,python-django)))
1122 "http://github.com/maraujop/django-crispy-forms")
1123 (synopsis "Tool to control Django forms without custom templates")
1125 "@code{django-crispy-forms} lets you easily build, customize and reuse
1126 forms using your favorite CSS framework, without writing template code.")
1127 (license license:expat)))
1129 (define-public python-django-compressor
1131 (name "python-django-compressor")
1136 (uri (pypi-uri "django_compressor" version))
1138 (base32 "1q0m0hfg7sqmj5km924g4dgy3nx51aszzsprlp6gsin10mv0fn1k"))))
1139 (build-system python-build-system)
1142 (modify-phases %standard-phases
1144 (lambda* (#:key tests? #:allow-other-keys)
1147 (setenv "DJANGO_SETTINGS_MODULE" "compressor.test_settings")
1148 (invoke "django-admin" "test"
1151 ;; Tests fail with beautifulsoup 4.9+
1152 ;; https://github.com/django-compressor/django-compressor/issues/998
1155 `(("python-django-appconf" ,python-django-appconf)
1156 ("python-rcssmin" ,python-rcssmin)
1157 ("python-rjsmin" ,python-rjsmin)))
1159 `(("python-beautifulsoup4" ,python-beautifulsoup4)
1160 ("python-brotli" ,python-brotli)
1161 ("python-csscompressor" ,python-csscompressor)
1162 ("python-django-sekizai" ,python-django-sekizai)
1163 ("python-mock" ,python-mock)))
1164 (home-page "https://django-compressor.readthedocs.io/en/latest/")
1166 "Compress linked and inline JavaScript or CSS into single cached files")
1168 "Django Compressor combines and compresses linked and inline Javascript or
1169 CSS in a Django templates into cacheable static files by using the compress
1171 (license license:expat)))
1173 (define-public python-django-override-storage
1175 (name "python-django-override-storage")
1177 (home-page "https://github.com/danifus/django-override-storage")
1183 (commit (string-append "v" version))))
1184 (file-name (git-file-name name version))
1186 (base32 "081kzfk7mmybhihvc92d3hsdg0r2k20ydq88fs1fgd348sq1ax51"))))
1187 (build-system python-build-system)
1189 '(#:phases (modify-phases %standard-phases
1192 (invoke "python" "runtests.py"))))))
1194 `(("python-django" ,python-django)
1195 ("python-mock" ,python-mock)))
1196 (synopsis "Django test helpers to manage file storage side effects")
1198 "This project provides tools to help reduce the side effects of using
1199 FileFields during tests.")
1200 (license license:expat)))
1202 (define-public python-django-auth-ldap
1204 (name "python-django-auth-ldap")
1208 (uri (pypi-uri "django-auth-ldap" version))
1211 "0xk6cxiqz5j3q79bd54x64f26alrlc8p7k9wkp2c768w2k1vzz30"))))
1212 (build-system python-build-system)
1214 '(#:phases (modify-phases %standard-phases
1216 (lambda* (#:key inputs #:allow-other-keys)
1217 (let ((openldap (assoc-ref inputs "openldap")))
1218 ;; The tests need 'slapd' which is installed to the
1219 ;; libexec directory of OpenLDAP.
1220 (setenv "SLAPD" (string-append openldap "/libexec/slapd"))
1222 (string-append openldap "/etc/openldap/schema"))
1223 (invoke "python" "-m" "django" "test"
1224 "--settings" "tests.settings")))))))
1226 `(("openldap" ,openldap)
1227 ("python-django" ,python-django)
1228 ("python-mock" ,python-mock)))
1230 `(("python-ldap" ,python-ldap)))
1231 (home-page "https://github.com/django-auth-ldap/django-auth-ldap")
1232 (synopsis "Django LDAP authentication backend")
1234 "This package provides an LDAP authentication backend for Django.")
1235 (license license:bsd-2)))
1237 (define-public python-django-logging-json
1239 (name "python-django-logging-json")
1243 (uri (pypi-uri "django-logging-json" version))
1246 "06041a8icazzp73kg93c7k1ska12wvkq7fpcad0l0sm1qnxx5yx7"))))
1247 (build-system python-build-system)
1248 (arguments '(#:tests? #f)) ;no tests
1250 `(("python-django" ,python-django)))
1252 `(("python-certifi" ,python-certifi)
1253 ("python-elasticsearch" ,python-elasticsearch)
1254 ("python-six" ,python-six)))
1255 (home-page "https://github.com/cipriantarta/django-logging")
1256 (synopsis "Log requests/responses in various formats")
1258 "This package provides a Django library that logs request, response,
1259 and exception details in a JSON document. It can also send logs directly
1261 (license license:bsd-2)))
1263 (define-public python-django-netfields
1265 (name "python-django-netfields")
1269 (uri (pypi-uri "django-netfields" version))
1272 "1c47azr5am0q8g45x0fbn0cay7vyrack6n7k6siliw1j2p0gzi7s"))))
1273 (build-system python-build-system)
1274 (arguments '(#:tests? #f)) ;XXX: Requires a running PostgreSQL server
1276 `(("python-django" ,python-django)))
1278 `(("python-netaddr" ,python-netaddr)
1279 ("python-six" ,python-six)))
1280 (home-page "https://github.com/jimfunk/django-postgresql-netfields")
1281 (synopsis "PostgreSQL netfields implementation for Django")
1283 "This package provides mappings for the PostgreSQL @code{INET} and
1284 @code{CIDR} fields for use in Django projects.")
1285 (license license:bsd-3)))
1287 (define-public python-django-url-filter
1289 (name "python-django-url-filter")
1291 (home-page "https://github.com/miki725/django-url-filter")
1294 (uri (git-reference (url home-page) (commit version)))
1295 (file-name (git-file-name name version))
1298 "0r4zhqhs8y6cnplwyvcb0zpijizw1ifnszs38n4w8138657f9026"))))
1299 (build-system python-build-system)
1301 '(#:tests? #f ;FIXME: Django raises "Apps aren't loaded yet"!?
1302 #:phases (modify-phases %standard-phases
1303 (add-before 'check 'loosen-requirements
1305 ;; Do not depend on compatibility package for old
1307 (substitute* "requirements.txt"
1308 (("enum-compat") ""))))
1310 (lambda* (#:key tests? #:allow-other-keys)
1313 (setenv "DJANGO_SETTINGS_MODULE"
1314 "test_project.settings")
1315 (invoke "pytest" "-vv" "--doctest-modules"
1316 "tests/" "url_filter/"))
1317 (format #t "test suite not run~%")))))))
1319 `(("python-django" ,python-django)))
1321 `(("python-cached-property" ,python-cached-property)
1322 ("python-six" ,python-six)))
1323 (synopsis "Filter data via human-friendly URLs")
1325 "The main goal of Django URL Filter is to provide an easy URL interface
1326 for filtering data. It allows the user to safely filter by model attributes
1327 and also specify the lookup type for each filter (very much like
1328 Django's filtering system in ORM).")
1329 (license license:expat)))