gnu: Add python-django-classy-tags.
[jackhill/guix/guix.git] / gnu / packages / django.scm
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 ;;;
10 ;;; This file is part of GNU Guix.
11 ;;;
12 ;;; GNU Guix is free software; you can redistribute it and/or modify it
13 ;;; under the terms of the GNU General Public License as published by
14 ;;; the Free Software Foundation; either version 3 of the License, or (at
15 ;;; your option) any later version.
16 ;;;
17 ;;; GNU Guix is distributed in the hope that it will be useful, but
18 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;;; GNU General Public License for more details.
21 ;;;
22 ;;; You should have received a copy of the GNU General Public License
23 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
24
25 (define-module (gnu packages django)
26 #:use-module ((guix licenses) #:prefix license:)
27 #:use-module (guix packages)
28 #:use-module (guix download)
29 #:use-module (guix git-download)
30 #:use-module (guix build-system python)
31 #:use-module (gnu packages)
32 #:use-module (gnu packages base)
33 #:use-module (gnu packages databases)
34 #:use-module (gnu packages check)
35 #:use-module (gnu packages geo)
36 #:use-module (gnu packages python)
37 #:use-module (gnu packages python-web)
38 #:use-module (gnu packages python-xyz)
39 #:use-module (gnu packages sphinx)
40 #:use-module (gnu packages time)
41 #:use-module (gnu packages xml))
42
43 (define-public python-django
44 (package
45 (name "python-django")
46 (version "1.11.28")
47 (source (origin
48 (method url-fetch)
49 (uri (pypi-uri "Django" version))
50 (sha256
51 (base32
52 "1ss1jyip7mlbfjn27m0j6wx80s8h4ksg6g5annkgwigp8xgy6g5k"))))
53 (build-system python-build-system)
54 (arguments
55 '(#:modules ((srfi srfi-1)
56 (guix build python-build-system)
57 (guix build utils))
58 #:phases
59 (modify-phases %standard-phases
60 (add-before 'check 'set-tzdir
61 (lambda* (#:key inputs #:allow-other-keys)
62 ;; The test-suite tests timezone-dependent functions, thus tzdata
63 ;; needs to be available.
64 (setenv "TZDIR"
65 (string-append (assoc-ref inputs "tzdata")
66 "/share/zoneinfo"))
67 #t))
68 (replace 'check
69 (lambda* (#:key inputs #:allow-other-keys)
70 (setenv "PYTHONPATH"
71 (string-append ".:" (getenv "PYTHONPATH")))
72 (substitute* "tests/admin_scripts/tests.py"
73 (("python_path = \\[")
74 (string-append "python_path = ['"
75 (find (lambda (entry)
76 (string-prefix?
77 (assoc-ref inputs "python-pytz")
78 entry))
79 (string-split (getenv "PYTHONPATH")
80 #\:))
81 "', ")))
82 (invoke "python" "tests/runtests.py"))))))
83 ;; TODO: Install extras/django_bash_completion.
84 (native-inputs
85 `(("tzdata" ,tzdata-for-tests)
86 ;; bcrypt and argon2-cffi are extra requirements not yet in guix
87 ;;("python-argon2-cffi" ,python-argon2-cffi) ; >= 16.1.0
88 ;;("python-bcrypt" ,python-bcrypt) ; not py-bcrypt!
89 ;; Remaining packages are test requirements taken from
90 ;; tests/requirements/py3.txt
91 ("python-docutils" ,python-docutils)
92 ;; optional for tests: ("python-geoip2" ,python-geoip2)
93 ("python-jinja2" ,python-jinja2) ; >= 2.7
94 ;; optional for tests: ("python-memcached" ,python-memcached)
95 ("python-numpy" ,python-numpy)
96 ("python-pillow" ,python-pillow)
97 ("python-pyyaml" ,python-pyyaml)
98 ;; optional for tests: ("python-selenium" ,python-selenium)
99 ("python-sqlparse" ,python-sqlparse)
100 ("python-tblib" ,python-tblib)))
101 (propagated-inputs
102 `(("python-pytz" ,python-pytz)))
103 (home-page "https://www.djangoproject.com/")
104 (synopsis "High-level Python Web framework")
105 (description
106 "Django is a high-level Python Web framework that encourages rapid
107 development and clean, pragmatic design. It provides many tools for building
108 any Web site. Django focuses on automating as much as possible and adhering
109 to the @dfn{don't repeat yourself} (DRY) principle.")
110 (license license:bsd-3)
111 (properties `((python2-variant . ,(delay python2-django))
112 (cpe-name . "django")))))
113
114 (define-public python2-django
115 (let ((base (package-with-python2 (strip-python2-variant python-django))))
116 (package
117 (inherit base)
118 (native-inputs
119 `(;; Test requirements for Python 2 taken from
120 ;; tests/requirements/py3.txt: enum34 and mock.
121 ("python2-enum34" ,python2-enum34)
122 ("python2-mock" ,python2-mock)
123 ;; When adding memcached mind: for Python 2 memcached <= 1.53 is
124 ;; required.
125 ,@(package-native-inputs base))))))
126
127 (define-public python-django-extensions
128 (package
129 (name "python-django-extensions")
130 (version "2.1.6")
131 (source
132 (origin
133 (method git-fetch)
134 ;; Fetch from the git repository, so that the tests can be run.
135 (uri (git-reference
136 (url "https://github.com/django-extensions/django-extensions")
137 (commit version)))
138 (file-name (string-append name "-" version))
139 (sha256
140 (base32
141 "0p4qrdinrv6indczlc8dcnm528i5fzmcn9xk1ja7ycfkyk5x6j5w"))))
142 (build-system python-build-system)
143 (arguments
144 '(#:tests? #f)) ;TODO collected 378 items / 3 errors / 1 skipped
145 (propagated-inputs
146 `(("python-six" ,python-six)
147 ("python-vobject" ,python-vobject)
148 ("python-werkzeug" ,python-werkzeug)
149 ("python-dateutil" ,python-dateutil)
150 ("python-django" ,python-django)))
151 (native-inputs
152 `(("python-mock" ,python-mock)
153 ("python-factory-boy" ,python-factory-boy)
154 ("python-tox" ,python-tox)
155 ("python-pytest" ,python-pytest)
156 ("python-pytest-cov" ,python-pytest-cov)
157 ("python-pytest-django" ,python-pytest-django)
158 ("python-shortuuid" , python-shortuuid)))
159 (home-page
160 "https://github.com/django-extensions/django-extensions")
161 (synopsis "Custom management extensions for Django")
162 (description
163 "Django-extensions extends Django providing, for example, management
164 commands, additional database fields and admin extensions.")
165 (license license:expat)))
166
167 (define-public python-django-simple-math-captcha
168 (package
169 (name "python-django-simple-math-captcha")
170 (version "1.0.7")
171 (source (origin
172 (method url-fetch)
173 (uri (pypi-uri "django-simple-math-captcha" version))
174 (sha256
175 (base32
176 "0906hms6y6znjhpd0g4wmzv9vcla4brkdpsm4zha9zdj8g5vq2hd"))))
177 (build-system python-build-system)
178 (arguments
179 ;; FIXME: Upstream uses a 'runtests.py' script that is not
180 ;; present in the pypi tarball.
181 '(#:tests? #f))
182 (propagated-inputs
183 `(("python-django" ,python-django)))
184 (home-page "https://github.com/alsoicode/django-simple-math-captcha")
185 (synopsis "Easy-to-use math field/widget captcha for Django forms")
186 (description
187 "A multi-value-field that presents a human answerable question,
188 with no settings.py configuration necessary, but instead can be configured
189 with arguments to the field constructor.")
190 (license license:asl2.0)))
191
192 (define-public python2-django-simple-math-captcha
193 (package-with-python2 python-django-simple-math-captcha))
194
195 (define-public python-django-classy-tags
196 (package
197 (name "python-django-classy-tags")
198 (version "1.0.0")
199 (source
200 (origin
201 (method url-fetch)
202 (uri (pypi-uri "django-classy-tags" version))
203 (sha256
204 (base32
205 "1cayqddvxd5prhybqi77lif2z4j7mmfmxgc61pq9i82q5gy2asmd"))))
206 (build-system python-build-system)
207 (arguments '(#:tests? #f)) ; Test script not distributed with release.
208 (propagated-inputs
209 `(("python-django" ,python-django)
210 ("python-six" ,python-six)))
211 (home-page "https://github.com/divio/django-classy-tags")
212 (synopsis "Class based template tags for Django")
213 (description
214 "@code{django-classy-tags} is an approach at making writing template tags
215 in Django easier, shorter and more fun. It provides an extensible argument
216 parser which reduces most of the boiler plate code you usually have to write
217 when coding custom template tags.")
218 (license license:bsd-3)))
219
220 (define-public python-django-taggit
221 (package
222 (name "python-django-taggit")
223 (version "1.1.0")
224 (source
225 (origin
226 (method url-fetch)
227 (uri (pypi-uri "django-taggit" version))
228 (sha256
229 (base32
230 "044fzcpmns90kaxdi49qczlam4xsi8rl73rpfwvxx1gkcqzidgq1"))))
231 (build-system python-build-system)
232 (arguments
233 '(#:phases
234 (modify-phases %standard-phases
235 (replace 'check
236 (lambda _
237 (invoke "python3" "-m" "django" "test" "--settings=tests.settings"))))))
238 (propagated-inputs
239 `(("python-django" ,python-django)
240 ("python-isort" ,python-isort)))
241 (native-inputs
242 `(("python-pytest" ,python-pytest)
243 ("python-mock" ,python-mock)))
244 (home-page
245 "https://github.com/jazzband/django-taggit")
246 (synopsis
247 "Reusable Django application for simple tagging")
248 (description
249 "Django-taggit is a reusable Django application for simple tagging.")
250 (license license:bsd-3)))
251
252 (define-public python-easy-thumbnails
253 (package
254 (name "python-easy-thumbnails")
255 (version "2.7")
256 (source
257 (origin
258 (method url-fetch)
259 (uri (pypi-uri "easy-thumbnails" version))
260 (sha256
261 (base32
262 "14gzp5cv24z0qhxb7f7k7v9jgzpaj4n8yhjq83ynpx8183fs1rz4"))))
263 (build-system python-build-system)
264 (propagated-inputs
265 `(("python-django" ,python-django)
266 ("python-pillow" ,python-pillow)))
267 (home-page "https://github.com/SmileyChris/easy-thumbnails")
268 (synopsis "Easy thumbnails for Django")
269 (description
270 "Easy thumbnails is a Django plugin to dynamically create thumbnails
271 based on source images. Multiple thumbnails can be created from a single
272 source image, using different options to control parameters like the image
273 size and quality.")
274 (license license:bsd-3)))
275
276 (define-public python-pytest-django
277 (package
278 (name "python-pytest-django")
279 (version "3.1.2")
280 (source (origin
281 (method url-fetch)
282 (uri (pypi-uri "pytest-django" version))
283 (sha256
284 (base32
285 "02932m2sr8x22m4az8syr8g835g4ak77varrnw71n6xakmdcr303"))))
286 (build-system python-build-system)
287 (arguments
288 `(#:tests? #f ; FIXME: How to run tests?
289 #:phases
290 (modify-phases %standard-phases
291 (add-after 'unpack 'patch-setuppy
292 (lambda _
293 (substitute* "setup.py"
294 (("setuptools_scm==1.11.1") "setuptools_scm"))
295 #t)))))
296 (native-inputs
297 `(("python-django" ,python-django)
298 ("python-setuptools-scm" ,python-setuptools-scm)))
299 (propagated-inputs
300 `(("python-pytest" ,python-pytest)))
301 (home-page "https://pytest-django.readthedocs.org/")
302 (synopsis "Django plugin for py.test")
303 (description "Pytest-django is a plugin for py.test that provides a set of
304 useful tools for testing Django applications and projects.")
305 (license license:bsd-3)))
306
307 (define-public python2-pytest-django
308 (package-with-python2 python-pytest-django))
309
310 (define-public python-django-haystack
311 (package
312 (name "python-django-haystack")
313 (version "2.8.1")
314 (source
315 (origin
316 (method url-fetch)
317 (uri (pypi-uri "django-haystack" version))
318 (sha256
319 (base32
320 "1302fqsrx8w474xk5cmnmg3hjqfprlxnjg9qlg86arsr4v4vqm4b"))))
321 (build-system python-build-system)
322 (arguments
323 '(#:phases
324 (modify-phases %standard-phases
325 (add-after 'unpack 'loosen-verion-restrictions
326 (lambda _
327 (substitute* "setup.py"
328 (("geopy.*") "geopy',\n"))
329 #t))
330 (add-before 'check 'set-gdal-lib-path
331 (lambda* (#:key inputs #:allow-other-keys)
332 (setenv "GDAL_LIBRARY_PATH"
333 (string-append (assoc-ref inputs "gdal")
334 "/lib"))
335 #t)))
336 #:tests? #f)) ; OSError: libgdal.so.27: cannot open shared object file
337 (propagated-inputs
338 `(("python-django" ,python-django)))
339 (native-inputs
340 `(("gdal" ,gdal)
341 ("python-coverage" ,python-coverage)
342 ("python-dateutil" ,python-dateutil)
343 ("python-geopy" ,python-geopy)
344 ("python-mock" ,python-mock)
345 ("python-nose" ,python-nose)
346 ("python-requests" ,python-requests)
347 ("python-setuptools-scm" ,python-setuptools-scm)
348 ("python-pysolr" ,python-pysolr)
349 ("python-whoosh" ,python-whoosh)))
350 (home-page "http://haystacksearch.org/")
351 (synopsis "Pluggable search for Django")
352 (description "Haystack provides modular search for Django. It features a
353 unified, familiar API that allows you to plug in different search backends
354 (such as Solr, Elasticsearch, Whoosh, Xapian, etc.) without having to modify
355 your code.")
356 (license license:bsd-3)))
357
358 (define-public python-django-filter
359 (package
360 (name "python-django-filter")
361 (version "1.1.0")
362 (source (origin
363 (method url-fetch)
364 (uri (pypi-uri "django-filter" version))
365 (sha256
366 (base32
367 "0slpfqfhnjrzlrb6vmswyhrzn01p84s16j2x1xib35gg4fxg23pc"))))
368 (build-system python-build-system)
369 (arguments
370 '(#:phases
371 (modify-phases %standard-phases
372 (replace 'check
373 (lambda _
374 (invoke "python" "runtests.py"))))))
375 (native-inputs
376 `(("python-django" ,python-django)
377 ("python-djangorestframework" ,python-djangorestframework)
378 ("python-django-crispy-forms" ,python-django-crispy-forms)
379 ("python-mock" ,python-mock)))
380 (home-page "https://django-filter.readthedocs.io/en/latest/")
381 (synopsis "Reusable Django application to filter querysets dynamically")
382 (description
383 "Django-filter is a generic, reusable application to alleviate writing
384 some of the more mundane bits of view code. Specifically, it allows users to
385 filter down a queryset based on a model’s fields, displaying the form to let
386 them do this.")
387 (license license:bsd-3)))
388
389 (define-public python2-django-filter
390 (package-with-python2 python-django-filter))
391
392 (define-public python-django-allauth
393 (package
394 (name "python-django-allauth")
395 (version "0.39.1")
396 (source
397 (origin
398 (method url-fetch)
399 (uri (pypi-uri "django-allauth" version))
400 (sha256
401 (base32
402 "17l0acpr3cihdndzccjhgv58f9z170v2qwx7w0b8w6235x646i24"))))
403 (build-system python-build-system)
404 (arguments
405 '(#:phases
406 (modify-phases %standard-phases
407 ;; TODO: Tagging the tests requiring the web could be done upstream.
408 (add-before 'check 'skip-test-requiring-network-access
409 (lambda _
410 (substitute* "allauth/socialaccount/providers/openid/tests.py"
411 (("import override_settings") "import tag, override_settings")
412 (("def test_login")
413 "@tag('requires-web')
414 def test_login"))))
415 (replace 'check
416 (lambda _
417 ;; TODO: investigate why this test fails
418 (delete-file "allauth/socialaccount/providers/cern/tests.py")
419 (setenv "DJANGO_SETTINGS_MODULE" "test_settings")
420 (invoke "django-admin"
421 "test"
422 "allauth"
423 "--verbosity=2"
424 "--exclude-tag=requires-web"))))))
425 (propagated-inputs
426 `(("python-openid" ,python-openid)
427 ("python-requests" ,python-requests)
428 ("python-requests-oauthlib" ,python-requests-oauthlib)))
429 (native-inputs
430 `(("python-mock" ,python-mock)))
431 (inputs
432 `(("python-django" ,python-django)))
433 (home-page "https://github.com/pennersr/django-allauth")
434 (synopsis "Set of Django applications addressing authentication")
435 (description
436 "Integrated set of Django applications addressing authentication,
437 registration, account management as well as 3rd party (social)
438 account authentication.")
439 (license license:expat)))
440
441 (define-public python2-django-allauth
442 (package-with-python2 python-django-allauth))
443
444 (define-public python-django-debug-toolbar
445 (package
446 (name "python-django-debug-toolbar")
447 (version "1.10.1")
448 (source
449 (origin
450 (method git-fetch)
451 (uri (git-reference
452 (url "https://github.com/jazzband/django-debug-toolbar")
453 (commit version)))
454 (file-name (git-file-name name version))
455 (sha256
456 (base32
457 "0zr6yjsms97wlvvd17rdbrx01irkg887dn9x70c1hzfjmfvp9afk"))))
458 (build-system python-build-system)
459 (propagated-inputs
460 `(("python-sqlparse" ,python-sqlparse)
461 ("python-django" ,python-django)))
462 (native-inputs
463 `(("python-django-jinja" ,python-django-jinja)
464 ("python-html5lib" ,python-html5lib)))
465 (arguments
466 '(#:phases
467 (modify-phases %standard-phases
468 (replace 'check
469 (lambda _
470 (invoke "make" "test"))))))
471 (home-page
472 "https://github.com/jazzband/django-debug-toolbar")
473 (synopsis "Toolbar to help with developing Django applications")
474 (description
475 "A configurable set of panels that display information about the current
476 request and response as a toolbar on the rendered page.")
477 (license license:bsd-3)))
478
479 (define-public python-django-gravatar2
480 (package
481 (name "python-django-gravatar2")
482 (version "1.4.2")
483 (source
484 (origin
485 (method url-fetch)
486 (uri (pypi-uri "django-gravatar2" version))
487 (sha256
488 (base32
489 "1qsv40xywbqsf4mkrmsswrpzqd7nfljxpfiim9an2z3dykn5rka6"))))
490 (build-system python-build-system)
491 (arguments
492 '(;; TODO: The django project for the tests is missing from the release.
493 #:tests? #f))
494 (inputs
495 `(("python-django" ,python-django)))
496 (home-page "https://github.com/twaddington/django-gravatar")
497 (synopsis "Gravatar support for Django, improved version")
498 (description
499 "Essential Gravatar support for Django. Features helper methods,
500 templatetags and a full test suite.")
501 (license license:expat)))
502
503 (define-public python2-django-gravatar2
504 (package-with-python2 python-django-gravatar2))
505
506 (define-public python-django-assets
507 (package
508 (name "python-django-assets")
509 (version "0.12")
510 (source (origin
511 (method url-fetch)
512 (uri (pypi-uri "django-assets" version))
513 (sha256
514 (base32
515 "0y0007fvkn1rdlj2g0y6k1cnkx53kxab3g8i85i0rd58k335p365"))))
516 (build-system python-build-system)
517 (arguments
518 `(#:phases
519 (modify-phases %standard-phases
520 (add-before 'check 'fix-tests
521 (lambda _
522 (begin
523 ;; https://github.com/miracle2k/django-assets/issues/87
524 (substitute* "tests/__init__.py"
525 (("settings.configure.*")
526 (string-append
527 "settings.configure(\n"
528 "INSTALLED_APPS=['django_assets', "
529 "'django.contrib.staticfiles'],\n"
530 "TEMPLATES=[{'BACKEND': "
531 "'django.template.backends.django.DjangoTemplates'}],\n"
532 ")\n")))
533 ;; These tests fail
534 (substitute* "tests/test_django.py"
535 (("TestLoader") "NoTestLoader"))))))))
536 (native-inputs
537 `(("python-nose" ,python-nose)))
538 (propagated-inputs
539 `(("python-django" ,python-django)
540 ("python-webassets" ,python-webassets)))
541 (home-page "https://github.com/miracle2k/django-assets")
542 (synopsis "Asset management for Django")
543 (description
544 "Asset management for Django, to compress and merge CSS and Javascript
545 files. Integrates the webassets library with Django, adding support for
546 merging, minifying and compiling CSS and Javascript files.")
547 (license license:bsd-2)))
548
549 (define-public python2-django-assets
550 (package-with-python2 python-django-assets))
551
552 (define-public python-django-jinja
553 (package
554 (name "python-django-jinja")
555 (version "2.4.1")
556 (source
557 (origin
558 (method git-fetch)
559 (uri (git-reference
560 (url "https://github.com/niwinz/django-jinja")
561 (commit version)))
562 (file-name (git-file-name name version))
563 (sha256
564 (base32
565 "1fcrxlznlq1xvl26y3j1r22vvy6m08r5l97xi2wj50rdmxhfvhis"))))
566 (build-system python-build-system)
567 (propagated-inputs
568 `(("python-django" ,python-django)
569 ("python-jinja2" ,python-jinja2)
570 ("python-pytz" ,python-pytz)
571 ("python-django-pipeline" ,python-django-pipeline)))
572 (arguments
573 '(;; TODO Tests currently fail due to issues with the configuration for
574 ;; django-pipeline
575 #:tests? #f
576 #:phases
577 (modify-phases %standard-phases
578 (replace 'check
579 (lambda* (#:key tests? #:allow-other-keys)
580 (or
581 (not tests?)
582 (with-directory-excursion "testing"
583 (invoke "python" "runtests.py"))))))))
584 (home-page
585 "https://niwinz.github.io/django-jinja/latest/")
586 (synopsis "Simple jinja2 templating backend for Django")
587 (description
588 "This package provides a templating backend for Django, using Jinja2. It
589 provides certain advantages over the builtin Jinja2 backend in Django, for
590 example, explicit calls to callables from templates and better performance.")
591 (license license:bsd-3)))
592
593 (define-public python-django-jsonfield
594 (package
595 (name "python-django-jsonfield")
596 (version "1.0.3")
597 (source (origin
598 (method url-fetch)
599 (uri (pypi-uri "jsonfield" version))
600 (sha256
601 (base32
602 "19x4lak0hg9c20r7mvf27w7i8r6i4sg2g0ypmlmp2665fnk76zvy"))))
603 (build-system python-build-system)
604 (arguments
605 `(#:phases
606 (modify-phases %standard-phases
607 (add-before 'check 'fix-tests
608 (lambda _
609 (substitute* "jsonfield/tests.py"
610 (("django.forms.util") "django.forms.utils")))))))
611 (propagated-inputs
612 `(("python-django" ,python-django)))
613 (home-page "https://github.com/bradjasper/django-jsonfield")
614 (synopsis "Store validated JSON in your model")
615 (description
616 "Django-jsonfield is a reusable Django field that allows you to store
617 validated JSON in your model. It silently takes care of serialization. To
618 use, simply add the field to one of your models.")
619 (license license:expat)))
620
621 (define-public python2-django-jsonfield
622 (package-with-python2 python-django-jsonfield))
623
624 (define-public python-dj-database-url
625 (package
626 (name "python-dj-database-url")
627 (version "0.4.2")
628 (source (origin
629 (method url-fetch)
630 (uri (pypi-uri "dj-database-url" version))
631 (sha256
632 (base32
633 "024zbkc5rli4hia9lz9g8kf1zxhb2gwawj5abf67i7gf8n22v0x6"))))
634 (build-system python-build-system)
635 (home-page "https://github.com/kennethreitz/dj-database-url")
636 (synopsis "Use Database URLs in your Django Application")
637 (description
638 "This simple Django utility allows you to utilize the 12factor inspired
639 DATABASE_URL environment variable to configure your Django application.
640
641 The dj_database_url.config method returns a Django database connection
642 dictionary, populated with all the data specified in your URL. There is also a
643 conn_max_age argument to easily enable Django’s connection pool.")
644 (license license:bsd-2)))
645
646 (define-public python2-dj-database-url
647 (package-with-python2 python-dj-database-url))
648
649 (define-public python-django-picklefield
650 (package
651 (name "python-django-picklefield")
652 (version "2.1.1")
653 (source
654 (origin
655 (method url-fetch)
656 (uri (pypi-uri "django-picklefield" version))
657 (sha256
658 (base32
659 "0imncys5s3vsy2q79nn7k5d670da1xgmcr9gmhn06fry6ibf39b7"))))
660 (build-system python-build-system)
661 (propagated-inputs `(("python-django" ,python-django)))
662 (native-inputs `(("python-tox" ,python-tox)))
663 (home-page "https://github.com/gintas/django-picklefield")
664 (synopsis "Pickled object field for Django")
665 (description "Pickled object field for Django")
666 (license license:expat)))
667
668 (define-public python-django-bulk-update
669 (package
670 (name "python-django-bulk-update")
671 (version "1.1.10")
672 (source (origin
673 (method url-fetch)
674 (uri (pypi-uri "django-bulk-update" version))
675 (sha256
676 (base32
677 "0mbng9m7swfc0dnidipbzlxfhlfjrv755dlnha5s4m9mgdxb1fhc"))))
678 (build-system python-build-system)
679 (arguments
680 ;; tests don't support django 1.10, but the module seems to work.
681 `(#:tests? #f))
682 (native-inputs
683 `(("six" ,python-six)
684 ("jsonfield" ,python-django-jsonfield)
685 ("python-dj-database-url" ,python-dj-database-url)))
686 (propagated-inputs
687 `(("python-django" ,python-django)))
688 (home-page "https://github.com/aykut/django-bulk-update")
689 (synopsis "Simple bulk update over Django ORM or with helper function")
690 (description
691 "Simple bulk update over Django ORM or with helper function. This
692 project aims to bulk update given objects using one query over Django ORM.")
693 (license license:expat)))
694
695 (define-public python2-django-bulk-update
696 (package-with-python2 python-django-bulk-update))
697
698 (define-public python-django-contact-form
699 (package
700 (name "python-django-contact-form")
701 (version "1.3")
702 (source (origin
703 (method url-fetch)
704 (uri (pypi-uri "django-contact-form" version))
705 (sha256
706 (base32
707 "0az590y56k5ahv4sixrkn54d3a8ig2q2z9pl6s3m4f533mx2gj17"))))
708 (build-system python-build-system)
709 (arguments
710 `(#:phases
711 (modify-phases %standard-phases
712 (replace 'check
713 (lambda _
714 ;; the next version will need "make test"
715 (invoke "flake8" "contact_form")
716 (invoke "coverage" "run" "contact_form/runtests.py")
717 (invoke "coverage" "report" "-m" "--fail-under" "0"))))))
718 (native-inputs
719 `(("python-coverage" ,python-coverage)
720 ("python-flake8" ,python-flake8)))
721 (propagated-inputs
722 `(("python-django" ,python-django)))
723 (home-page "https://github.com/ubernostrum/django-contact-form")
724 (synopsis "Contact form for Django")
725 (description
726 "This application provides simple, extensible contact-form functionality
727 for Django sites.")
728 (license license:bsd-3)))
729
730 (define-public python2-django-contact-form
731 (package-with-python2 python-django-contact-form))
732
733 (define-public python-django-contrib-comments
734 (package
735 (name "python-django-contrib-comments")
736 (version "1.8.0")
737 (source (origin
738 (method url-fetch)
739 (uri (pypi-uri "django-contrib-comments" version))
740 (sha256
741 (base32
742 "0bxsgw8jrkhg6r5s0z6ksfi4w8yknaqb1s9acmxd9pm3pnsnp5kx"))))
743 (build-system python-build-system)
744 (propagated-inputs
745 `(("python-django" ,python-django)))
746 (home-page "https://github.com/django/django-contrib-comments")
747 (synopsis "Comments framework")
748 (description
749 "Django used to include a comments framework; since Django 1.6 it's been
750 separated to a separate project. This is that project. This framework can be
751 used to attach comments to any model, so you can use it for comments on blog
752 entries, photos, book chapters, or anything else.")
753 (license license:bsd-3)))
754
755 (define-public python2-django-contrib-comments
756 (package-with-python2 python-django-contrib-comments))
757
758 (define-public python-django-overextends
759 (package
760 (name "python-django-overextends")
761 (version "0.4.3")
762 (source (origin
763 (method url-fetch)
764 (uri (pypi-uri "django-overextends" version))
765 (sha256
766 (base32
767 "0qc2pcf3i56pmfxh2jw7k3pgljd8xzficmkl2541n7bkcbngqfzm"))))
768 (build-system python-build-system)
769 (arguments
770 `(#:phases
771 (modify-phases %standard-phases
772 (replace 'check
773 (lambda _ (invoke "./test_project/manage.py" "test"))))))
774 (propagated-inputs
775 `(("python-django" ,python-django)))
776 (native-inputs
777 `(("sphinx-me" ,python-sphinx-me)))
778 (home-page "https://github.com/stephenmcd/django-overextends")
779 (synopsis "Circular template inheritance")
780 (description
781 "A Django reusable app providing the overextends template tag, a drop-in
782 replacement for Django's extends tag, which allows you to use circular template
783 inheritance. The primary use-case for overextends is to simultaneously
784 override and extend templates from other reusable apps, in your own Django
785 project.")
786 (license license:bsd-2)))
787
788 (define-public python2-django-overextends
789 (package-with-python2 python-django-overextends))
790
791 (define-public python-django-pipeline
792 (package
793 (name "python-django-pipeline")
794 (version "1.6.14")
795 (source
796 (origin
797 (method url-fetch)
798 (uri (pypi-uri "django-pipeline" version))
799 (sha256
800 (base32
801 "1a207y71r7za033ira0qmh2yrgp5rq0l04gw2fg9b8jri7sslrzg"))))
802 (build-system python-build-system)
803 (arguments
804 '(#:phases
805 (modify-phases %standard-phases
806 (add-after 'unpack 'patch-source
807 (lambda _
808 (substitute* "tests/tests/test_compiler.py"
809 (("\\/usr\\/bin\\/env")
810 (which "env")))))
811 (replace 'check
812 (lambda*(#:key tests? #:allow-other-keys)
813 (or
814 (not tests?)
815 (begin
816 (setenv "PYTHONPATH"
817 (string-append (getcwd) ":"
818 (getenv "PYTHONPATH")))
819 (setenv "DJANGO_SETTINGS_MODULE" "tests.settings")
820 (invoke "django-admin" "test" "tests"))))))))
821 (propagated-inputs
822 `(("python-django" ,python-django)
823 ("python-slimit" ,python-slimit)
824 ("python-jsmin" ,python-jsmin)))
825 (home-page
826 "https://github.com/jazzband/django-pipeline")
827 (synopsis "Asset packaging library for Django")
828 (description
829 "Pipeline is an asset packaging library for Django, providing both CSS
830 and JavaScript concatenation and compression, built-in JavaScript template
831 support, and optional data-URI image and font embedding.")
832 (license license:expat)))
833
834 (define-public python-django-redis
835 (package
836 (name "python-django-redis")
837 (version "4.10.0")
838 (source (origin
839 (method url-fetch)
840 (uri (pypi-uri "django-redis" version))
841 (sha256
842 (base32
843 "1rxcwnv9ik0swkwvfqdi9i9baw6n8if5pj6q63fjh4p9chw3j2xg"))))
844 (build-system python-build-system)
845 (arguments
846 `(#:phases
847 (modify-phases %standard-phases
848 (replace 'check
849 (lambda _
850 (invoke "redis-server" "--daemonize" "yes")
851 (with-directory-excursion "tests"
852 (invoke "python" "runtests.py")))))))
853 (native-inputs
854 `(("python-fakeredis" ,python-fakeredis)
855 ("python-hiredis" ,python-hiredis)
856 ("python-mock" ,python-mock)
857 ("python-msgpack" ,python-msgpack)
858 ("redis" ,redis)))
859 (propagated-inputs
860 `(("python-django" ,python-django)
861 ("python-redis" ,python-redis)))
862 (home-page "https://github.com/niwibe/django-redis")
863 (synopsis "Full featured redis cache backend for Django")
864 (description
865 "Full featured redis cache backend for Django.")
866 (license license:bsd-3)))
867
868 (define-public python2-django-redis
869 (package-with-python2 python-django-redis))
870
871 (define-public python-django-rq
872 (package
873 (name "python-django-rq")
874 (version "1.3.1")
875 (source (origin
876 (method url-fetch)
877 (uri (pypi-uri "django-rq" version))
878 (sha256
879 (base32
880 "1ips1ikv5qhgwb58ssn496vgqg9qv6jinwmwbrg9l3s75fskd1l5"))))
881 (build-system python-build-system)
882 (arguments
883 `(#:phases
884 (modify-phases %standard-phases
885 (replace 'check
886 (lambda _
887 (invoke "redis-server" "--daemonize" "yes")
888 (invoke "django-admin.py" "test" "django_rq"
889 "--settings=django_rq.tests.settings"
890 "--pythonpath="))))))
891 (native-inputs
892 `(("python-mock" ,python-mock)
893 ("redis" ,redis)))
894 (propagated-inputs
895 `(("python-django" ,python-django)
896 ("python-rq" ,python-rq)))
897 (home-page "https://github.com/ui/django-rq")
898 (synopsis "Django integration with RQ")
899 (description
900 "Django integration with RQ, a Redis based Python queuing library.
901 Django-RQ is a simple app that allows you to configure your queues in django's
902 settings.py and easily use them in your project.")
903 (license license:expat)))
904
905 (define-public python2-django-rq
906 (package-with-python2 python-django-rq))
907
908 (define-public python-django-q
909 (package
910 (name "python-django-q")
911 (version "1.3.2")
912 (source
913 (origin
914 (method url-fetch)
915 (uri (pypi-uri "django-q" version))
916 (sha256
917 (base32
918 "0ac3rjxv37bn97a62ly8b7qvbv765z6paiinzpwxx83nal2icc42"))))
919 (build-system python-build-system)
920 (arguments
921 '(#:phases
922 (modify-phases %standard-phases
923 (replace 'check
924 (lambda _
925 (setenv "DJANGO_SETTINGS_MODULE" "django_q.tests.settings")
926 (invoke "django-admin" "test" "django_q.tests"
927 "--pythonpath=."))))))
928 (propagated-inputs
929 `(("python-arrow" ,python-arrow)
930 ("python-blessed" ,python-blessed)
931 ("python-django" ,python-django)
932 ("python-django-picklefield" ,python-django-picklefield)))
933 (native-inputs
934 `(("python-django-redis" ,python-django-redis)
935 ("python-pytest-django" ,python-pytest-django)))
936 (home-page "https://django-q.readthedocs.io/")
937 (synopsis "Multiprocessing distributed task queue for Django")
938 (description
939 "Django Q is a native Django task queue, scheduler and worker application
940 using Python multiprocessing.")
941 (license license:expat)))
942
943 (define-public python-django-sortedm2m
944 (package
945 (name "python-django-sortedm2m")
946 (version "1.3.3")
947 (source (origin
948 (method url-fetch)
949 (uri (pypi-uri "django-sortedm2m" version))
950 (sha256
951 (base32
952 "0axf765i7b3c2s83nlph47asi8s071dhq8l7y382v1pw785s22vi"))))
953 (build-system python-build-system)
954 (arguments
955 ;; no tests.
956 `(#:tests? #f))
957 (propagated-inputs
958 `(("python-django" ,python-django)))
959 (home-page "https://github.com/gregmuellegger/django-sortedm2m")
960 (synopsis "Drop-in replacement for django's own ManyToManyField")
961 (description
962 "Sortedm2m is a drop-in replacement for django's own ManyToManyField.
963 The provided SortedManyToManyField behaves like the original one but remembers
964 the order of added relations.")
965 (license license:bsd-3)))
966
967 (define-public python2-django-sortedm2m
968 (package-with-python2 python-django-sortedm2m))
969
970 (define-public python-django-appconf
971 (package
972 (name "python-django-appconf")
973 (version "1.0.3")
974 (source (origin
975 (method url-fetch)
976 (uri (pypi-uri "django-appconf" version))
977 (sha256
978 (base32
979 "1qw0p9qh78bvkgi38ba58djwn0rd5j1lrkg2c2wk5wb7snj3rw9m"))))
980 (build-system python-build-system)
981 (propagated-inputs
982 `(("python-django" ,python-django)
983 ("python-six" ,python-six)))
984 (home-page "https://github.com/django-compressor/django-appconf")
985 (synopsis "Handle configuration defaults of packaged Django apps")
986 (description
987 "This app precedes Django's own AppConfig classes that act as \"objects
988 [to] store metadata for an application\" inside Django's app loading mechanism.
989 In other words, they solve a related but different use case than
990 django-appconf and can't easily be used as a replacement. The similarity in
991 name is purely coincidental.")
992 (license license:bsd-3)))
993
994 (define-public python2-django-appconf
995 (package-with-python2 python-django-appconf))
996
997 (define-public python-django-statici18n
998 (package
999 (name "python-django-statici18n")
1000 (version "1.3.0")
1001 (source (origin
1002 (method url-fetch)
1003 (uri (pypi-uri "django-statici18n" version))
1004 (sha256
1005 (base32
1006 "0alcf4g1nv69njhq5k3qw4mfl2k6dc18bik5nk0g1mnp3m8zyz7k"))))
1007 (build-system python-build-system)
1008 (propagated-inputs
1009 `(("python-django" ,python-django)
1010 ("django-appconf" ,python-django-appconf)))
1011 (home-page "https://github.com/zyegfryed/django-statici18n")
1012 (synopsis "Generate JavaScript catalog to static files")
1013 (description
1014 "A Django app that provides helper for generating JavaScript catalog to
1015 static files.")
1016 (license license:bsd-3)))
1017
1018 (define-public python2-django-statici18n
1019 (package-with-python2 python-django-statici18n))
1020
1021 (define-public pootle
1022 (package
1023 (name "pootle")
1024 (version "2.8.2")
1025 (source
1026 (origin
1027 (method url-fetch)
1028 (uri (pypi-uri "Pootle" version ".tar.bz2"))
1029 (sha256
1030 (base32
1031 "1ng8igq0alsqzasgxdh3fb23581anyzp121h9041pwdzzv98kn4m"))))
1032 (build-system python-build-system)
1033 (arguments
1034 `(; pootle supports only python2.
1035 #:python ,python-2
1036 ;; tests are not run and fail with "pytest_pootle/data/po/.tmp: No such
1037 ;; file or directory". If we create this directory,
1038 ;; pytest_pootle/data/po/terminology.po is missing.
1039 #:tests? #f
1040 #:phases
1041 (modify-phases %standard-phases
1042 (add-before 'build 'fix-requirements
1043 (lambda _
1044 (substitute* "Pootle.egg-info/requires.txt"
1045 (("1.7.3") "1.8.0")
1046 (("2.0.0") "2.1.0"))
1047 (substitute* "requirements/tests.txt"
1048 (("==3.0.6") ">=3.0.6"))
1049 (substitute* "requirements/base.txt"
1050 (("1.7.3") "1.8.0")
1051 (("2.0.0") "2.1.0")))))))
1052 (propagated-inputs
1053 `(("django-allauth" ,python2-django-allauth)
1054 ("django-assets" ,python2-django-assets)
1055 ("django-bulk-update" ,python2-django-bulk-update)
1056 ("django-contact-form" ,python2-django-contact-form)
1057 ("django-contrib-comments" ,python2-django-contrib-comments)
1058 ("django-overextends" ,python2-django-overextends)
1059 ("django-redis" ,python2-django-redis)
1060 ("django-rq" ,python2-django-rq)
1061 ("django-sortedm2m" ,python2-django-sortedm2m)
1062 ("django-statici18n" ,python2-django-statici18n)
1063 ("babel" ,python2-babel)
1064 ("cssmin" ,python2-cssmin)
1065 ("diff-match-patch" ,python2-diff-match-patch)
1066 ("dirsync" ,python2-dirsync)
1067 ("elasticsearch" ,python2-elasticsearch)
1068 ("jsonfield" ,python2-django-jsonfield)
1069 ("lxml" ,python2-lxml)
1070 ("dateutil" ,python2-dateutil)
1071 ("levenshtein" ,python2-levenshtein)
1072 ("mysqlclient" ,python2-mysqlclient)
1073 ("psycopg2" ,python2-psycopg2)
1074 ("pytz" ,python2-pytz)
1075 ("rq" ,python2-rq)
1076 ("scandir" ,python2-scandir)
1077 ("stemming" ,python2-stemming)
1078 ("translate-toolkit" ,python2-translate-toolkit)))
1079 (native-inputs
1080 `(("python2-pytest" ,python2-pytest)
1081 ("python2-pytest-django" ,python2-pytest-django)
1082 ("python2-pytest-catchlog" ,python2-pytest-catchlog)
1083 ("python2-pytest-cov" ,python2-pytest-cov)
1084 ("python2-factory-boy" ,python2-factory-boy)))
1085 (home-page "https://pootle.translatehouse.org/")
1086 (synopsis "Community localization server")
1087 (description
1088 "Pootle is an online translation and localization tool. It works to
1089 lower the barrier of entry, providing tools to enable teams to work towards
1090 higher quality while welcoming newcomers.")
1091 (license license:gpl3+)))
1092
1093 (define-public python-django-tagging
1094 (package
1095 (name "python-django-tagging")
1096 (version "0.4.6")
1097 (source
1098 (origin
1099 (method url-fetch)
1100 (uri (pypi-uri "django-tagging" version))
1101 (sha256
1102 (base32
1103 "0s7b4v45j783yaxs7rni10k24san0ya77nqz4s7zdf3jhfpk42r1"))))
1104 (build-system python-build-system)
1105 (home-page "https://github.com/Fantomas42/django-tagging")
1106 (synopsis "Generic tagging application for Django")
1107 (description "This package provides a generic tagging application for
1108 Django projects, which allows association of a number of tags with any
1109 @code{Model} instance and makes retrieval of tags simple.")
1110 (license license:bsd-3)))
1111
1112 (define-public python2-django-tagging
1113 (package-with-python2 python-django-tagging))
1114
1115 (define-public python-djangorestframework
1116 (package
1117 (name "python-djangorestframework")
1118 (version "3.7.7")
1119 (source
1120 (origin
1121 (method url-fetch)
1122 (uri (pypi-uri "djangorestframework" version))
1123 (sha256
1124 (base32
1125 "11qv117gqwswxjljs7wafxg1hyzzlx3qrviwlk9hw41bsbl997lz"))))
1126 (build-system python-build-system)
1127 (arguments
1128 '(;; No included tests
1129 #:tests? #f))
1130 (propagated-inputs
1131 `(("python-django" ,python-django)))
1132 (home-page "https://www.django-rest-framework.org")
1133 (synopsis "Toolkit for building Web APIs with Django")
1134 (description
1135 "The Django REST framework is for building Web APIs with Django. It
1136 provides features like a web browseable API and authentication policies.")
1137 (license license:bsd-2)))
1138
1139 (define-public python-django-crispy-forms
1140 (package
1141 (name "python-django-crispy-forms")
1142 (version "1.7.2")
1143 (source
1144 (origin
1145 (method url-fetch)
1146 (uri (pypi-uri "django-crispy-forms" version))
1147 (sha256
1148 (base32
1149 "0pv7y648i8iz7mf64gkjizpbx5d01ap2s4vqqa30n38if6wvlljr"))))
1150 (build-system python-build-system)
1151 (arguments
1152 '(;; No included tests
1153 #:tests? #f))
1154 (propagated-inputs
1155 `(("python-django" ,python-django)))
1156 (home-page
1157 "http://github.com/maraujop/django-crispy-forms")
1158 (synopsis "Tool to control Django forms without custom templates")
1159 (description
1160 "@code{django-crispy-forms} lets you easily build, customize and reuse
1161 forms using your favorite CSS framework, without writing template code.")
1162 (license license:expat)))
1163
1164 (define-public python-django-override-storage
1165 (package
1166 (name "python-django-override-storage")
1167 (version "0.1.6")
1168 (source
1169 (origin
1170 (method url-fetch)
1171 (uri (pypi-uri "django-override-storage" version))
1172 (sha256
1173 (base32 "022arq94lxnlyykn8wvfnkykhi2dldnsn93pa2i41na551i0wpiv"))))
1174 (build-system python-build-system)
1175 (propagated-inputs
1176 `(("python-django" ,python-django)))
1177 (home-page
1178 "https://github.com/danifus/django-override-storage")
1179 (synopsis "Django test helpers to manage file storage side effects")
1180 (description
1181 "This project provides tools to help reduce the side effects of using
1182 FileFields during tests.")
1183 (license license:expat)))