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 compression)
36 #:use-module (gnu packages databases)
37 #:use-module (gnu packages check)
38 #:use-module (gnu packages finance)
39 #:use-module (gnu packages geo)
40 #:use-module (gnu packages openldap)
41 #:use-module (gnu packages python)
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)
170 ("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 "GUIX_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-mock" ,python-mock)))
255 `(("python-django" ,python-django)
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))
279 `(("python-django" ,python-django)))
280 (home-page "https://github.com/divio/django-classy-tags")
281 (synopsis "Class based template tags for Django")
283 "@code{django-classy-tags} is an approach at making writing template tags
284 in Django easier, shorter and more fun. It provides an extensible argument
285 parser which reduces most of the boiler plate code you usually have to write
286 when coding custom template tags.")
287 (license license:bsd-3)))
289 (define-public python-django-taggit
291 (name "python-django-taggit")
296 (uri (pypi-uri "django-taggit" version))
299 "0bbkabbs77z229ps0800gxfhf75yagp4x4j5jzfysbac3zvkp0sa"))))
300 (build-system python-build-system)
303 (modify-phases %standard-phases
306 (invoke "python3" "-m" "django" "test" "--settings=tests.settings"))))))
308 `(("python-django" ,python-django)
309 ("python-isort" ,python-isort)))
311 `(("python-pytest" ,python-pytest)
312 ("python-mock" ,python-mock)))
314 "https://github.com/jazzband/django-taggit")
316 "Reusable Django application for simple tagging")
318 "Django-taggit is a reusable Django application for simple tagging.")
319 (license license:bsd-3)))
321 (define-public python-easy-thumbnails
323 (name "python-easy-thumbnails")
328 (uri (pypi-uri "easy-thumbnails" version))
331 "14gzp5cv24z0qhxb7f7k7v9jgzpaj4n8yhjq83ynpx8183fs1rz4"))))
332 (build-system python-build-system)
334 `(("python-django" ,python-django)
335 ("python-pillow" ,python-pillow)))
336 (home-page "https://github.com/SmileyChris/easy-thumbnails")
337 (synopsis "Easy thumbnails for Django")
339 "Easy thumbnails is a Django plugin to dynamically create thumbnails
340 based on source images. Multiple thumbnails can be created from a single
341 source image, using different options to control parameters like the image
343 (license license:bsd-3)))
345 (define-public python-pytest-django
347 (name "python-pytest-django")
351 (uri (pypi-uri "pytest-django" version))
354 "0mglnz0w6k7dgw1jn6giv56pmdjd6a3zwwkhxb2kyzmzk0viw5xm"))))
355 (build-system python-build-system)
357 ;; The test suite is disabled because there are many test failures (see:
358 ;; https://github.com/pytest-dev/pytest-django/issues/943).
361 (modify-phases %standard-phases
363 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
366 (setenv "PYTEST_DJANGO_TEST_RUNNER" "pytest")
367 (setenv "DJANGO_SETTINGS_MODULE"
368 "pytest_django_test.settings_sqlite_file")
369 (invoke "python" "-m" "pytest" "-vv" "-k"
370 ;; FIXME: these tests fail to locate Django templates ...
371 (string-append "not test_django_not_loaded_without_settings"
372 " and not test_settings"
373 ;; ... and this does not discover
374 ;; 'pytest_django_test'.
375 " and not test_urls_cache_is_cleared")))
376 (format #t "test suite not run~%")))))))
378 `(("python-django" ,python-django)
379 ("python-setuptools-scm" ,python-setuptools-scm)
381 ("python-pytest-xdist" ,python-pytest-xdist-next)))
383 `(("python-pytest" ,python-pytest)))
384 (home-page "https://pytest-django.readthedocs.org/")
385 (synopsis "Django plugin for py.test")
386 (description "Pytest-django is a plugin for py.test that provides a set of
387 useful tools for testing Django applications and projects.")
388 (license license:bsd-3)))
390 (define-public python-django-haystack
392 (name "python-django-haystack")
397 (uri (pypi-uri "django-haystack" version))
400 "1302fqsrx8w474xk5cmnmg3hjqfprlxnjg9qlg86arsr4v4vqm4b"))))
401 (build-system python-build-system)
404 (modify-phases %standard-phases
405 (add-after 'unpack 'loosen-verion-restrictions
407 (substitute* "setup.py"
408 (("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")
414 ;; Importing this module requires setting up a Django project.
415 (delete 'sanity-check))
416 #:tests? #f)) ; OSError: libgdal.so.27: cannot open shared object file
418 `(("python-django" ,python-django)))
421 ("python-coverage" ,python-coverage)
422 ("python-dateutil" ,python-dateutil)
423 ("python-geopy" ,python-geopy)
424 ("python-mock" ,python-mock)
425 ("python-nose" ,python-nose)
426 ("python-requests" ,python-requests)
427 ("python-setuptools-scm" ,python-setuptools-scm)
428 ("python-pysolr" ,python-pysolr)
429 ("python-whoosh" ,python-whoosh)))
430 (home-page "http://haystacksearch.org/")
431 (synopsis "Pluggable search for Django")
432 (description "Haystack provides modular search for Django. It features a
433 unified, familiar API that allows you to plug in different search backends
434 (such as Solr, Elasticsearch, Whoosh, Xapian, etc.) without having to modify
436 (license license:bsd-3)))
438 (define-public python-django-filter
440 (name "python-django-filter")
444 (uri (pypi-uri "django-filter" version))
447 "1bz5qzdk9pk4a2lp2yacrdnqmkv24vxnz4k3lykrnpc3b7bkvrhi"))))
448 (build-system python-build-system)
451 (modify-phases %standard-phases
454 (invoke "python" "runtests.py"))))))
456 `(("python-django" ,python-django)
457 ("python-djangorestframework" ,python-djangorestframework)
458 ("python-django-crispy-forms" ,python-django-crispy-forms)
459 ("python-mock" ,python-mock)))
460 (home-page "https://django-filter.readthedocs.io/en/latest/")
461 (synopsis "Reusable Django application to filter querysets dynamically")
463 "Django-filter is a generic, reusable application to alleviate writing
464 some of the more mundane bits of view code. Specifically, it allows users to
465 filter down a queryset based on a model’s fields, displaying the form to let
467 (license license:bsd-3)))
469 (define-public python-django-allauth
471 (name "python-django-allauth")
476 (uri (pypi-uri "django-allauth" version))
479 "0c0x8izvrnjhrr48w6pwsfk9ddbi6yfxg7v3hh5dm1vz1d0hjwpi"))))
480 (build-system python-build-system)
483 (modify-phases %standard-phases
486 (setenv "DJANGO_SETTINGS_MODULE" "test_settings")
487 (invoke "django-admin" "test" "allauth.tests"
488 "--pythonpath=."))))))
490 `(("python-openid" ,python-openid)
491 ("python-requests" ,python-requests)
492 ("python-requests-oauthlib" ,python-requests-oauthlib)))
494 `(("python-mock" ,python-mock)))
496 `(("python-django" ,python-django)))
497 (home-page "https://github.com/pennersr/django-allauth")
498 (synopsis "Set of Django applications addressing authentication")
500 "Integrated set of Django applications addressing authentication,
501 registration, account management as well as 3rd party (social)
502 account authentication.")
503 (license license:expat)))
505 (define-public python-django-debug-toolbar
507 (name "python-django-debug-toolbar")
513 (url "https://github.com/jazzband/django-debug-toolbar")
515 (file-name (git-file-name name version))
518 "1m1j2sx7q0blma0miswj3c8hrfi5q4y5cq2b816v8gagy89xgc57"))))
519 (build-system python-build-system)
521 `(("python-sqlparse" ,python-sqlparse)
522 ("python-django" ,python-django)))
524 `(("python-django-jinja" ,python-django-jinja)
525 ("python-html5lib" ,python-html5lib)))
528 (modify-phases %standard-phases
531 (invoke "make" "test"))))))
533 "https://github.com/jazzband/django-debug-toolbar")
534 (synopsis "Toolbar to help with developing Django applications")
536 "A configurable set of panels that display information about the current
537 request and response as a toolbar on the rendered page.")
538 (license license:bsd-3)))
540 (define-public python-django-debug-toolbar-alchemy
542 (name "python-django-debug-toolbar-alchemy")
544 (home-page "https://github.com/miki725/django-debug-toolbar-alchemy")
547 (uri (pypi-uri "django-debug-toolbar-alchemy" version))
550 "1kmpzghnsc247bc1dl22s4y62k9ijgy1pjms227018h5a4frsa5b"))))
551 (build-system python-build-system)
552 (arguments '(#:tests? #f)) ;XXX: 'make check' does "echo TODO"
554 `(("python-django" ,python-django)
555 ("python-django-debug-toolbar" ,python-django-debug-toolbar)
556 ("python-jsonplus" ,python-jsonplus)
557 ("python-six" ,python-six)
558 ("python-sqlalchemy" ,python-sqlalchemy)))
559 (synopsis "Django Debug Toolbar panel for SQLAlchemy")
561 "This package completely mimics the default Django Debug Toolbar SQL
562 panel (internally it is actually subclassed), but instead of displaying
563 queries done via the Django ORM, SQLAlchemy generated queries are displayed.")
564 (license license:expat)))
566 (define-public python-django-gravatar2
568 (name "python-django-gravatar2")
573 (uri (pypi-uri "django-gravatar2" version))
576 "1vn921fb6jjx7rf5dzhy66rkb71nwmh9ydd0xs9ys72icw4jh4y8"))))
577 (build-system python-build-system)
579 '(;; TODO: The django project for the tests is missing from the release.
582 `(("python-django" ,python-django)))
583 (home-page "https://github.com/twaddington/django-gravatar")
584 (synopsis "Gravatar support for Django, improved version")
586 "Essential Gravatar support for Django. Features helper methods,
587 templatetags and a full test suite.")
588 (license license:expat)))
590 (define-public python-django-assets
592 (name "python-django-assets")
596 (uri (pypi-uri "django-assets" version))
599 "0fc6i77faxxv1gjlp06lv3kw64b5bhdiypaygfxh5djddgk83fwa"))))
600 (build-system python-build-system)
602 `(("python-nose" ,python-nose)))
604 `(("python-django" ,python-django)
605 ("python-webassets" ,python-webassets)))
606 (home-page "https://github.com/miracle2k/django-assets")
607 (synopsis "Asset management for Django")
609 "Asset management for Django, to compress and merge CSS and Javascript
610 files. Integrates the webassets library with Django, adding support for
611 merging, minifying and compiling CSS and Javascript files.")
612 (license license:bsd-2)))
614 (define-public python-django-jinja
616 (name "python-django-jinja")
622 (url "https://github.com/niwinz/django-jinja")
624 (file-name (git-file-name name version))
627 "0p9pkn6jjzagpnvcrl9c2vjqamkms7ymvyhhmaqqqhrlv89qnzp7"))))
628 (build-system python-build-system)
630 `(("python-django" ,python-django)
631 ("python-jinja2" ,python-jinja2)
632 ("python-pytz" ,python-pytz)
633 ("python-django-pipeline" ,python-django-pipeline)))
635 '(;; TODO Tests currently fail due to issues with the configuration for
639 (modify-phases %standard-phases
641 (lambda* (#:key tests? #:allow-other-keys)
644 (with-directory-excursion "testing"
645 (invoke "python" "runtests.py"))))))))
647 "https://niwinz.github.io/django-jinja/latest/")
648 (synopsis "Simple jinja2 templating backend for Django")
650 "This package provides a templating backend for Django, using Jinja2. It
651 provides certain advantages over the builtin Jinja2 backend in Django, for
652 example, explicit calls to callables from templates and better performance.")
653 (license license:bsd-3)))
655 (define-public python-dj-database-url
657 (name "python-dj-database-url")
661 (uri (pypi-uri "dj-database-url" version))
664 "0qs16g5y3lflxibsl8gwkwap21crhmmv98l60rdq6x1wawgypsja"))))
665 (build-system python-build-system)
666 (home-page "https://github.com/kennethreitz/dj-database-url")
667 (synopsis "Use Database URLs in your Django Application")
669 "This simple Django utility allows you to utilize the 12factor inspired
670 DATABASE_URL environment variable to configure your Django application.
672 The dj_database_url.config method returns a Django database connection
673 dictionary, populated with all the data specified in your URL. There is also a
674 conn_max_age argument to easily enable Django’s connection pool.")
675 (license license:bsd-2)))
677 (define-public python-django-picklefield
679 (name "python-django-picklefield")
681 (home-page "https://github.com/gintas/django-picklefield")
682 ;; Use a git checkout because the PyPI release lacks tests.
688 (commit (string-append "v" version))))
689 (file-name (git-file-name name version))
692 "0ni7bc86k0ra4pc8zv451pzlpkhs1nyil1sq9jdb4m2mib87b5fk"))))
693 (build-system python-build-system)
695 '(#:phases (modify-phases %standard-phases
698 (invoke "python" "-m" "django" "test" "-v2"
699 "--settings=tests.settings"))))))
701 ;; XXX: Picklefield has not been updated in 10+ years and fails tests
703 `(("python-django@2.2" ,python-django-2.2)))
704 (synopsis "Pickled object field for Django")
705 (description "Pickled object field for Django")
706 (license license:expat)))
708 (define-public python-django-bulk-update
710 (name "python-django-bulk-update")
714 (uri (pypi-uri "django-bulk-update" version))
717 "0dxkmrm3skyw82i0qa8vklxw1ma1y308kh9w2hcnvhpacn5cxdss"))))
718 (build-system python-build-system)
720 ;; XXX: Tests require a Postgres database.
723 `(("python-django" ,python-django)))
724 (home-page "https://github.com/aykut/django-bulk-update")
725 (synopsis "Simple bulk update over Django ORM or with helper function")
727 "Simple bulk update over Django ORM or with helper function. This
728 project aims to bulk update given objects using one query over Django ORM.")
729 (license license:expat)))
731 (define-public python-django-contact-form
733 (name "python-django-contact-form")
737 (uri (pypi-uri "django-contact-form" version))
740 "1my9hkrylckp5vfqg9b0kncrdlxjnwxll56sdciqn4v19i4wbq1y"))))
741 (build-system python-build-system)
744 (modify-phases %standard-phases
747 (invoke "coverage" "run" "--source" "contact_form"
750 `(("python-coverage" ,python-coverage)))
752 `(("python-django" ,python-django)))
753 (home-page "https://github.com/ubernostrum/django-contact-form")
754 (synopsis "Contact form for Django")
756 "This application provides simple, extensible contact-form functionality
758 (license license:bsd-3)))
760 (define-public python-django-contrib-comments
762 (name "python-django-contrib-comments")
766 (uri (pypi-uri "django-contrib-comments" version))
769 "0ccdiv784a5vnpfal36km4dyg12340rwhpr0riyy0k89wfnjn8yi"))))
770 (build-system python-build-system)
772 `(("python-django" ,python-django)
773 ("python-six" ,python-six)))
774 (home-page "https://github.com/django/django-contrib-comments")
775 (synopsis "Comments framework")
777 "Django used to include a comments framework; since Django 1.6 it's been
778 separated to a separate project. This is that project. This framework can be
779 used to attach comments to any model, so you can use it for comments on blog
780 entries, photos, book chapters, or anything else.")
781 (license license:bsd-3)))
783 (define-public python-django-pipeline
785 (name "python-django-pipeline")
790 (uri (pypi-uri "django-pipeline" version))
793 "19vrbd5s12qw4qlg5n8ldv7zz2rs5y2sdid1i7lvgp92m71dayvc"))))
794 (build-system python-build-system)
797 (modify-phases %standard-phases
798 (add-after 'unpack 'patch-source
800 (substitute* "tests/tests/test_compiler.py"
801 (("\\/usr\\/bin\\/env")
804 (lambda*(#:key tests? #:allow-other-keys)
806 (setenv "DJANGO_SETTINGS_MODULE" "tests.settings")
807 (invoke "django-admin" "test" "tests"
808 "--pythonpath=.")))))))
810 `(("python-css-html-js-minify" ,python-css-html-js-minify)
811 ("python-django" ,python-django)
812 ("python-slimit" ,python-slimit)
813 ("python-jsmin" ,python-jsmin)))
815 "https://github.com/jazzband/django-pipeline")
816 (synopsis "Asset packaging library for Django")
818 "Pipeline is an asset packaging library for Django, providing both CSS
819 and JavaScript concatenation and compression, built-in JavaScript template
820 support, and optional data-URI image and font embedding.")
821 (license license:expat)))
823 (define-public python-django-redis
825 (name "python-django-redis")
829 (uri (pypi-uri "django-redis" version))
832 "0qvsm8yjchl0d3i7g20wba6px9lb5gv8kp3fcnr6hr0y0b3qjr9h"))))
833 (build-system python-build-system)
836 (modify-phases %standard-phases
839 (invoke "redis-server" "--daemonize" "yes")
840 (with-directory-excursion "tests"
841 (invoke "python" "runtests.py")))))))
843 `(("python-fakeredis" ,python-fakeredis)
844 ("python-hiredis" ,python-hiredis)
845 ("python-mock" ,python-mock)
846 ("python-msgpack" ,python-msgpack)
849 `(("python-django" ,python-django)
850 ("python-redis" ,python-redis)))
851 (home-page "https://github.com/niwibe/django-redis")
852 (synopsis "Full featured redis cache backend for Django")
854 "Full featured redis cache backend for Django.")
855 (license license:bsd-3)))
857 (define-public python-django-rq
859 (name "python-django-rq")
863 (uri (pypi-uri "django-rq" version))
866 "0lksnjn3q3f7y72bj2yr8870w28a5b6x0vjnd9nhpq2ah6xfz6pf"))))
867 (build-system python-build-system)
870 (modify-phases %standard-phases
873 (invoke "redis-server" "--daemonize" "yes")
874 (invoke "django-admin.py" "test" "django_rq"
875 "--settings=django_rq.tests.settings"
876 "--pythonpath=."))))))
878 `(("python-django-redis" ,python-django-redis)
879 ("python-mock" ,python-mock)
880 ("python-rq-scheduler" ,python-rq-scheduler)
883 `(("python-django" ,python-django)
884 ("python-rq" ,python-rq)))
885 (home-page "https://github.com/ui/django-rq")
886 (synopsis "Django integration with RQ")
888 "Django integration with RQ, a Redis based Python queuing library.
889 Django-RQ is a simple app that allows you to configure your queues in django's
890 settings.py and easily use them in your project.")
891 (license license:expat)))
893 (define-public python-django-q
895 (name "python-django-q")
900 (uri (pypi-uri "django-q" version))
902 (base32 "03z1pf6wlf47i7afr79a8fiiidfk1vq19yaqnv0m4qdny7f58gaj"))))
903 (build-system python-build-system)
904 ;; FIXME: Tests require disque, Redis, MongoDB, Docker.
905 (arguments '(#:tests? #f))
907 `(("python-arrow" ,python-arrow)
908 ("python-blessed" ,python-blessed)
909 ("python-django" ,python-django)
910 ("python-django-picklefield" ,python-django-picklefield)))
911 (home-page "https://django-q.readthedocs.io/")
912 (synopsis "Multiprocessing distributed task queue for Django")
914 "Django Q is a native Django task queue, scheduler and worker application
915 using Python multiprocessing.")
916 (license license:expat)))
918 (define-public python-django-sortedm2m
920 (name "python-django-sortedm2m")
924 (uri (pypi-uri "django-sortedm2m" version))
927 "0z0yymmrr2l5cznqbzwziw624df0qsiflvbpqwrpan52nww3dk4a"))))
928 (build-system python-build-system)
930 `(#:phases (modify-phases %standard-phases
933 (invoke "django-admin"
934 "test" "--settings=test_project.settings"
935 "--pythonpath=."))))))
937 `(("python-django" ,python-django)))
938 (home-page "https://github.com/jazzband/django-sortedm2m")
939 (synopsis "Drop-in replacement for django's own ManyToManyField")
941 "Sortedm2m is a drop-in replacement for django's own ManyToManyField.
942 The provided SortedManyToManyField behaves like the original one but remembers
943 the order of added relations.")
944 (license license:bsd-3)))
946 (define-public python-django-appconf
948 (name "python-django-appconf")
952 (uri (pypi-uri "django-appconf" version))
955 "101k8nkc7xlffpjdi2qbrp9pc4v8hzvmkzi12qp7vms39asxwn5y"))))
956 (build-system python-build-system)
958 '(#:phases (modify-phases %standard-phases
961 (setenv "DJANGO_SETTINGS_MODULE" "tests.test_settings")
962 (invoke "python" "django-admin.py" "test" "-v2"))))))
964 `(("python-django" ,python-django)))
965 (home-page "https://github.com/django-compressor/django-appconf")
966 (synopsis "Handle configuration defaults of packaged Django apps")
968 "This app precedes Django's own AppConfig classes that act as \"objects
969 [to] store metadata for an application\" inside Django's app loading mechanism.
970 In other words, they solve a related but different use case than
971 django-appconf and can't easily be used as a replacement. The similarity in
972 name is purely coincidental.")
973 (license license:bsd-3)))
975 (define-public python-django-statici18n
977 (name "python-django-statici18n")
979 (home-page "https://github.com/zyegfryed/django-statici18n")
984 (commit (string-append "v" version))))
985 (file-name (git-file-name name version))
988 "0x0xvfqd40is2ks43d65awgqkx3wk10lvdim15scvbjhkh301b6v"))))
989 (build-system python-build-system)
991 '(#:phases (modify-phases %standard-phases
994 (setenv "PYTHONPATH" "./tests/test_project")
995 (setenv "DJANGO_SETTINGS_MODULE" "project.settings")
996 (invoke "pytest" "-vv"))))))
998 `(("python-pytest" ,python-pytest)
999 ("python-pytest-django" ,python-pytest-django)))
1001 `(("python-django" ,python-django)
1002 ("django-appconf" ,python-django-appconf)))
1003 (synopsis "Generate JavaScript catalog to static files")
1005 "A Django app that provides helper for generating JavaScript catalog to
1007 (license license:bsd-3)))
1009 (define-public python-django-tagging
1011 (name "python-django-tagging")
1016 (uri (pypi-uri "django-tagging" version))
1019 "13afxx30chssclxzd9gqnvwm9qyrdpnlbs6iswdfa18phfj8zmi8"))))
1020 (build-system python-build-system)
1023 (modify-phases %standard-phases
1026 (setenv "DJANGO_SETTINGS_MODULE" "tagging.tests.settings")
1027 (invoke "django-admin" "test" "--pythonpath=."))))))
1029 `(("python-django" ,python-django)))
1030 (home-page "https://github.com/Fantomas42/django-tagging")
1031 (synopsis "Generic tagging application for Django")
1032 (description "This package provides a generic tagging application for
1033 Django projects, which allows association of a number of tags with any
1034 @code{Model} instance and makes retrieval of tags simple.")
1035 (license license:bsd-3)))
1037 (define-public python-djangorestframework
1039 (name "python-djangorestframework")
1045 (url "https://github.com/encode/django-rest-framework")
1047 (file-name (git-file-name name version))
1050 "16n17dw35wqv47m8k8fixn0yywrvd6v4r573yr4nx6lbbiyi2cqn"))))
1051 (build-system python-build-system)
1054 (modify-phases %standard-phases
1056 (lambda* (#:key tests? #:allow-other-keys)
1057 ;; Add a fix from the master branch for compatibility with Django
1058 ;; 3.2: https://github.com/encode/django-rest-framework/pull/7911
1059 ;; Remove for versions > 3.12.4.
1060 (substitute* "tests/test_fields.py"
1061 (("class MockTimezone:")
1062 "class MockTimezone(pytz.BaseTzInfo):"))
1064 (invoke "python" "runtests.py" "--nolint")
1065 (format #t "test suite not run~%")))))))
1067 `(("python-pytest" ,python-pytest)
1068 ("python-pytest-django" ,python-pytest-django)))
1070 `(("python-django" ,python-django)))
1071 (home-page "https://www.django-rest-framework.org")
1072 (synopsis "Toolkit for building Web APIs with Django")
1074 "The Django REST framework is for building Web APIs with Django. It
1075 provides features like a Web-browsable API and authentication policies.")
1076 (license license:bsd-2)))
1078 (define-public python-django-sekizai
1080 (name "python-django-sekizai")
1085 (uri (pypi-uri "django-sekizai" version))
1088 "0vrkli625b5s1wldri3dyrfvqbxg7zxy2pg0rpjixw3b1ndz0ag8"))))
1089 (build-system python-build-system)
1090 (arguments '(#:tests? #f)) ; Tests not included with release.
1092 `(("python-django" ,python-django)
1093 ("python-django-classy-tags" ,python-django-classy-tags)
1094 ("python-six" ,python-six)))
1095 (home-page "https://github.com/divio/django-sekizai")
1096 (synopsis "Template blocks for Django projects")
1097 (description "Sekizai means blocks in Japanese, and that is what this app
1098 provides. A fresh look at blocks. With @code{django-sekizai} you can define
1099 placeholders where your blocks get rendered and at different places in your
1100 templates append to those blocks. This is especially useful for css and
1101 javascript. Your subtemplates can now define css and javscript files to be
1102 included, and the css will be nicely put at the top and the javascript to the
1103 bottom, just like you should. Also sekizai will ignore any duplicate content in
1105 (license license:bsd-3)))
1107 (define-public python-django-crispy-forms
1109 (name "python-django-crispy-forms")
1114 (uri (pypi-uri "django-crispy-forms" version))
1117 "0fxlf233f49hjax786p4r650rd0ilvhnpyvw8hv1d1aqnkxy1wgj"))))
1118 (build-system python-build-system)
1120 '(;; No included tests
1123 `(("python-django" ,python-django)))
1125 "http://github.com/maraujop/django-crispy-forms")
1126 (synopsis "Tool to control Django forms without custom templates")
1128 "@code{django-crispy-forms} lets you easily build, customize and reuse
1129 forms using your favorite CSS framework, without writing template code.")
1130 (license license:expat)))
1132 (define-public python-django-compressor
1134 (name "python-django-compressor")
1139 (uri (pypi-uri "django_compressor" version))
1141 (base32 "1q0m0hfg7sqmj5km924g4dgy3nx51aszzsprlp6gsin10mv0fn1k"))))
1142 (build-system python-build-system)
1145 (modify-phases %standard-phases
1147 (lambda* (#:key tests? #:allow-other-keys)
1150 (setenv "DJANGO_SETTINGS_MODULE" "compressor.test_settings")
1151 (invoke "django-admin" "test"
1154 ;; Tests fail with beautifulsoup 4.9+
1155 ;; https://github.com/django-compressor/django-compressor/issues/998
1158 `(("python-django-appconf" ,python-django-appconf)
1159 ("python-rcssmin" ,python-rcssmin)
1160 ("python-rjsmin" ,python-rjsmin)))
1162 `(("python-beautifulsoup4" ,python-beautifulsoup4)
1163 ("python-brotli" ,python-brotli)
1164 ("python-csscompressor" ,python-csscompressor)
1165 ("python-django-sekizai" ,python-django-sekizai)
1166 ("python-mock" ,python-mock)))
1167 (home-page "https://django-compressor.readthedocs.io/en/latest/")
1169 "Compress linked and inline JavaScript or CSS into single cached files")
1171 "Django Compressor combines and compresses linked and inline Javascript or
1172 CSS in a Django templates into cacheable static files by using the compress
1174 (license license:expat)))
1176 (define-public python-django-override-storage
1178 (name "python-django-override-storage")
1180 (home-page "https://github.com/danifus/django-override-storage")
1186 (commit (string-append "v" version))))
1187 (file-name (git-file-name name version))
1189 (base32 "081kzfk7mmybhihvc92d3hsdg0r2k20ydq88fs1fgd348sq1ax51"))))
1190 (build-system python-build-system)
1192 '(#:phases (modify-phases %standard-phases
1195 (invoke "python" "runtests.py"))))))
1197 `(("python-mock" ,python-mock)))
1199 `(("python-django" ,python-django)))
1200 (synopsis "Django test helpers to manage file storage side effects")
1202 "This project provides tools to help reduce the side effects of using
1203 FileFields during tests.")
1204 (license license:expat)))
1206 (define-public python-django-auth-ldap
1208 (name "python-django-auth-ldap")
1212 (uri (pypi-uri "django-auth-ldap" version))
1215 "0xk6cxiqz5j3q79bd54x64f26alrlc8p7k9wkp2c768w2k1vzz30"))))
1216 (build-system python-build-system)
1218 '(#:phases (modify-phases %standard-phases
1220 (lambda* (#:key inputs #:allow-other-keys)
1221 (let ((openldap (assoc-ref inputs "openldap")))
1222 ;; The tests need 'slapd' which is installed to the
1223 ;; libexec directory of OpenLDAP.
1224 (setenv "SLAPD" (string-append openldap "/libexec/slapd"))
1226 (string-append openldap "/etc/openldap/schema"))
1227 (invoke "python" "-m" "django" "test"
1228 "--settings" "tests.settings")))))))
1230 `(("openldap" ,openldap)
1231 ("python-mock" ,python-mock)))
1233 `(("python-django" ,python-django)
1234 ("python-ldap" ,python-ldap)))
1235 (home-page "https://github.com/django-auth-ldap/django-auth-ldap")
1236 (synopsis "Django LDAP authentication backend")
1238 "This package provides an LDAP authentication backend for Django.")
1239 (license license:bsd-2)))
1241 (define-public python-django-logging-json
1243 (name "python-django-logging-json")
1247 (uri (pypi-uri "django-logging-json" version))
1250 "06041a8icazzp73kg93c7k1ska12wvkq7fpcad0l0sm1qnxx5yx7"))))
1251 (build-system python-build-system)
1252 (arguments '(#:tests? #f)) ;no tests
1254 `(("python-certifi" ,python-certifi)
1255 ("python-django" ,python-django)
1256 ("python-elasticsearch" ,python-elasticsearch)
1257 ("python-six" ,python-six)))
1258 (home-page "https://github.com/cipriantarta/django-logging")
1259 (synopsis "Log requests/responses in various formats")
1261 "This package provides a Django library that logs request, response,
1262 and exception details in a JSON document. It can also send logs directly
1264 (license license:bsd-2)))
1266 (define-public python-django-netfields
1268 (name "python-django-netfields")
1272 (uri (pypi-uri "django-netfields" version))
1275 "1c47azr5am0q8g45x0fbn0cay7vyrack6n7k6siliw1j2p0gzi7s"))))
1276 (build-system python-build-system)
1277 (arguments '(#:tests? #f)) ;XXX: Requires a running PostgreSQL server
1279 `(("python-django" ,python-django)
1280 ("python-netaddr" ,python-netaddr)
1281 ("python-six" ,python-six)))
1282 (home-page "https://github.com/jimfunk/django-postgresql-netfields")
1283 (synopsis "PostgreSQL netfields implementation for Django")
1285 "This package provides mappings for the PostgreSQL @code{INET} and
1286 @code{CIDR} fields for use in Django projects.")
1287 (license license:bsd-3)))
1289 (define-public python-django-url-filter
1291 (name "python-django-url-filter")
1293 (home-page "https://github.com/miki725/django-url-filter")
1296 (uri (git-reference (url home-page) (commit version)))
1297 (file-name (git-file-name name version))
1300 "0r4zhqhs8y6cnplwyvcb0zpijizw1ifnszs38n4w8138657f9026"))))
1301 (build-system python-build-system)
1303 '(#:tests? #f ;FIXME: Django raises "Apps aren't loaded yet"!?
1304 #:phases (modify-phases %standard-phases
1305 (add-before 'check 'loosen-requirements
1307 ;; Do not depend on compatibility package for old
1309 (substitute* "requirements.txt"
1310 (("enum-compat") ""))))
1312 (lambda* (#:key tests? #:allow-other-keys)
1315 (setenv "DJANGO_SETTINGS_MODULE"
1316 "test_project.settings")
1317 (invoke "pytest" "-vv" "--doctest-modules"
1318 "tests/" "url_filter/"))
1319 (format #t "test suite not run~%")))))))
1321 `(("python-cached-property" ,python-cached-property)
1322 ("python-django" ,python-django)
1323 ("python-six" ,python-six)))
1324 (synopsis "Filter data via human-friendly URLs")
1326 "The main goal of Django URL Filter is to provide an easy URL interface
1327 for filtering data. It allows the user to safely filter by model attributes
1328 and also specify the lookup type for each filter (very much like
1329 Django's filtering system in ORM).")
1330 (license license:expat)))