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