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