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