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 python)
38 #:use-module (gnu packages python-compression)
39 #:use-module (gnu packages python-crypto)
40 #:use-module (gnu packages python-web)
41 #:use-module (gnu packages python-xyz)
42 #:use-module (gnu packages sphinx)
43 #:use-module (gnu packages time)
44 #:use-module (gnu packages xml))
46 (define-public python-django
48 (name "python-django")
52 (uri (pypi-uri "Django" version))
55 "0bzwy58hrxbsh7szak1yfh7qvvfnpdpi8ay1x7d3pvbkm1f15j2r"))))
56 (build-system python-build-system)
59 (modify-phases %standard-phases
60 (add-before 'check 'pre-check
61 (lambda* (#:key inputs #:allow-other-keys)
62 ;; The test-suite tests timezone-dependent functions, thus tzdata
63 ;; needs to be available.
65 (string-append (assoc-ref inputs "tzdata")
68 ;; Disable test for incorrect timezone: it only raises the
69 ;; expected error when /usr/share/zoneinfo exists, even though
70 ;; the machinery gracefully falls back to TZDIR. According to
71 ;; django/conf/__init__.py, lack of /usr/share/zoneinfo is
72 ;; harmless, so just ignore this test.
73 (substitute* "tests/settings_tests/tests.py"
74 ((".*def test_incorrect_timezone.*" all)
75 (string-append " @unittest.skipIf(True, 'Disabled by Guix')\n"
78 ;; Preserve the PYTHONPATH created by Guix when running the tests.
79 (substitute* "tests/admin_scripts/tests.py"
80 (("python_path = \\[")
81 (string-append "python_path = ['"
83 (string-split (getenv "PYTHONPATH") #\:)
90 (with-directory-excursion "tests"
92 (string-append "..:" (getenv "PYTHONPATH")))
93 (invoke "python" "runtests.py"
94 ;; By default tests run in parallel, which may cause
95 ;; various race conditions. Run sequentially for
96 ;; consistent results.
98 ;; TODO: Install extras/django_bash_completion.
100 `(("tzdata" ,tzdata-for-tests)
101 ;; Remaining packages are test requirements taken from
102 ;; tests/requirements/py3.txt
103 ("python-docutils" ,python-docutils)
104 ;; optional for tests: ("python-geoip2" ,python-geoip2)
105 ("python-jinja2" ,python-jinja2) ; >= 2.7
106 ;; optional for tests: ("python-memcached" ,python-memcached)
107 ("python-numpy" ,python-numpy)
108 ("python-pillow" ,python-pillow)
109 ("python-pyyaml" ,python-pyyaml)
110 ;; optional for tests: ("python-selenium" ,python-selenium)
111 ("python-tblib" ,python-tblib)))
113 `(("python-argon2-cffi" ,python-argon2-cffi)
114 ("python-asgiref" ,python-asgiref)
115 ("python-bcrypt" ,python-bcrypt)
116 ("python-pytz" ,python-pytz)
118 ;; This input is not strictly required, but in practice many Django
119 ;; libraries need it for test suites and similar.
120 ("python-sqlparse" ,python-sqlparse)))
121 (home-page "https://www.djangoproject.com/")
122 (synopsis "High-level Python Web framework")
124 "Django is a high-level Python Web framework that encourages rapid
125 development and clean, pragmatic design. It provides many tools for building
126 any Web site. Django focuses on automating as much as possible and adhering
127 to the @dfn{don't repeat yourself} (DRY) principle.")
128 (license license:bsd-3)
129 (properties `((python2-variant . ,(delay python2-django))
130 (cpe-name . "django")))))
132 (define-public python2-django
133 (let ((base (package-with-python2 (strip-python2-variant python-django))))
137 `(;; Test requirements for Python 2 taken from
138 ;; tests/requirements/py3.txt: enum34 and mock.
139 ("python2-enum34" ,python2-enum34)
140 ("python2-mock" ,python2-mock)
141 ;; When adding memcached mind: for Python 2 memcached <= 1.53 is
143 ,@(package-native-inputs base))))))
145 (define-public python-django-2.2
147 (inherit python-django)
151 (uri (pypi-uri "Django" version))
154 "1535g2r322cl4x52fb0dmzlbg23539j2wx6027j54p22xvjlbkv2"))))
156 `(;; XXX: In 2.2 and 3.0, selenium is required for the test suite.
157 ("python-selenium" ,python-selenium)
158 ,@(package-native-inputs python-django)))))
160 (define-public python-django-extensions
162 (name "python-django-extensions")
167 ;; Fetch from the git repository, so that the tests can be run.
169 (url "https://github.com/django-extensions/django-extensions")
171 (file-name (string-append name "-" version))
174 "0sra6hazqvspxd1pnx5cj7gia1rkaz3hn06ib4wd0frc167f5afy"))))
175 (build-system python-build-system)
177 '(#:tests? #f)) ;XXX: requires a Postgres or MySQL database
179 `(("python-six" ,python-six)
180 ("python-vobject" ,python-vobject)
181 ("python-werkzeug" ,python-werkzeug)
182 ("python-dateutil" ,python-dateutil)
183 ("python-django" ,python-django)))
185 `(("python-mock" ,python-mock)
186 ("python-factory-boy" ,python-factory-boy)
187 ("python-tox" ,python-tox)
188 ("python-pytest" ,python-pytest)
189 ("python-pytest-cov" ,python-pytest-cov)
190 ("python-pytest-django" ,python-pytest-django)
191 ("python-shortuuid" , python-shortuuid)))
193 "https://github.com/django-extensions/django-extensions")
194 (synopsis "Custom management extensions for Django")
196 "Django-extensions extends Django providing, for example, management
197 commands, additional database fields and admin extensions.")
198 (license license:expat)))
200 (define-public python-django-simple-math-captcha
202 (name "python-django-simple-math-captcha")
204 (home-page "https://github.com/alsoicode/django-simple-math-captcha")
209 (commit (string-append "v" version))))
210 (file-name (git-file-name name version))
213 "0fhy9k8haqa1296v0qpg1b5w7y3pyw9qi9z9laj5ijry1gk35qaw"))))
214 (build-system python-build-system)
216 '(#:phases (modify-phases %standard-phases
217 (add-after 'unpack 'patch-six-imports
219 ;; Django no longer bundles six, adjust the imports
220 ;; accordingly. The six dependency can likely be
221 ;; removed in the next version.
222 (substitute* (find-files "." "\\.py$")
223 (("from django\\.utils import six")
228 (invoke "python" "runtests.py"))))))
230 `(("python-mock" ,python-mock)))
232 `(("python-django" ,python-django)
233 ("python-six" ,python-six)))
234 (synopsis "Easy-to-use math field/widget captcha for Django forms")
236 "A multi-value-field that presents a human answerable question,
237 with no settings.py configuration necessary, but instead can be configured
238 with arguments to the field constructor.")
239 (license license:asl2.0)))
241 (define-public python2-django-simple-math-captcha
242 (package-with-python2 python-django-simple-math-captcha))
244 (define-public python-django-classy-tags
246 (name "python-django-classy-tags")
251 (uri (pypi-uri "django-classy-tags" version))
254 "1javam3zqi3y3j0r490mm61v48yh75jaha99gb7lsxkaz6yri7fm"))))
255 (build-system python-build-system)
256 ;; FIXME: How to make the test templates available to Django?
257 (arguments '(#:tests? #f))
259 `(("python-django" ,python-django)))
260 (home-page "https://github.com/divio/django-classy-tags")
261 (synopsis "Class based template tags for Django")
263 "@code{django-classy-tags} is an approach at making writing template tags
264 in Django easier, shorter and more fun. It provides an extensible argument
265 parser which reduces most of the boiler plate code you usually have to write
266 when coding custom template tags.")
267 (license license:bsd-3)))
269 (define-public python-django-taggit
271 (name "python-django-taggit")
276 (uri (pypi-uri "django-taggit" version))
279 "0bbkabbs77z229ps0800gxfhf75yagp4x4j5jzfysbac3zvkp0sa"))))
280 (build-system python-build-system)
283 (modify-phases %standard-phases
286 (invoke "python3" "-m" "django" "test" "--settings=tests.settings"))))))
288 `(("python-django" ,python-django)
289 ("python-isort" ,python-isort)))
291 `(("python-pytest" ,python-pytest)
292 ("python-mock" ,python-mock)))
294 "https://github.com/jazzband/django-taggit")
296 "Reusable Django application for simple tagging")
298 "Django-taggit is a reusable Django application for simple tagging.")
299 (license license:bsd-3)))
301 (define-public python-easy-thumbnails
303 (name "python-easy-thumbnails")
308 (uri (pypi-uri "easy-thumbnails" version))
311 "14gzp5cv24z0qhxb7f7k7v9jgzpaj4n8yhjq83ynpx8183fs1rz4"))))
312 (build-system python-build-system)
314 `(("python-django" ,python-django)
315 ("python-pillow" ,python-pillow)))
316 (home-page "https://github.com/SmileyChris/easy-thumbnails")
317 (synopsis "Easy thumbnails for Django")
319 "Easy thumbnails is a Django plugin to dynamically create thumbnails
320 based on source images. Multiple thumbnails can be created from a single
321 source image, using different options to control parameters like the image
323 (license license:bsd-3)))
325 (define-public python-pytest-django
327 (name "python-pytest-django")
331 (uri (pypi-uri "pytest-django" version))
334 "19nvqsb7b9kz3ikpb50m8ppf7mfhzrapdxsqd5hhd1pdfz8dprjd"))))
335 (build-system python-build-system)
338 (modify-phases %standard-phases
340 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
343 (add-installed-pythonpath inputs outputs)
345 (string-append ".:" ;for pytest_django_test
346 (getenv "PYTHONPATH")))
347 (setenv "PYTEST_DJANGO_TEST_RUNNER" "pytest")
348 (setenv "DJANGO_SETTINGS_MODULE"
349 "pytest_django_test.settings_sqlite_file")
350 (invoke "pytest" "-vv" "-k"
351 ;; FIXME: these tests fail to locate Django templates ...
352 (string-append "not test_django_not_loaded_without_settings"
353 " and not test_settings"
354 ;; ... and this does not discover
355 ;; 'pytest_django_test'.
356 " and not test_urls_cache_is_cleared")))
357 (format #t "test suite not run~%"))
360 `(("python-django" ,python-django)
361 ("python-setuptools-scm" ,python-setuptools-scm)
364 ("python-pytest-xdist" ,python-pytest-xdist)))
366 `(("python-pytest" ,python-pytest)))
367 (home-page "https://pytest-django.readthedocs.org/")
368 (synopsis "Django plugin for py.test")
369 (description "Pytest-django is a plugin for py.test that provides a set of
370 useful tools for testing Django applications and projects.")
371 (license license:bsd-3)))
373 (define-public python2-pytest-django
374 (package-with-python2 python-pytest-django))
376 (define-public python-django-haystack
378 (name "python-django-haystack")
383 (uri (pypi-uri "django-haystack" version))
386 "1302fqsrx8w474xk5cmnmg3hjqfprlxnjg9qlg86arsr4v4vqm4b"))))
387 (build-system python-build-system)
390 (modify-phases %standard-phases
391 (add-after 'unpack 'loosen-verion-restrictions
393 (substitute* "setup.py"
394 (("geopy.*") "geopy',\n"))
396 (add-before 'check 'set-gdal-lib-path
397 (lambda* (#:key inputs #:allow-other-keys)
398 (setenv "GDAL_LIBRARY_PATH"
399 (string-append (assoc-ref inputs "gdal")
402 #:tests? #f)) ; OSError: libgdal.so.27: cannot open shared object file
404 `(("python-django" ,python-django)))
407 ("python-coverage" ,python-coverage)
408 ("python-dateutil" ,python-dateutil)
409 ("python-geopy" ,python-geopy)
410 ("python-mock" ,python-mock)
411 ("python-nose" ,python-nose)
412 ("python-requests" ,python-requests)
413 ("python-setuptools-scm" ,python-setuptools-scm)
414 ("python-pysolr" ,python-pysolr)
415 ("python-whoosh" ,python-whoosh)))
416 (home-page "http://haystacksearch.org/")
417 (synopsis "Pluggable search for Django")
418 (description "Haystack provides modular search for Django. It features a
419 unified, familiar API that allows you to plug in different search backends
420 (such as Solr, Elasticsearch, Whoosh, Xapian, etc.) without having to modify
422 (license license:bsd-3)))
424 (define-public python-django-filter
426 (name "python-django-filter")
430 (uri (pypi-uri "django-filter" version))
433 "1bz5qzdk9pk4a2lp2yacrdnqmkv24vxnz4k3lykrnpc3b7bkvrhi"))))
434 (build-system python-build-system)
437 (modify-phases %standard-phases
440 (invoke "python" "runtests.py"))))))
442 `(("python-django" ,python-django)
443 ("python-djangorestframework" ,python-djangorestframework)
444 ("python-django-crispy-forms" ,python-django-crispy-forms)
445 ("python-mock" ,python-mock)))
446 (home-page "https://django-filter.readthedocs.io/en/latest/")
447 (synopsis "Reusable Django application to filter querysets dynamically")
449 "Django-filter is a generic, reusable application to alleviate writing
450 some of the more mundane bits of view code. Specifically, it allows users to
451 filter down a queryset based on a model’s fields, displaying the form to let
453 (license license:bsd-3)))
455 (define-public python2-django-filter
456 (package-with-python2 python-django-filter))
458 (define-public python-django-allauth
460 (name "python-django-allauth")
465 (uri (pypi-uri "django-allauth" version))
468 "0c0x8izvrnjhrr48w6pwsfk9ddbi6yfxg7v3hh5dm1vz1d0hjwpi"))))
469 (build-system python-build-system)
472 (modify-phases %standard-phases
475 (setenv "DJANGO_SETTINGS_MODULE" "test_settings")
476 (invoke "django-admin" "test" "allauth.tests"
477 "--pythonpath=."))))))
479 `(("python-openid" ,python-openid)
480 ("python-requests" ,python-requests)
481 ("python-requests-oauthlib" ,python-requests-oauthlib)))
483 `(("python-mock" ,python-mock)))
485 `(("python-django" ,python-django)))
486 (home-page "https://github.com/pennersr/django-allauth")
487 (synopsis "Set of Django applications addressing authentication")
489 "Integrated set of Django applications addressing authentication,
490 registration, account management as well as 3rd party (social)
491 account authentication.")
492 (license license:expat)))
494 (define-public python2-django-allauth
495 (package-with-python2 python-django-allauth))
497 (define-public python-django-debug-toolbar
499 (name "python-django-debug-toolbar")
505 (url "https://github.com/jazzband/django-debug-toolbar")
507 (file-name (git-file-name name version))
510 "14069rlgjd5g724iaglai0nc636g9km4ba56r4j3k84chibqzn03"))))
511 (build-system python-build-system)
513 `(("python-sqlparse" ,python-sqlparse)
514 ("python-django" ,python-django)))
516 `(("python-django-jinja" ,python-django-jinja)
517 ("python-html5lib" ,python-html5lib)))
520 (modify-phases %standard-phases
523 (invoke "make" "test"))))))
525 "https://github.com/jazzband/django-debug-toolbar")
526 (synopsis "Toolbar to help with developing Django applications")
528 "A configurable set of panels that display information about the current
529 request and response as a toolbar on the rendered page.")
530 (license license:bsd-3)))
532 (define-public python-django-gravatar2
534 (name "python-django-gravatar2")
539 (uri (pypi-uri "django-gravatar2" version))
542 "1vn921fb6jjx7rf5dzhy66rkb71nwmh9ydd0xs9ys72icw4jh4y8"))))
543 (build-system python-build-system)
545 '(;; TODO: The django project for the tests is missing from the release.
548 `(("python-django" ,python-django)))
549 (home-page "https://github.com/twaddington/django-gravatar")
550 (synopsis "Gravatar support for Django, improved version")
552 "Essential Gravatar support for Django. Features helper methods,
553 templatetags and a full test suite.")
554 (license license:expat)))
556 (define-public python2-django-gravatar2
557 (package-with-python2 python-django-gravatar2))
559 (define-public python-django-assets
561 (name "python-django-assets")
565 (uri (pypi-uri "django-assets" version))
568 "0fc6i77faxxv1gjlp06lv3kw64b5bhdiypaygfxh5djddgk83fwa"))))
569 (build-system python-build-system)
571 `(("python-nose" ,python-nose)))
573 `(("python-django" ,python-django)
574 ("python-webassets" ,python-webassets)))
575 (home-page "https://github.com/miracle2k/django-assets")
576 (synopsis "Asset management for Django")
578 "Asset management for Django, to compress and merge CSS and Javascript
579 files. Integrates the webassets library with Django, adding support for
580 merging, minifying and compiling CSS and Javascript files.")
581 (license license:bsd-2)))
583 (define-public python2-django-assets
584 (package-with-python2 python-django-assets))
586 (define-public python-django-jinja
588 (name "python-django-jinja")
594 (url "https://github.com/niwinz/django-jinja")
596 (file-name (git-file-name name version))
599 "06ldbkfkm6sc0p9sqpjph06gxrqpj78ih3dc2yik2fcba2y5mak1"))))
600 (build-system python-build-system)
602 `(("python-django" ,python-django)
603 ("python-jinja2" ,python-jinja2)
604 ("python-pytz" ,python-pytz)
605 ("python-django-pipeline" ,python-django-pipeline)))
607 '(;; TODO Tests currently fail due to issues with the configuration for
611 (modify-phases %standard-phases
613 (lambda* (#:key tests? #:allow-other-keys)
616 (with-directory-excursion "testing"
617 (invoke "python" "runtests.py"))))))))
619 "https://niwinz.github.io/django-jinja/latest/")
620 (synopsis "Simple jinja2 templating backend for Django")
622 "This package provides a templating backend for Django, using Jinja2. It
623 provides certain advantages over the builtin Jinja2 backend in Django, for
624 example, explicit calls to callables from templates and better performance.")
625 (license license:bsd-3)))
627 (define-public python-django-jsonfield
629 (name "python-django-jsonfield")
633 (uri (pypi-uri "jsonfield" version))
636 "19x4lak0hg9c20r7mvf27w7i8r6i4sg2g0ypmlmp2665fnk76zvy"))))
637 (build-system python-build-system)
640 (modify-phases %standard-phases
641 (add-before 'check 'fix-tests
643 (substitute* "jsonfield/tests.py"
644 (("django.forms.util") "django.forms.utils")))))))
646 `(("python-django" ,python-django)))
647 (home-page "https://github.com/bradjasper/django-jsonfield")
648 (synopsis "Store validated JSON in your model")
650 "Django-jsonfield is a reusable Django field that allows you to store
651 validated JSON in your model. It silently takes care of serialization. To
652 use, simply add the field to one of your models.")
653 (license license:expat)))
655 (define-public python2-django-jsonfield
656 (package-with-python2 python-django-jsonfield))
658 (define-public python-dj-database-url
660 (name "python-dj-database-url")
664 (uri (pypi-uri "dj-database-url" version))
667 "0qs16g5y3lflxibsl8gwkwap21crhmmv98l60rdq6x1wawgypsja"))))
668 (build-system python-build-system)
669 (home-page "https://github.com/kennethreitz/dj-database-url")
670 (synopsis "Use Database URLs in your Django Application")
672 "This simple Django utility allows you to utilize the 12factor inspired
673 DATABASE_URL environment variable to configure your Django application.
675 The dj_database_url.config method returns a Django database connection
676 dictionary, populated with all the data specified in your URL. There is also a
677 conn_max_age argument to easily enable Django’s connection pool.")
678 (license license:bsd-2)))
680 (define-public python2-dj-database-url
681 (package-with-python2 python-dj-database-url))
683 (define-public python-django-picklefield
685 (name "python-django-picklefield")
687 (home-page "https://github.com/gintas/django-picklefield")
688 ;; Use a git checkout because the PyPI release lacks tests.
694 (commit (string-append "v" version))))
695 (file-name (git-file-name name version))
698 "0ni7bc86k0ra4pc8zv451pzlpkhs1nyil1sq9jdb4m2mib87b5fk"))))
699 (build-system python-build-system)
701 '(#:phases (modify-phases %standard-phases
704 (invoke "python" "-m" "django" "test" "-v2"
705 "--settings=tests.settings"))))))
706 (propagated-inputs `(("python-django" ,python-django)))
707 (synopsis "Pickled object field for Django")
708 (description "Pickled object field for Django")
709 (license license:expat)))
711 (define-public python-django-bulk-update
713 (name "python-django-bulk-update")
717 (uri (pypi-uri "django-bulk-update" version))
720 "0mbng9m7swfc0dnidipbzlxfhlfjrv755dlnha5s4m9mgdxb1fhc"))))
721 (build-system python-build-system)
723 ;; tests don't support django 1.10, but the module seems to work.
726 `(("six" ,python-six)
727 ("jsonfield" ,python-django-jsonfield)
728 ("python-dj-database-url" ,python-dj-database-url)))
730 `(("python-django" ,python-django)))
731 (home-page "https://github.com/aykut/django-bulk-update")
732 (synopsis "Simple bulk update over Django ORM or with helper function")
734 "Simple bulk update over Django ORM or with helper function. This
735 project aims to bulk update given objects using one query over Django ORM.")
736 (license license:expat)))
738 (define-public python2-django-bulk-update
739 (package-with-python2 python-django-bulk-update))
741 (define-public python-django-contact-form
743 (name "python-django-contact-form")
747 (uri (pypi-uri "django-contact-form" version))
750 "0az590y56k5ahv4sixrkn54d3a8ig2q2z9pl6s3m4f533mx2gj17"))))
751 (build-system python-build-system)
754 (modify-phases %standard-phases
757 ;; the next version will need "make test"
758 (invoke "flake8" "contact_form")
759 (invoke "coverage" "run" "contact_form/runtests.py")
760 (invoke "coverage" "report" "-m" "--fail-under" "0"))))))
762 `(("python-coverage" ,python-coverage)
763 ("python-flake8" ,python-flake8)))
765 `(("python-django" ,python-django)))
766 (home-page "https://github.com/ubernostrum/django-contact-form")
767 (synopsis "Contact form for Django")
769 "This application provides simple, extensible contact-form functionality
771 (license license:bsd-3)))
773 (define-public python2-django-contact-form
774 (package-with-python2 python-django-contact-form))
776 (define-public python-django-contrib-comments
778 (name "python-django-contrib-comments")
782 (uri (pypi-uri "django-contrib-comments" version))
785 "0bxsgw8jrkhg6r5s0z6ksfi4w8yknaqb1s9acmxd9pm3pnsnp5kx"))))
786 (build-system python-build-system)
788 `(("python-django" ,python-django)))
789 (home-page "https://github.com/django/django-contrib-comments")
790 (synopsis "Comments framework")
792 "Django used to include a comments framework; since Django 1.6 it's been
793 separated to a separate project. This is that project. This framework can be
794 used to attach comments to any model, so you can use it for comments on blog
795 entries, photos, book chapters, or anything else.")
796 (license license:bsd-3)))
798 (define-public python2-django-contrib-comments
799 (package-with-python2 python-django-contrib-comments))
801 (define-public python-django-overextends
803 (name "python-django-overextends")
807 (uri (pypi-uri "django-overextends" version))
810 "0qc2pcf3i56pmfxh2jw7k3pgljd8xzficmkl2541n7bkcbngqfzm"))))
811 (build-system python-build-system)
814 (modify-phases %standard-phases
816 (lambda _ (invoke "./test_project/manage.py" "test"))))))
818 `(("python-django" ,python-django)))
820 `(("sphinx-me" ,python-sphinx-me)))
821 (home-page "https://github.com/stephenmcd/django-overextends")
822 (synopsis "Circular template inheritance")
824 "A Django reusable app providing the overextends template tag, a drop-in
825 replacement for Django's extends tag, which allows you to use circular template
826 inheritance. The primary use-case for overextends is to simultaneously
827 override and extend templates from other reusable apps, in your own Django
829 (license license:bsd-2)))
831 (define-public python2-django-overextends
832 (package-with-python2 python-django-overextends))
834 (define-public python-django-pipeline
836 (name "python-django-pipeline")
841 (uri (pypi-uri "django-pipeline" version))
844 "19vrbd5s12qw4qlg5n8ldv7zz2rs5y2sdid1i7lvgp92m71dayvc"))))
845 (build-system python-build-system)
848 (modify-phases %standard-phases
849 (add-after 'unpack 'patch-source
851 (substitute* "tests/tests/test_compiler.py"
852 (("\\/usr\\/bin\\/env")
855 (lambda*(#:key tests? #:allow-other-keys)
860 (string-append (getcwd) ":"
861 (getenv "PYTHONPATH")))
862 (setenv "DJANGO_SETTINGS_MODULE" "tests.settings")
863 (invoke "django-admin" "test" "tests"))))))))
865 `(("python-css-html-js-minify" ,python-css-html-js-minify)
866 ("python-django" ,python-django)
867 ("python-slimit" ,python-slimit)
868 ("python-jsmin" ,python-jsmin)))
870 "https://github.com/jazzband/django-pipeline")
871 (synopsis "Asset packaging library for Django")
873 "Pipeline is an asset packaging library for Django, providing both CSS
874 and JavaScript concatenation and compression, built-in JavaScript template
875 support, and optional data-URI image and font embedding.")
876 (license license:expat)))
878 (define-public python-django-redis
880 (name "python-django-redis")
884 (uri (pypi-uri "django-redis" version))
887 "1rxcwnv9ik0swkwvfqdi9i9baw6n8if5pj6q63fjh4p9chw3j2xg"))))
888 (build-system python-build-system)
891 (modify-phases %standard-phases
894 (invoke "redis-server" "--daemonize" "yes")
895 (with-directory-excursion "tests"
896 (invoke "python" "runtests.py")))))))
898 `(("python-fakeredis" ,python-fakeredis)
899 ("python-hiredis" ,python-hiredis)
900 ("python-mock" ,python-mock)
901 ("python-msgpack" ,python-msgpack)
904 `(("python-django" ,python-django)
905 ("python-redis" ,python-redis)))
906 (home-page "https://github.com/niwibe/django-redis")
907 (synopsis "Full featured redis cache backend for Django")
909 "Full featured redis cache backend for Django.")
910 (license license:bsd-3)))
912 (define-public python2-django-redis
913 (package-with-python2 python-django-redis))
915 (define-public python-django-rq
917 (name "python-django-rq")
921 (uri (pypi-uri "django-rq" version))
924 "1ips1ikv5qhgwb58ssn496vgqg9qv6jinwmwbrg9l3s75fskd1l5"))))
925 (build-system python-build-system)
928 (modify-phases %standard-phases
931 (invoke "redis-server" "--daemonize" "yes")
932 (invoke "django-admin.py" "test" "django_rq"
933 "--settings=django_rq.tests.settings"
934 "--pythonpath=."))))))
936 `(("python-mock" ,python-mock)
939 `(("python-django" ,python-django)
940 ("python-rq" ,python-rq)))
941 (home-page "https://github.com/ui/django-rq")
942 (synopsis "Django integration with RQ")
944 "Django integration with RQ, a Redis based Python queuing library.
945 Django-RQ is a simple app that allows you to configure your queues in django's
946 settings.py and easily use them in your project.")
947 (license license:expat)))
949 (define-public python2-django-rq
950 (package-with-python2 python-django-rq))
952 (define-public python-django-q
954 (name "python-django-q")
959 (uri (pypi-uri "django-q" version))
962 "0ac3rjxv37bn97a62ly8b7qvbv765z6paiinzpwxx83nal2icc42"))))
963 (build-system python-build-system)
966 (modify-phases %standard-phases
969 (setenv "DJANGO_SETTINGS_MODULE" "django_q.tests.settings")
970 (invoke "django-admin" "test" "django_q.tests"
971 "--pythonpath=."))))))
973 `(("python-arrow" ,python-arrow)
974 ("python-blessed" ,python-blessed)
975 ("python-django" ,python-django)
976 ("python-django-picklefield" ,python-django-picklefield)))
978 `(("python-django-redis" ,python-django-redis)
979 ("python-pytest-django" ,python-pytest-django)))
980 (home-page "https://django-q.readthedocs.io/")
981 (synopsis "Multiprocessing distributed task queue for Django")
983 "Django Q is a native Django task queue, scheduler and worker application
984 using Python multiprocessing.")
985 (license license:expat)))
987 (define-public python-django-sortedm2m
989 (name "python-django-sortedm2m")
993 (uri (pypi-uri "django-sortedm2m" version))
996 "0axf765i7b3c2s83nlph47asi8s071dhq8l7y382v1pw785s22vi"))))
997 (build-system python-build-system)
1002 `(("python-django" ,python-django)))
1003 (home-page "https://github.com/gregmuellegger/django-sortedm2m")
1004 (synopsis "Drop-in replacement for django's own ManyToManyField")
1006 "Sortedm2m is a drop-in replacement for django's own ManyToManyField.
1007 The provided SortedManyToManyField behaves like the original one but remembers
1008 the order of added relations.")
1009 (license license:bsd-3)))
1011 (define-public python2-django-sortedm2m
1012 (package-with-python2 python-django-sortedm2m))
1014 (define-public python-django-appconf
1016 (name "python-django-appconf")
1020 (uri (pypi-uri "django-appconf" version))
1023 "1qw0p9qh78bvkgi38ba58djwn0rd5j1lrkg2c2wk5wb7snj3rw9m"))))
1024 (build-system python-build-system)
1026 `(("python-django" ,python-django)
1027 ("python-six" ,python-six)))
1028 (home-page "https://github.com/django-compressor/django-appconf")
1029 (synopsis "Handle configuration defaults of packaged Django apps")
1031 "This app precedes Django's own AppConfig classes that act as \"objects
1032 [to] store metadata for an application\" inside Django's app loading mechanism.
1033 In other words, they solve a related but different use case than
1034 django-appconf and can't easily be used as a replacement. The similarity in
1035 name is purely coincidental.")
1036 (license license:bsd-3)))
1038 (define-public python2-django-appconf
1039 (package-with-python2 python-django-appconf))
1041 (define-public python-django-statici18n
1043 (name "python-django-statici18n")
1047 (uri (pypi-uri "django-statici18n" version))
1050 "0alcf4g1nv69njhq5k3qw4mfl2k6dc18bik5nk0g1mnp3m8zyz7k"))))
1051 (build-system python-build-system)
1053 `(("python-django" ,python-django)
1054 ("django-appconf" ,python-django-appconf)))
1055 (home-page "https://github.com/zyegfryed/django-statici18n")
1056 (synopsis "Generate JavaScript catalog to static files")
1058 "A Django app that provides helper for generating JavaScript catalog to
1060 (license license:bsd-3)))
1062 (define-public python2-django-statici18n
1063 (package-with-python2 python-django-statici18n))
1065 (define-public python-django-tagging
1067 (name "python-django-tagging")
1072 (uri (pypi-uri "django-tagging" version))
1075 "13afxx30chssclxzd9gqnvwm9qyrdpnlbs6iswdfa18phfj8zmi8"))))
1076 (build-system python-build-system)
1079 (modify-phases %standard-phases
1082 (setenv "DJANGO_SETTINGS_MODULE" "tagging.tests.settings")
1083 (invoke "django-admin" "test" "--pythonpath=."))))))
1085 `(("python-django" ,python-django)))
1086 (home-page "https://github.com/Fantomas42/django-tagging")
1087 (synopsis "Generic tagging application for Django")
1088 (description "This package provides a generic tagging application for
1089 Django projects, which allows association of a number of tags with any
1090 @code{Model} instance and makes retrieval of tags simple.")
1091 (properties `((python2-variant . ,(delay python2-django-tagging))))
1092 (license license:bsd-3)))
1094 (define-public python2-django-tagging
1095 (let ((base (package-with-python2
1096 (strip-python2-variant python-django-tagging))))
1103 (uri (pypi-uri "django-tagging" version))
1106 "0s7b4v45j783yaxs7rni10k24san0ya77nqz4s7zdf3jhfpk42r1")))))))
1108 (define-public python-djangorestframework
1110 (name "python-djangorestframework")
1115 (uri (pypi-uri "djangorestframework" version))
1118 "0chbl1d0m1x23mmpdj7y85k3n32lpxrhcdl07ywnylfj9dd2vl3d"))))
1119 (build-system python-build-system)
1121 '(;; No included tests
1124 `(("python-django" ,python-django)))
1125 (home-page "https://www.django-rest-framework.org")
1126 (synopsis "Toolkit for building Web APIs with Django")
1128 "The Django REST framework is for building Web APIs with Django. It
1129 provides features like a web browseable API and authentication policies.")
1130 (license license:bsd-2)))
1132 (define-public python-django-sekizai
1134 (name "python-django-sekizai")
1139 (uri (pypi-uri "django-sekizai" version))
1142 "1nc4sv109valdn6azmgm2j01k7khxy2wnji84z63x7fxsikfdxp2"))))
1143 (build-system python-build-system)
1144 (arguments '(#:tests? #f)) ; Tests not included with release.
1146 `(("python-django" ,python-django)
1147 ("python-django-classy-tags" ,python-django-classy-tags)
1148 ("python-six" ,python-six)))
1149 (home-page "https://github.com/divio/django-sekizai")
1150 (synopsis "Template blocks for Django projects")
1151 (description "Sekizai means blocks in Japanese, and thats what this app
1152 provides. A fresh look at blocks. With @code{django-sekizai} you can define
1153 placeholders where your blocks get rendered and at different places in your
1154 templates append to those blocks. This is especially useful for css and
1155 javascript. Your subtemplates can now define css and javscript files to be
1156 included, and the css will be nicely put at the top and the javascript to the
1157 bottom, just like you should. Also sekizai will ignore any duplicate content in
1159 (license license:bsd-3)))
1161 (define-public python-django-crispy-forms
1163 (name "python-django-crispy-forms")
1168 (uri (pypi-uri "django-crispy-forms" version))
1171 "0fxlf233f49hjax786p4r650rd0ilvhnpyvw8hv1d1aqnkxy1wgj"))))
1172 (build-system python-build-system)
1174 '(;; No included tests
1177 `(("python-django" ,python-django)))
1179 "http://github.com/maraujop/django-crispy-forms")
1180 (synopsis "Tool to control Django forms without custom templates")
1182 "@code{django-crispy-forms} lets you easily build, customize and reuse
1183 forms using your favorite CSS framework, without writing template code.")
1184 (license license:expat)))
1186 (define-public python-django-compressor
1188 (name "python-django-compressor")
1193 (uri (pypi-uri "django_compressor" version))
1196 "0kx7bclfa0sxlsz6ka70zr9ra00lks0hmv1kc99wbanx6xhirvfj"))))
1197 (build-system python-build-system)
1200 (modify-phases %standard-phases
1202 (lambda* (#:key tests? #:allow-other-keys)
1205 (setenv "DJANGO_SETTINGS_MODULE" "compressor.test_settings")
1206 (invoke "django-admin" "test"
1209 ;; Tests fail with beautifulsoup 4.9+
1210 ;; https://github.com/django-compressor/django-compressor/issues/998
1213 `(("python-django-appconf" ,python-django-appconf)
1214 ("python-rcssmin" ,python-rcssmin)
1215 ("python-rjsmin" ,python-rjsmin)))
1217 `(("python-beautifulsoup4" ,python-beautifulsoup4)
1218 ("python-brotli" ,python-brotli)
1219 ("python-csscompressor" ,python-csscompressor)
1220 ("python-django-sekizai" ,python-django-sekizai)
1221 ("python-mock" ,python-mock)))
1222 (home-page "https://django-compressor.readthedocs.io/en/latest/")
1224 "Compress linked and inline JavaScript or CSS into single cached files")
1226 "Django Compressor combines and compresses linked and inline Javascript or
1227 CSS in a Django templates into cacheable static files by using the compress
1229 (license license:expat)))
1231 (define-public python-django-override-storage
1233 (name "python-django-override-storage")
1238 (uri (pypi-uri "django-override-storage" version))
1240 (base32 "022arq94lxnlyykn8wvfnkykhi2dldnsn93pa2i41na551i0wpiv"))))
1241 (build-system python-build-system)
1243 `(("python-django" ,python-django)))
1245 "https://github.com/danifus/django-override-storage")
1246 (synopsis "Django test helpers to manage file storage side effects")
1248 "This project provides tools to help reduce the side effects of using
1249 FileFields during tests.")
1250 (license license:expat)))