1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
3 ;;; Copyright © 2016, 2019, 2020 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 Marius Bakke <marius@gnu.org>
11 ;;; This file is part of GNU Guix.
13 ;;; GNU Guix is free software; you can redistribute it and/or modify it
14 ;;; under the terms of the GNU General Public License as published by
15 ;;; the Free Software Foundation; either version 3 of the License, or (at
16 ;;; your option) any later version.
18 ;;; GNU Guix is distributed in the hope that it will be useful, but
19 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
20 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ;;; GNU General Public License for more details.
23 ;;; You should have received a copy of the GNU General Public License
24 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
26 (define-module (gnu packages django)
27 #:use-module ((guix licenses) #:prefix license:)
28 #:use-module (guix packages)
29 #:use-module (guix download)
30 #:use-module (guix git-download)
31 #:use-module (guix build-system python)
32 #:use-module (gnu packages)
33 #:use-module (gnu packages base)
34 #:use-module (gnu packages databases)
35 #:use-module (gnu packages check)
36 #:use-module (gnu packages geo)
37 #:use-module (gnu packages openldap)
38 #:use-module (gnu packages python)
39 #:use-module (gnu packages python-compression)
40 #:use-module (gnu packages python-crypto)
41 #:use-module (gnu packages python-web)
42 #:use-module (gnu packages python-xyz)
43 #:use-module (gnu packages sphinx)
44 #:use-module (gnu packages time)
45 #:use-module (gnu packages xml))
47 (define-public python-django
49 (name "python-django")
53 (uri (pypi-uri "Django" version))
56 "0bzwy58hrxbsh7szak1yfh7qvvfnpdpi8ay1x7d3pvbkm1f15j2r"))))
57 (build-system python-build-system)
60 (modify-phases %standard-phases
61 (add-before 'check 'pre-check
62 (lambda* (#:key inputs #:allow-other-keys)
63 ;; The test-suite tests timezone-dependent functions, thus tzdata
64 ;; needs to be available.
66 (string-append (assoc-ref inputs "tzdata")
69 ;; Disable test for incorrect timezone: it only raises the
70 ;; expected error when /usr/share/zoneinfo exists, even though
71 ;; the machinery gracefully falls back to TZDIR. According to
72 ;; django/conf/__init__.py, lack of /usr/share/zoneinfo is
73 ;; harmless, so just ignore this test.
74 (substitute* "tests/settings_tests/tests.py"
75 ((".*def test_incorrect_timezone.*" all)
76 (string-append " @unittest.skipIf(True, 'Disabled by Guix')\n"
79 ;; Preserve the PYTHONPATH created by Guix when running the tests.
80 (substitute* "tests/admin_scripts/tests.py"
81 (("python_path = \\[")
82 (string-append "python_path = ['"
84 (string-split (getenv "PYTHONPATH") #\:)
91 (with-directory-excursion "tests"
93 (string-append "..:" (getenv "PYTHONPATH")))
94 (invoke "python" "runtests.py"
95 ;; By default tests run in parallel, which may cause
96 ;; various race conditions. Run sequentially for
97 ;; consistent results.
99 ;; TODO: Install extras/django_bash_completion.
101 `(("tzdata" ,tzdata-for-tests)
102 ;; Remaining packages are test requirements taken from
103 ;; tests/requirements/py3.txt
104 ("python-docutils" ,python-docutils)
105 ;; optional for tests: ("python-geoip2" ,python-geoip2)
106 ("python-jinja2" ,python-jinja2) ; >= 2.7
107 ;; optional for tests: ("python-memcached" ,python-memcached)
108 ("python-numpy" ,python-numpy)
109 ("python-pillow" ,python-pillow)
110 ("python-pyyaml" ,python-pyyaml)
111 ;; optional for tests: ("python-selenium" ,python-selenium)
112 ("python-tblib" ,python-tblib)))
114 `(("python-argon2-cffi" ,python-argon2-cffi)
115 ("python-asgiref" ,python-asgiref)
116 ("python-bcrypt" ,python-bcrypt)
117 ("python-pytz" ,python-pytz)
119 ;; This input is not strictly required, but in practice many Django
120 ;; libraries need it for test suites and similar.
121 ("python-sqlparse" ,python-sqlparse)))
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 "1535g2r322cl4x52fb0dmzlbg23539j2wx6027j54p22xvjlbkv2"))))
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-simple-math-captcha
189 (name "python-django-simple-math-captcha")
191 (home-page "https://github.com/alsoicode/django-simple-math-captcha")
196 (commit (string-append "v" version))))
197 (file-name (git-file-name name version))
200 "0fhy9k8haqa1296v0qpg1b5w7y3pyw9qi9z9laj5ijry1gk35qaw"))))
201 (build-system python-build-system)
203 '(#:phases (modify-phases %standard-phases
204 (add-after 'unpack 'patch-six-imports
206 ;; Django no longer bundles six, adjust the imports
207 ;; accordingly. The six dependency can likely be
208 ;; removed in the next version.
209 (substitute* (find-files "." "\\.py$")
210 (("from django\\.utils import six")
215 (invoke "python" "runtests.py"))))))
217 `(("python-mock" ,python-mock)))
219 `(("python-django" ,python-django)
220 ("python-six" ,python-six)))
221 (synopsis "Easy-to-use math field/widget captcha for Django forms")
223 "A multi-value-field that presents a human answerable question,
224 with no settings.py configuration necessary, but instead can be configured
225 with arguments to the field constructor.")
226 (license license:asl2.0)))
228 (define-public python-django-classy-tags
230 (name "python-django-classy-tags")
235 (uri (pypi-uri "django-classy-tags" version))
238 "1javam3zqi3y3j0r490mm61v48yh75jaha99gb7lsxkaz6yri7fm"))))
239 (build-system python-build-system)
240 ;; FIXME: How to make the test templates available to Django?
241 (arguments '(#:tests? #f))
243 `(("python-django" ,python-django)))
244 (home-page "https://github.com/divio/django-classy-tags")
245 (synopsis "Class based template tags for Django")
247 "@code{django-classy-tags} is an approach at making writing template tags
248 in Django easier, shorter and more fun. It provides an extensible argument
249 parser which reduces most of the boiler plate code you usually have to write
250 when coding custom template tags.")
251 (license license:bsd-3)))
253 (define-public python-django-taggit
255 (name "python-django-taggit")
260 (uri (pypi-uri "django-taggit" version))
263 "0bbkabbs77z229ps0800gxfhf75yagp4x4j5jzfysbac3zvkp0sa"))))
264 (build-system python-build-system)
267 (modify-phases %standard-phases
270 (invoke "python3" "-m" "django" "test" "--settings=tests.settings"))))))
272 `(("python-django" ,python-django)
273 ("python-isort" ,python-isort)))
275 `(("python-pytest" ,python-pytest)
276 ("python-mock" ,python-mock)))
278 "https://github.com/jazzband/django-taggit")
280 "Reusable Django application for simple tagging")
282 "Django-taggit is a reusable Django application for simple tagging.")
283 (license license:bsd-3)))
285 (define-public python-easy-thumbnails
287 (name "python-easy-thumbnails")
292 (uri (pypi-uri "easy-thumbnails" version))
295 "14gzp5cv24z0qhxb7f7k7v9jgzpaj4n8yhjq83ynpx8183fs1rz4"))))
296 (build-system python-build-system)
298 `(("python-django" ,python-django)
299 ("python-pillow" ,python-pillow)))
300 (home-page "https://github.com/SmileyChris/easy-thumbnails")
301 (synopsis "Easy thumbnails for Django")
303 "Easy thumbnails is a Django plugin to dynamically create thumbnails
304 based on source images. Multiple thumbnails can be created from a single
305 source image, using different options to control parameters like the image
307 (license license:bsd-3)))
309 (define-public python-pytest-django
311 (name "python-pytest-django")
315 (uri (pypi-uri "pytest-django" version))
318 "19nvqsb7b9kz3ikpb50m8ppf7mfhzrapdxsqd5hhd1pdfz8dprjd"))))
319 (build-system python-build-system)
322 (modify-phases %standard-phases
324 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
327 (add-installed-pythonpath inputs outputs)
329 (string-append ".:" ;for pytest_django_test
330 (getenv "PYTHONPATH")))
331 (setenv "PYTEST_DJANGO_TEST_RUNNER" "pytest")
332 (setenv "DJANGO_SETTINGS_MODULE"
333 "pytest_django_test.settings_sqlite_file")
334 (invoke "pytest" "-vv" "-k"
335 ;; FIXME: these tests fail to locate Django templates ...
336 (string-append "not test_django_not_loaded_without_settings"
337 " and not test_settings"
338 ;; ... and this does not discover
339 ;; 'pytest_django_test'.
340 " and not test_urls_cache_is_cleared")))
341 (format #t "test suite not run~%"))
344 `(("python-django" ,python-django)
345 ("python-setuptools-scm" ,python-setuptools-scm)
348 ("python-pytest-xdist" ,python-pytest-xdist)))
350 `(("python-pytest" ,python-pytest)))
351 (home-page "https://pytest-django.readthedocs.org/")
352 (synopsis "Django plugin for py.test")
353 (description "Pytest-django is a plugin for py.test that provides a set of
354 useful tools for testing Django applications and projects.")
355 (license license:bsd-3)))
357 (define-public python-django-haystack
359 (name "python-django-haystack")
364 (uri (pypi-uri "django-haystack" version))
367 "1302fqsrx8w474xk5cmnmg3hjqfprlxnjg9qlg86arsr4v4vqm4b"))))
368 (build-system python-build-system)
371 (modify-phases %standard-phases
372 (add-after 'unpack 'loosen-verion-restrictions
374 (substitute* "setup.py"
375 (("geopy.*") "geopy',\n"))
377 (add-before 'check 'set-gdal-lib-path
378 (lambda* (#:key inputs #:allow-other-keys)
379 (setenv "GDAL_LIBRARY_PATH"
380 (string-append (assoc-ref inputs "gdal")
383 #:tests? #f)) ; OSError: libgdal.so.27: cannot open shared object file
385 `(("python-django" ,python-django)))
388 ("python-coverage" ,python-coverage)
389 ("python-dateutil" ,python-dateutil)
390 ("python-geopy" ,python-geopy)
391 ("python-mock" ,python-mock)
392 ("python-nose" ,python-nose)
393 ("python-requests" ,python-requests)
394 ("python-setuptools-scm" ,python-setuptools-scm)
395 ("python-pysolr" ,python-pysolr)
396 ("python-whoosh" ,python-whoosh)))
397 (home-page "http://haystacksearch.org/")
398 (synopsis "Pluggable search for Django")
399 (description "Haystack provides modular search for Django. It features a
400 unified, familiar API that allows you to plug in different search backends
401 (such as Solr, Elasticsearch, Whoosh, Xapian, etc.) without having to modify
403 (license license:bsd-3)))
405 (define-public python-django-filter
407 (name "python-django-filter")
411 (uri (pypi-uri "django-filter" version))
414 "1bz5qzdk9pk4a2lp2yacrdnqmkv24vxnz4k3lykrnpc3b7bkvrhi"))))
415 (build-system python-build-system)
418 (modify-phases %standard-phases
421 (invoke "python" "runtests.py"))))))
423 `(("python-django" ,python-django)
424 ("python-djangorestframework" ,python-djangorestframework)
425 ("python-django-crispy-forms" ,python-django-crispy-forms)
426 ("python-mock" ,python-mock)))
427 (home-page "https://django-filter.readthedocs.io/en/latest/")
428 (synopsis "Reusable Django application to filter querysets dynamically")
430 "Django-filter is a generic, reusable application to alleviate writing
431 some of the more mundane bits of view code. Specifically, it allows users to
432 filter down a queryset based on a model’s fields, displaying the form to let
434 (license license:bsd-3)))
436 (define-public python-django-allauth
438 (name "python-django-allauth")
443 (uri (pypi-uri "django-allauth" version))
446 "0c0x8izvrnjhrr48w6pwsfk9ddbi6yfxg7v3hh5dm1vz1d0hjwpi"))))
447 (build-system python-build-system)
450 (modify-phases %standard-phases
453 (setenv "DJANGO_SETTINGS_MODULE" "test_settings")
454 (invoke "django-admin" "test" "allauth.tests"
455 "--pythonpath=."))))))
457 `(("python-openid" ,python-openid)
458 ("python-requests" ,python-requests)
459 ("python-requests-oauthlib" ,python-requests-oauthlib)))
461 `(("python-mock" ,python-mock)))
463 `(("python-django" ,python-django)))
464 (home-page "https://github.com/pennersr/django-allauth")
465 (synopsis "Set of Django applications addressing authentication")
467 "Integrated set of Django applications addressing authentication,
468 registration, account management as well as 3rd party (social)
469 account authentication.")
470 (license license:expat)))
472 (define-public python-django-debug-toolbar
474 (name "python-django-debug-toolbar")
480 (url "https://github.com/jazzband/django-debug-toolbar")
482 (file-name (git-file-name name version))
485 "14069rlgjd5g724iaglai0nc636g9km4ba56r4j3k84chibqzn03"))))
486 (build-system python-build-system)
488 `(("python-sqlparse" ,python-sqlparse)
489 ("python-django" ,python-django)))
491 `(("python-django-jinja" ,python-django-jinja)
492 ("python-html5lib" ,python-html5lib)))
495 (modify-phases %standard-phases
498 (invoke "make" "test"))))))
500 "https://github.com/jazzband/django-debug-toolbar")
501 (synopsis "Toolbar to help with developing Django applications")
503 "A configurable set of panels that display information about the current
504 request and response as a toolbar on the rendered page.")
505 (license license:bsd-3)))
507 (define-public python-django-gravatar2
509 (name "python-django-gravatar2")
514 (uri (pypi-uri "django-gravatar2" version))
517 "1vn921fb6jjx7rf5dzhy66rkb71nwmh9ydd0xs9ys72icw4jh4y8"))))
518 (build-system python-build-system)
520 '(;; TODO: The django project for the tests is missing from the release.
523 `(("python-django" ,python-django)))
524 (home-page "https://github.com/twaddington/django-gravatar")
525 (synopsis "Gravatar support for Django, improved version")
527 "Essential Gravatar support for Django. Features helper methods,
528 templatetags and a full test suite.")
529 (license license:expat)))
531 (define-public python-django-assets
533 (name "python-django-assets")
537 (uri (pypi-uri "django-assets" version))
540 "0fc6i77faxxv1gjlp06lv3kw64b5bhdiypaygfxh5djddgk83fwa"))))
541 (build-system python-build-system)
543 `(("python-nose" ,python-nose)))
545 `(("python-django" ,python-django)
546 ("python-webassets" ,python-webassets)))
547 (home-page "https://github.com/miracle2k/django-assets")
548 (synopsis "Asset management for Django")
550 "Asset management for Django, to compress and merge CSS and Javascript
551 files. Integrates the webassets library with Django, adding support for
552 merging, minifying and compiling CSS and Javascript files.")
553 (license license:bsd-2)))
555 (define-public python-django-jinja
557 (name "python-django-jinja")
563 (url "https://github.com/niwinz/django-jinja")
565 (file-name (git-file-name name version))
568 "06ldbkfkm6sc0p9sqpjph06gxrqpj78ih3dc2yik2fcba2y5mak1"))))
569 (build-system python-build-system)
571 `(("python-django" ,python-django)
572 ("python-jinja2" ,python-jinja2)
573 ("python-pytz" ,python-pytz)
574 ("python-django-pipeline" ,python-django-pipeline)))
576 '(;; TODO Tests currently fail due to issues with the configuration for
580 (modify-phases %standard-phases
582 (lambda* (#:key tests? #:allow-other-keys)
585 (with-directory-excursion "testing"
586 (invoke "python" "runtests.py"))))))))
588 "https://niwinz.github.io/django-jinja/latest/")
589 (synopsis "Simple jinja2 templating backend for Django")
591 "This package provides a templating backend for Django, using Jinja2. It
592 provides certain advantages over the builtin Jinja2 backend in Django, for
593 example, explicit calls to callables from templates and better performance.")
594 (license license:bsd-3)))
596 ;; JSONField is now built-in to Django, obsoleting this package.
597 (define-public python-django-jsonfield
598 (deprecated-package "python-django-jsonfield" python-django))
600 (define-public python-dj-database-url
602 (name "python-dj-database-url")
606 (uri (pypi-uri "dj-database-url" version))
609 "0qs16g5y3lflxibsl8gwkwap21crhmmv98l60rdq6x1wawgypsja"))))
610 (build-system python-build-system)
611 (home-page "https://github.com/kennethreitz/dj-database-url")
612 (synopsis "Use Database URLs in your Django Application")
614 "This simple Django utility allows you to utilize the 12factor inspired
615 DATABASE_URL environment variable to configure your Django application.
617 The dj_database_url.config method returns a Django database connection
618 dictionary, populated with all the data specified in your URL. There is also a
619 conn_max_age argument to easily enable Django’s connection pool.")
620 (license license:bsd-2)))
622 (define-public python-django-picklefield
624 (name "python-django-picklefield")
626 (home-page "https://github.com/gintas/django-picklefield")
627 ;; Use a git checkout because the PyPI release lacks tests.
633 (commit (string-append "v" version))))
634 (file-name (git-file-name name version))
637 "0ni7bc86k0ra4pc8zv451pzlpkhs1nyil1sq9jdb4m2mib87b5fk"))))
638 (build-system python-build-system)
640 '(#:phases (modify-phases %standard-phases
643 (invoke "python" "-m" "django" "test" "-v2"
644 "--settings=tests.settings"))))))
645 (propagated-inputs `(("python-django" ,python-django)))
646 (synopsis "Pickled object field for Django")
647 (description "Pickled object field for Django")
648 (license license:expat)))
650 (define-public python-django-bulk-update
652 (name "python-django-bulk-update")
656 (uri (pypi-uri "django-bulk-update" version))
659 "0dxkmrm3skyw82i0qa8vklxw1ma1y308kh9w2hcnvhpacn5cxdss"))))
660 (build-system python-build-system)
662 ;; XXX: Tests require a Postgres database.
665 `(("python-django" ,python-django)))
666 (home-page "https://github.com/aykut/django-bulk-update")
667 (synopsis "Simple bulk update over Django ORM or with helper function")
669 "Simple bulk update over Django ORM or with helper function. This
670 project aims to bulk update given objects using one query over Django ORM.")
671 (license license:expat)))
673 (define-public python-django-contact-form
675 (name "python-django-contact-form")
679 (uri (pypi-uri "django-contact-form" version))
682 "1zv7bcjfrg32gcsq3bclkld79l6mcy2wcvlj81h7q2ppv1wm8vqs"))))
683 (build-system python-build-system)
686 (modify-phases %standard-phases
690 (string-append "./build/lib:"
691 (getenv "PYTHONPATH")))
692 (invoke "coverage" "run" "--source" "contact_form"
695 `(("python-coverage" ,python-coverage)))
697 `(("python-django" ,python-django)))
698 (home-page "https://github.com/ubernostrum/django-contact-form")
699 (synopsis "Contact form for Django")
701 "This application provides simple, extensible contact-form functionality
703 (license license:bsd-3)))
705 (define-public python-django-contrib-comments
707 (name "python-django-contrib-comments")
711 (uri (pypi-uri "django-contrib-comments" version))
714 "0ccdiv784a5vnpfal36km4dyg12340rwhpr0riyy0k89wfnjn8yi"))))
715 (build-system python-build-system)
717 `(("python-django" ,python-django)))
718 (home-page "https://github.com/django/django-contrib-comments")
719 (synopsis "Comments framework")
721 "Django used to include a comments framework; since Django 1.6 it's been
722 separated to a separate project. This is that project. This framework can be
723 used to attach comments to any model, so you can use it for comments on blog
724 entries, photos, book chapters, or anything else.")
725 (license license:bsd-3)))
727 (define-public python-django-overextends
729 (name "python-django-overextends")
733 (uri (pypi-uri "django-overextends" version))
736 "0qc2pcf3i56pmfxh2jw7k3pgljd8xzficmkl2541n7bkcbngqfzm"))))
737 (build-system python-build-system)
740 (modify-phases %standard-phases
742 (lambda _ (invoke "./test_project/manage.py" "test"))))))
744 `(("python-django" ,python-django)))
746 `(("sphinx-me" ,python-sphinx-me)))
747 (home-page "https://github.com/stephenmcd/django-overextends")
748 (synopsis "Circular template inheritance")
750 "A Django reusable app providing the overextends template tag, a drop-in
751 replacement for Django's extends tag, which allows you to use circular template
752 inheritance. The primary use-case for overextends is to simultaneously
753 override and extend templates from other reusable apps, in your own Django
755 (license license:bsd-2)))
757 (define-public python-django-pipeline
759 (name "python-django-pipeline")
764 (uri (pypi-uri "django-pipeline" version))
767 "19vrbd5s12qw4qlg5n8ldv7zz2rs5y2sdid1i7lvgp92m71dayvc"))))
768 (build-system python-build-system)
771 (modify-phases %standard-phases
772 (add-after 'unpack 'patch-source
774 (substitute* "tests/tests/test_compiler.py"
775 (("\\/usr\\/bin\\/env")
778 (lambda*(#:key tests? #:allow-other-keys)
783 (string-append (getcwd) ":"
784 (getenv "PYTHONPATH")))
785 (setenv "DJANGO_SETTINGS_MODULE" "tests.settings")
786 (invoke "django-admin" "test" "tests"))))))))
788 `(("python-css-html-js-minify" ,python-css-html-js-minify)
789 ("python-django" ,python-django)
790 ("python-slimit" ,python-slimit)
791 ("python-jsmin" ,python-jsmin)))
793 "https://github.com/jazzband/django-pipeline")
794 (synopsis "Asset packaging library for Django")
796 "Pipeline is an asset packaging library for Django, providing both CSS
797 and JavaScript concatenation and compression, built-in JavaScript template
798 support, and optional data-URI image and font embedding.")
799 (license license:expat)))
801 (define-public python-django-redis
803 (name "python-django-redis")
807 (uri (pypi-uri "django-redis" version))
810 "0qvsm8yjchl0d3i7g20wba6px9lb5gv8kp3fcnr6hr0y0b3qjr9h"))))
811 (build-system python-build-system)
814 (modify-phases %standard-phases
817 (invoke "redis-server" "--daemonize" "yes")
818 (with-directory-excursion "tests"
819 (invoke "python" "runtests.py")))))))
821 `(("python-fakeredis" ,python-fakeredis)
822 ("python-hiredis" ,python-hiredis)
823 ("python-mock" ,python-mock)
824 ("python-msgpack" ,python-msgpack)
827 `(("python-django" ,python-django)
828 ("python-redis" ,python-redis)))
829 (home-page "https://github.com/niwibe/django-redis")
830 (synopsis "Full featured redis cache backend for Django")
832 "Full featured redis cache backend for Django.")
833 (license license:bsd-3)))
835 (define-public python-django-rq
837 (name "python-django-rq")
841 (uri (pypi-uri "django-rq" version))
844 "0lksnjn3q3f7y72bj2yr8870w28a5b6x0vjnd9nhpq2ah6xfz6pf"))))
845 (build-system python-build-system)
848 (modify-phases %standard-phases
851 (invoke "redis-server" "--daemonize" "yes")
852 (invoke "django-admin.py" "test" "django_rq"
853 "--settings=django_rq.tests.settings"
854 "--pythonpath=."))))))
856 `(("python-django-redis" ,python-django-redis)
857 ("python-mock" ,python-mock)
858 ("python-rq-scheduler" ,python-rq-scheduler)
861 `(("python-django" ,python-django)
862 ("python-rq" ,python-rq)))
863 (home-page "https://github.com/ui/django-rq")
864 (synopsis "Django integration with RQ")
866 "Django integration with RQ, a Redis based Python queuing library.
867 Django-RQ is a simple app that allows you to configure your queues in django's
868 settings.py and easily use them in your project.")
869 (license license:expat)))
871 (define-public python-django-q
873 (name "python-django-q")
878 (uri (pypi-uri "django-q" version))
881 "1fs29767940akbsn3vdzw2rqnn9v77b0b55bi7fvydny1rk7fw6y"))))
882 (build-system python-build-system)
883 ;; FIXME: Tests require disque, Redis, MongoDB, Docker.
884 (arguments '(#:tests? #f))
886 `(("python-arrow" ,python-arrow)
887 ("python-blessed" ,python-blessed)
888 ("python-django" ,python-django)
889 ("python-django-picklefield" ,python-django-picklefield)))
890 (home-page "https://django-q.readthedocs.io/")
891 (synopsis "Multiprocessing distributed task queue for Django")
893 "Django Q is a native Django task queue, scheduler and worker application
894 using Python multiprocessing.")
895 (license license:expat)))
897 (define-public python-django-sortedm2m
899 (name "python-django-sortedm2m")
903 (uri (pypi-uri "django-sortedm2m" version))
906 "0z0yymmrr2l5cznqbzwziw624df0qsiflvbpqwrpan52nww3dk4a"))))
907 (build-system python-build-system)
909 `(#:phases (modify-phases %standard-phases
912 (setenv "PYTHONPATH" (string-append "./test_project:"
914 (getenv "PYTHONPATH")))
915 (invoke "django-admin.py" "test" "--settings=settings"))))))
917 `(("python-django" ,python-django)))
918 (home-page "https://github.com/jazzband/django-sortedm2m")
919 (synopsis "Drop-in replacement for django's own ManyToManyField")
921 "Sortedm2m is a drop-in replacement for django's own ManyToManyField.
922 The provided SortedManyToManyField behaves like the original one but remembers
923 the order of added relations.")
924 (license license:bsd-3)))
926 (define-public python-django-appconf
928 (name "python-django-appconf")
932 (uri (pypi-uri "django-appconf" version))
935 "101k8nkc7xlffpjdi2qbrp9pc4v8hzvmkzi12qp7vms39asxwn5y"))))
936 (build-system python-build-system)
938 '(#:phases (modify-phases %standard-phases
941 (setenv "PYTHONPATH" (string-append ".:"
942 (getenv "PYTHONPATH")))
943 (setenv "DJANGO_SETTINGS_MODULE" "tests.test_settings")
944 (invoke "django-admin.py" "test" "-v2"))))))
946 `(("python-django" ,python-django)))
947 (home-page "https://github.com/django-compressor/django-appconf")
948 (synopsis "Handle configuration defaults of packaged Django apps")
950 "This app precedes Django's own AppConfig classes that act as \"objects
951 [to] store metadata for an application\" inside Django's app loading mechanism.
952 In other words, they solve a related but different use case than
953 django-appconf and can't easily be used as a replacement. The similarity in
954 name is purely coincidental.")
955 (license license:bsd-3)))
957 (define-public python-django-statici18n
959 (name "python-django-statici18n")
961 (home-page "https://github.com/zyegfryed/django-statici18n")
966 (commit (string-append "v" version))))
967 (file-name (git-file-name name version))
970 "1p3myp2im6c87yc05alh91jyahqws5lcw3zzdsj4dh8lx9s9cgpf"))))
971 (build-system python-build-system)
973 '(#:phases (modify-phases %standard-phases
977 (string-append "./tests/test_project:./build/lib:"
978 (getenv "PYTHONPATH")))
979 (setenv "DJANGO_SETTINGS_MODULE" "project.settings")
980 (invoke "pytest" "-vv"))))))
982 `(("python-pytest" ,python-pytest)
983 ("python-pytest-django" ,python-pytest-django)))
985 `(("python-django" ,python-django)
986 ("django-appconf" ,python-django-appconf)))
987 (synopsis "Generate JavaScript catalog to static files")
989 "A Django app that provides helper for generating JavaScript catalog to
991 (license license:bsd-3)))
993 (define-public python-django-tagging
995 (name "python-django-tagging")
1000 (uri (pypi-uri "django-tagging" version))
1003 "13afxx30chssclxzd9gqnvwm9qyrdpnlbs6iswdfa18phfj8zmi8"))))
1004 (build-system python-build-system)
1007 (modify-phases %standard-phases
1010 (setenv "DJANGO_SETTINGS_MODULE" "tagging.tests.settings")
1011 (invoke "django-admin" "test" "--pythonpath=."))))))
1013 `(("python-django" ,python-django)))
1014 (home-page "https://github.com/Fantomas42/django-tagging")
1015 (synopsis "Generic tagging application for Django")
1016 (description "This package provides a generic tagging application for
1017 Django projects, which allows association of a number of tags with any
1018 @code{Model} instance and makes retrieval of tags simple.")
1019 (license license:bsd-3)))
1021 (define-public python-djangorestframework
1023 (name "python-djangorestframework")
1028 (uri (pypi-uri "djangorestframework" version))
1031 "0chbl1d0m1x23mmpdj7y85k3n32lpxrhcdl07ywnylfj9dd2vl3d"))))
1032 (build-system python-build-system)
1034 '(;; No included tests
1037 `(("python-django" ,python-django)))
1038 (home-page "https://www.django-rest-framework.org")
1039 (synopsis "Toolkit for building Web APIs with Django")
1041 "The Django REST framework is for building Web APIs with Django. It
1042 provides features like a web browseable API and authentication policies.")
1043 (license license:bsd-2)))
1045 (define-public python-django-sekizai
1047 (name "python-django-sekizai")
1052 (uri (pypi-uri "django-sekizai" version))
1055 "0vrkli625b5s1wldri3dyrfvqbxg7zxy2pg0rpjixw3b1ndz0ag8"))))
1056 (build-system python-build-system)
1057 (arguments '(#:tests? #f)) ; Tests not included with release.
1059 `(("python-django" ,python-django)
1060 ("python-django-classy-tags" ,python-django-classy-tags)
1061 ("python-six" ,python-six)))
1062 (home-page "https://github.com/divio/django-sekizai")
1063 (synopsis "Template blocks for Django projects")
1064 (description "Sekizai means blocks in Japanese, and thats what this app
1065 provides. A fresh look at blocks. With @code{django-sekizai} you can define
1066 placeholders where your blocks get rendered and at different places in your
1067 templates append to those blocks. This is especially useful for css and
1068 javascript. Your subtemplates can now define css and javscript files to be
1069 included, and the css will be nicely put at the top and the javascript to the
1070 bottom, just like you should. Also sekizai will ignore any duplicate content in
1072 (license license:bsd-3)))
1074 (define-public python-django-crispy-forms
1076 (name "python-django-crispy-forms")
1081 (uri (pypi-uri "django-crispy-forms" version))
1084 "0fxlf233f49hjax786p4r650rd0ilvhnpyvw8hv1d1aqnkxy1wgj"))))
1085 (build-system python-build-system)
1087 '(;; No included tests
1090 `(("python-django" ,python-django)))
1092 "http://github.com/maraujop/django-crispy-forms")
1093 (synopsis "Tool to control Django forms without custom templates")
1095 "@code{django-crispy-forms} lets you easily build, customize and reuse
1096 forms using your favorite CSS framework, without writing template code.")
1097 (license license:expat)))
1099 (define-public python-django-compressor
1101 (name "python-django-compressor")
1106 (uri (pypi-uri "django_compressor" version))
1109 "0kx7bclfa0sxlsz6ka70zr9ra00lks0hmv1kc99wbanx6xhirvfj"))))
1110 (build-system python-build-system)
1113 (modify-phases %standard-phases
1115 (lambda* (#:key tests? #:allow-other-keys)
1118 (setenv "DJANGO_SETTINGS_MODULE" "compressor.test_settings")
1119 (invoke "django-admin" "test"
1122 ;; Tests fail with beautifulsoup 4.9+
1123 ;; https://github.com/django-compressor/django-compressor/issues/998
1126 `(("python-django-appconf" ,python-django-appconf)
1127 ("python-rcssmin" ,python-rcssmin)
1128 ("python-rjsmin" ,python-rjsmin)))
1130 `(("python-beautifulsoup4" ,python-beautifulsoup4)
1131 ("python-brotli" ,python-brotli)
1132 ("python-csscompressor" ,python-csscompressor)
1133 ("python-django-sekizai" ,python-django-sekizai)
1134 ("python-mock" ,python-mock)))
1135 (home-page "https://django-compressor.readthedocs.io/en/latest/")
1137 "Compress linked and inline JavaScript or CSS into single cached files")
1139 "Django Compressor combines and compresses linked and inline Javascript or
1140 CSS in a Django templates into cacheable static files by using the compress
1142 (license license:expat)))
1144 (define-public python-django-override-storage
1146 (name "python-django-override-storage")
1148 (home-page "https://github.com/danifus/django-override-storage")
1154 (commit (string-append "v" version))))
1155 (file-name (git-file-name name version))
1157 (base32 "081kzfk7mmybhihvc92d3hsdg0r2k20ydq88fs1fgd348sq1ax51"))))
1158 (build-system python-build-system)
1160 '(#:phases (modify-phases %standard-phases
1163 (invoke "python" "runtests.py"))))))
1165 `(("python-mock" ,python-mock)))
1167 `(("python-django" ,python-django)))
1168 (synopsis "Django test helpers to manage file storage side effects")
1170 "This project provides tools to help reduce the side effects of using
1171 FileFields during tests.")
1172 (license license:expat)))
1174 (define-public python-django-auth-ldap
1176 (name "python-django-auth-ldap")
1180 (uri (pypi-uri "django-auth-ldap" version))
1183 "1gq49l5lv6ar6yf73c8pix8n7md4109yq31s5jfk64w6n1rigbqi"))))
1184 (build-system python-build-system)
1186 '(#:phases (modify-phases %standard-phases
1188 (lambda* (#:key inputs #:allow-other-keys)
1189 (let ((openldap (assoc-ref inputs "openldap")))
1190 ;; The tests need 'slapd' which is installed to the
1191 ;; libexec directory of OpenLDAP.
1192 (setenv "SLAPD" (string-append openldap "/libexec/slapd"))
1194 (string-append openldap "/etc/openldap/schema"))
1195 (invoke "python" "-m" "django" "test"
1196 "--settings" "tests.settings")))))))
1198 `(("openldap" ,openldap)
1199 ("python-mock" ,python-mock)))
1201 `(("python-django" ,python-django)
1202 ("python-ldap" ,python-ldap)))
1203 (home-page "https://github.com/django-auth-ldap/django-auth-ldap")
1204 (synopsis "Django LDAP authentication backend")
1206 "This packages provides a LDAP authentication backend for Django.")
1207 (license license:bsd-2)))
1209 (define-public python-django-logging-json
1211 (name "python-django-logging-json")
1215 (uri (pypi-uri "django-logging-json" version))
1218 "06041a8icazzp73kg93c7k1ska12wvkq7fpcad0l0sm1qnxx5yx7"))))
1219 (build-system python-build-system)
1220 (arguments '(#:tests? #f)) ;no tests
1222 `(("python-certifi" ,python-certifi)
1223 ("python-django" ,python-django)
1224 ("python-elasticsearch" ,python-elasticsearch)
1225 ("python-six" ,python-six)))
1226 (home-page "https://github.com/cipriantarta/django-logging")
1227 (synopsis "Log requests/responses in various formats")
1229 "This package provides a Django library that logs request, response,
1230 and exception details in a JSON document. It can also send logs directly
1232 (license license:bsd-2)))
1234 (define-public python-django-netfields
1236 (name "python-django-netfields")
1240 (uri (pypi-uri "django-netfields" version))
1243 "1c47azr5am0q8g45x0fbn0cay7vyrack6n7k6siliw1j2p0gzi7s"))))
1244 (build-system python-build-system)
1245 (arguments '(#:tests? #f)) ;XXX: Requires a running PostgreSQL server
1247 `(("python-django" ,python-django)
1248 ("python-ipaddress" ,python-ipaddress)
1249 ("python-netaddr" ,python-netaddr)
1250 ("python-six" ,python-six)))
1251 (home-page "https://github.com/jimfunk/django-postgresql-netfields")
1252 (synopsis "PostgreSQL netfields implementation for Django")
1254 "This package provides mappings for the PostgreSQL @code{INET} and
1255 @code{CIDR} fields for use in Django projects.")
1256 (license license:bsd-3)))