gnu: Remove ".git" from "https://github/…/….git".
[jackhill/guix/guix.git] / gnu / packages / django.scm
CommitLineData
d18197af
HG
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
854d4d40 3;;; Copyright © 2016, 2019 Efraim Flashner <efraim@flashner.co.il>
3c986a7d 4;;; Copyright © 2017 Nikita <nikita@n0.is>
ea282711 5;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
40fac51a 6;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
8b209bb6 7;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
52c3cb26 8;;; Copyright © 2019 Sam <smbaines8@gmail.com>
d18197af
HG
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)
52c3cb26 29 #:use-module (guix git-download)
d18197af
HG
30 #:use-module (guix build-system python)
31 #:use-module (gnu packages)
32 #:use-module (gnu packages base)
b939953b 33 #:use-module (gnu packages databases)
ac257f12 34 #:use-module (gnu packages check)
1b2f753d 35 #:use-module (gnu packages python)
33dc54b0 36 #:use-module (gnu packages python-web)
44d10b1f 37 #:use-module (gnu packages python-xyz)
9d0c291e 38 #:use-module (gnu packages sphinx)
55e1475c
MB
39 #:use-module (gnu packages time)
40 #:use-module (gnu packages xml))
d18197af
HG
41
42(define-public python-django
43 (package
44 (name "python-django")
2197c084 45 (version "1.11.28")
d18197af
HG
46 (source (origin
47 (method url-fetch)
48 (uri (pypi-uri "Django" version))
49 (sha256
50 (base32
2197c084 51 "1ss1jyip7mlbfjn27m0j6wx80s8h4ksg6g5annkgwigp8xgy6g5k"))))
d18197af
HG
52 (build-system python-build-system)
53 (arguments
0458ab53
JB
54 '(#:modules ((srfi srfi-1)
55 (guix build python-build-system)
56 (guix build utils))
57 #:phases
d18197af
HG
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
0458ab53 68 (lambda* (#:key inputs #:allow-other-keys)
d18197af
HG
69 (setenv "PYTHONPATH"
70 (string-append ".:" (getenv "PYTHONPATH")))
0458ab53
JB
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 "', ")))
4665d8c9 81 (invoke "python" "tests/runtests.py"))))))
d18197af 82 ;; TODO: Install extras/django_bash_completion.
dfdaea32 83 (native-inputs
c695fb76 84 `(("tzdata" ,tzdata-for-tests)
dfdaea32 85 ;; bcrypt and argon2-cffi are extra requirements not yet in guix
d18197af
HG
86 ;;("python-argon2-cffi" ,python-argon2-cffi) ; >= 16.1.0
87 ;;("python-bcrypt" ,python-bcrypt) ; not py-bcrypt!
dfdaea32
HG
88 ;; Remaining packages are test requirements taken from
89 ;; tests/requirements/py3.txt
d18197af
HG
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)
d18197af
HG
97 ;; optional for tests: ("python-selenium" ,python-selenium)
98 ("python-sqlparse" ,python-sqlparse)
99 ("python-tblib" ,python-tblib)))
0458ab53
JB
100 (propagated-inputs
101 `(("python-pytz" ,python-pytz)))
8198c19c 102 (home-page "https://www.djangoproject.com/")
d18197af
HG
103 (synopsis "High-level Python Web framework")
104 (description
105 "Django is a high-level Python Web framework that encourages rapid
106development and clean, pragmatic design. It provides many tools for building
107any Web site. Django focuses on automating as much as possible and adhering
108to the @dfn{don't repeat yourself} (DRY) principle.")
109 (license license:bsd-3)
33b25201
MB
110 (properties `((python2-variant . ,(delay python2-django))
111 (cpe-name . "django")))))
d18197af
HG
112
113(define-public python2-django
114 (let ((base (package-with-python2 (strip-python2-variant python-django))))
115 (package
116 (inherit base)
dfdaea32
HG
117 (native-inputs
118 `(;; Test requirements for Python 2 taken from
119 ;; tests/requirements/py3.txt: enum34 and mock.
d18197af
HG
120 ("python2-enum34" ,python2-enum34)
121 ("python2-mock" ,python2-mock)
122 ;; When adding memcached mind: for Python 2 memcached <= 1.53 is
123 ;; required.
cda5e76f 124 ,@(package-native-inputs base))))))
b53fc294 125
52c3cb26
S
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
b0e7b699 135 (url "https://github.com/django-extensions/django-extensions")
52c3cb26
S
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
163commands, additional database fields and admin extensions.")
164 (license license:expat)))
165
b53fc294
HG
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)
281cc11c
MB
177 (arguments
178 ;; FIXME: Upstream uses a 'runtests.py' script that is not
179 ;; present in the pypi tarball.
180 '(#:tests? #f))
b53fc294
HG
181 (propagated-inputs
182 `(("python-django" ,python-django)))
b53fc294
HG
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,
187with no settings.py configuration necessary, but instead can be configured
188with 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))
23b563dc 193
8d73558d
S
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)))
9ae3e791
CB
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
245based on source images. Multiple thumbnails can be created from a single
246source image, using different options to control parameters like the image
247size and quality.")
248 (license license:bsd-3)))
8d73558d 249
23b563dc
EF
250(define-public python-pytest-django
251 (package
252 (name "python-pytest-django")
919d4ad0 253 (version "3.1.2")
23b563dc
EF
254 (source (origin
255 (method url-fetch)
256 (uri (pypi-uri "pytest-django" version))
257 (sha256
258 (base32
919d4ad0 259 "02932m2sr8x22m4az8syr8g835g4ak77varrnw71n6xakmdcr303"))))
23b563dc
EF
260 (build-system python-build-system)
261 (arguments
1f31a5e0
MB
262 `(#:tests? #f ; FIXME: How to run tests?
263 #:phases
23b563dc
EF
264 (modify-phases %standard-phases
265 (add-after 'unpack 'patch-setuppy
266 (lambda _
267 (substitute* "setup.py"
919d4ad0 268 (("setuptools_scm==1.11.1") "setuptools_scm"))
23b563dc
EF
269 #t)))))
270 (native-inputs
d18c69aa
EF
271 `(("python-django" ,python-django)
272 ("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 273 (propagated-inputs
2dd12924 274 `(("python-pytest" ,python-pytest)))
16c896e8 275 (home-page "https://pytest-django.readthedocs.org/")
23b563dc
EF
276 (synopsis "Django plugin for py.test")
277 (description "Pytest-django is a plugin for py.test that provides a set of
278useful tools for testing Django applications and projects.")
23b563dc
EF
279 (license license:bsd-3)))
280
281(define-public python2-pytest-django
5c31f4aa 282 (package-with-python2 python-pytest-django))
894810c7
EF
283
284(define-public python-django-filter
285 (package
286 (name "python-django-filter")
da90f337 287 (version "1.1.0")
894810c7
EF
288 (source (origin
289 (method url-fetch)
290 (uri (pypi-uri "django-filter" version))
291 (sha256
292 (base32
da90f337 293 "0slpfqfhnjrzlrb6vmswyhrzn01p84s16j2x1xib35gg4fxg23pc"))))
894810c7 294 (build-system python-build-system)
55ab6451
MB
295 (arguments
296 '(#:phases
297 (modify-phases %standard-phases
298 (replace 'check
299 (lambda _
7b282105 300 (invoke "python" "runtests.py"))))))
fa7cd333
EF
301 (native-inputs
302 `(("python-django" ,python-django)
da90f337 303 ("python-djangorestframework" ,python-djangorestframework)
c695fb76 304 ("python-django-crispy-forms" ,python-django-crispy-forms)
fa7cd333 305 ("python-mock" ,python-mock)))
894810c7
EF
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
310some of the more mundane bits of view code. Specifically, it allows users to
311filter down a queryset based on a model’s fields, displaying the form to let
312them do this.")
894810c7
EF
313 (license license:bsd-3)))
314
315(define-public python2-django-filter
5c31f4aa 316 (package-with-python2 python-django-filter))
e1f06e11 317
318(define-public python-django-allauth
319 (package
320 (name "python-django-allauth")
add66352 321 (version "0.39.1")
e1f06e11 322 (source
323 (origin
324 (method url-fetch)
325 (uri (pypi-uri "django-allauth" version))
326 (sha256
327 (base32
add66352 328 "17l0acpr3cihdndzccjhgv58f9z170v2qwx7w0b8w6235x646i24"))))
e1f06e11 329 (build-system python-build-system)
17dc2a09
CB
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"
add66352 337 (("import override_settings") "import tag, override_settings")
17dc2a09 338 (("def test_login")
add66352 339 "@tag('requires-web')
17dc2a09
CB
340 def test_login"))))
341 (replace 'check
342 (lambda _
add66352
JL
343 ;; TODO: investigate why this test fails
344 (delete-file "allauth/socialaccount/providers/cern/tests.py")
17dc2a09 345 (setenv "DJANGO_SETTINGS_MODULE" "test_settings")
add66352 346 (invoke "django-admin"
17dc2a09
CB
347 "test"
348 "allauth"
349 "--verbosity=2"
add66352 350 "--exclude-tag=requires-web"))))))
e1f06e11 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,
363registration, account management as well as 3rd party (social)
364account authentication.")
365 (license license:expat)))
366
367(define-public python2-django-allauth
368 (package-with-python2 python-django-allauth))
14d8f653 369
be02d4df
CB
370(define-public python-django-debug-toolbar
371 (package
372 (name "python-django-debug-toolbar")
373 (version "1.10.1")
374 (source
375 (origin
854d4d40
EF
376 (method git-fetch)
377 (uri (git-reference
b0e7b699 378 (url "https://github.com/jazzband/django-debug-toolbar")
854d4d40
EF
379 (commit version)))
380 (file-name (git-file-name name version))
be02d4df
CB
381 (sha256
382 (base32
854d4d40 383 "0zr6yjsms97wlvvd17rdbrx01irkg887dn9x70c1hzfjmfvp9afk"))))
be02d4df
CB
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
402request and response as a toolbar on the rendered page.")
403 (license license:bsd-3)))
404
14d8f653 405(define-public python-django-gravatar2
406 (package
407 (name "python-django-gravatar2")
16bd3291 408 (version "1.4.2")
14d8f653 409 (source
410 (origin
411 (method url-fetch)
412 (uri (pypi-uri "django-gravatar2" version))
413 (sha256
414 (base32
16bd3291 415 "1qsv40xywbqsf4mkrmsswrpzqd7nfljxpfiim9an2z3dykn5rka6"))))
14d8f653 416 (build-system python-build-system)
16bd3291
CB
417 (arguments
418 '(;; TODO: The django project for the tests is missing from the release.
419 #:tests? #f))
14d8f653 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,
426templatetags and a full test suite.")
427 (license license:expat)))
428
429(define-public python2-django-gravatar2
430 (package-with-python2 python-django-gravatar2))
01c64cb8
JL
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
471files. Integrates the webassets library with Django, adding support for
472merging, 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))
6c17e963 477
a2e92596
CB
478(define-public python-django-jinja
479 (package
480 (name "python-django-jinja")
481 (version "2.4.1")
482 (source
483 (origin
9f00d13d
EF
484 (method git-fetch)
485 (uri (git-reference
b0e7b699 486 (url "https://github.com/niwinz/django-jinja")
9f00d13d
EF
487 (commit version)))
488 (file-name (git-file-name name version))
a2e92596
CB
489 (sha256
490 (base32
9f00d13d 491 "1fcrxlznlq1xvl26y3j1r22vvy6m08r5l97xi2wj50rdmxhfvhis"))))
a2e92596
CB
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
515provides certain advantages over the builtin Jinja2 backend in Django, for
516example, explicit calls to callables from templates and better performance.")
517 (license license:bsd-3)))
518
6c17e963
JL
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
543validated JSON in your model. It silently takes care of serialization. To
544use, 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))
a326384b
JL
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
565DATABASE_URL environment variable to configure your Django application.
566
567The dj_database_url.config method returns a Django database connection
568dictionary, populated with all the data specified in your URL. There is also a
569conn_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))
afbfe564
JL
574
575(define-public python-django-bulk-update
576 (package
577 (name "python-django-bulk-update")
578 (version "1.1.10")
579 (source (origin
580 (method url-fetch)
581 (uri (pypi-uri "django-bulk-update" version))
582 (sha256
583 (base32
584 "0mbng9m7swfc0dnidipbzlxfhlfjrv755dlnha5s4m9mgdxb1fhc"))))
585 (build-system python-build-system)
586 (arguments
587 ;; tests don't support django 1.10, but the module seems to work.
588 `(#:tests? #f))
589 (native-inputs
590 `(("six" ,python-six)
591 ("jsonfield" ,python-django-jsonfield)
592 ("python-dj-database-url" ,python-dj-database-url)))
593 (propagated-inputs
594 `(("python-django" ,python-django)))
595 (home-page "https://github.com/aykut/django-bulk-update")
596 (synopsis "Simple bulk update over Django ORM or with helper function")
597 (description
598 "Simple bulk update over Django ORM or with helper function. This
599project aims to bulk update given objects using one query over Django ORM.")
600 (license license:expat)))
601
602(define-public python2-django-bulk-update
603 (package-with-python2 python-django-bulk-update))
03a34e87
JL
604
605(define-public python-django-contact-form
606 (package
607 (name "python-django-contact-form")
608 (version "1.3")
609 (source (origin
610 (method url-fetch)
611 (uri (pypi-uri "django-contact-form" version))
612 (sha256
613 (base32
614 "0az590y56k5ahv4sixrkn54d3a8ig2q2z9pl6s3m4f533mx2gj17"))))
615 (build-system python-build-system)
616 (arguments
617 `(#:phases
618 (modify-phases %standard-phases
619 (replace 'check
620 (lambda _
621 ;; the next version will need "make test"
de6be023
RW
622 (invoke "flake8" "contact_form")
623 (invoke "coverage" "run" "contact_form/runtests.py")
624 (invoke "coverage" "report" "-m" "--fail-under" "0"))))))
03a34e87
JL
625 (native-inputs
626 `(("python-coverage" ,python-coverage)
627 ("python-flake8" ,python-flake8)))
628 (propagated-inputs
629 `(("python-django" ,python-django)))
630 (home-page "https://github.com/ubernostrum/django-contact-form")
631 (synopsis "Contact form for Django")
632 (description
633 "This application provides simple, extensible contact-form functionality
634for Django sites.")
635 (license license:bsd-3)))
636
637(define-public python2-django-contact-form
638 (package-with-python2 python-django-contact-form))
659692c0
JL
639
640(define-public python-django-contrib-comments
641 (package
642 (name "python-django-contrib-comments")
643 (version "1.8.0")
644 (source (origin
645 (method url-fetch)
646 (uri (pypi-uri "django-contrib-comments" version))
647 (sha256
648 (base32
649 "0bxsgw8jrkhg6r5s0z6ksfi4w8yknaqb1s9acmxd9pm3pnsnp5kx"))))
650 (build-system python-build-system)
651 (propagated-inputs
652 `(("python-django" ,python-django)))
653 (home-page "https://github.com/django/django-contrib-comments")
654 (synopsis "Comments framework")
655 (description
656 "Django used to include a comments framework; since Django 1.6 it's been
657separated to a separate project. This is that project. This framework can be
658used to attach comments to any model, so you can use it for comments on blog
659entries, photos, book chapters, or anything else.")
660 (license license:bsd-3)))
661
662(define-public python2-django-contrib-comments
663 (package-with-python2 python-django-contrib-comments))
93246253
JL
664
665(define-public python-django-overextends
666 (package
667 (name "python-django-overextends")
668 (version "0.4.3")
669 (source (origin
670 (method url-fetch)
671 (uri (pypi-uri "django-overextends" version))
672 (sha256
673 (base32
674 "0qc2pcf3i56pmfxh2jw7k3pgljd8xzficmkl2541n7bkcbngqfzm"))))
675 (build-system python-build-system)
676 (arguments
677 `(#:phases
678 (modify-phases %standard-phases
679 (replace 'check
dd2f0cdb 680 (lambda _ (invoke "./test_project/manage.py" "test"))))))
93246253
JL
681 (propagated-inputs
682 `(("python-django" ,python-django)))
683 (native-inputs
684 `(("sphinx-me" ,python-sphinx-me)))
685 (home-page "https://github.com/stephenmcd/django-overextends")
686 (synopsis "Circular template inheritance")
687 (description
688 "A Django reusable app providing the overextends template tag, a drop-in
689replacement for Django's extends tag, which allows you to use circular template
690inheritance. The primary use-case for overextends is to simultaneously
691override and extend templates from other reusable apps, in your own Django
692project.")
693 (license license:bsd-2)))
694
695(define-public python2-django-overextends
696 (package-with-python2 python-django-overextends))
b939953b 697
6cd1bbd0
CB
698(define-public python-django-pipeline
699 (package
700 (name "python-django-pipeline")
701 (version "1.6.14")
702 (source
703 (origin
704 (method url-fetch)
705 (uri (pypi-uri "django-pipeline" version))
706 (sha256
707 (base32
708 "1a207y71r7za033ira0qmh2yrgp5rq0l04gw2fg9b8jri7sslrzg"))))
709 (build-system python-build-system)
710 (arguments
711 '(#:phases
712 (modify-phases %standard-phases
713 (add-after 'unpack 'patch-source
714 (lambda _
715 (substitute* "tests/tests/test_compiler.py"
716 (("\\/usr\\/bin\\/env")
717 (which "env")))))
718 (replace 'check
719 (lambda*(#:key tests? #:allow-other-keys)
720 (or
721 (not tests?)
722 (begin
74eee9f2
TGR
723 (setenv "PYTHONPATH"
724 (string-append (getcwd) ":"
725 (getenv "PYTHONPATH")))
6cd1bbd0
CB
726 (setenv "DJANGO_SETTINGS_MODULE" "tests.settings")
727 (invoke "django-admin" "test" "tests"))))))))
728 (propagated-inputs
729 `(("python-django" ,python-django)
730 ("python-slimit" ,python-slimit)
731 ("python-jsmin" ,python-jsmin)))
732 (home-page
733 "https://github.com/jazzband/django-pipeline")
734 (synopsis "Asset packaging library for Django")
735 (description
736 "Pipeline is an asset packaging library for Django, providing both CSS
737and JavaScript concatenation and compression, built-in JavaScript template
738support, and optional data-URI image and font embedding.")
739 (license license:expat)))
740
b939953b
JL
741(define-public python-django-redis
742 (package
743 (name "python-django-redis")
f55fe42b 744 (version "4.10.0")
b939953b
JL
745 (source (origin
746 (method url-fetch)
747 (uri (pypi-uri "django-redis" version))
748 (sha256
749 (base32
f55fe42b 750 "1rxcwnv9ik0swkwvfqdi9i9baw6n8if5pj6q63fjh4p9chw3j2xg"))))
b939953b
JL
751 (build-system python-build-system)
752 (arguments
753 `(#:phases
754 (modify-phases %standard-phases
755 (replace 'check
756 (lambda _
f55fe42b
JL
757 (invoke "redis-server" "--daemonize" "yes")
758 (with-directory-excursion "tests"
759 (invoke "python" "runtests.py")))))))
b939953b
JL
760 (native-inputs
761 `(("python-fakeredis" ,python-fakeredis)
762 ("python-hiredis" ,python-hiredis)
763 ("python-mock" ,python-mock)
764 ("python-msgpack" ,python-msgpack)
765 ("redis" ,redis)))
766 (propagated-inputs
767 `(("python-django" ,python-django)
768 ("python-redis" ,python-redis)))
769 (home-page "https://github.com/niwibe/django-redis")
770 (synopsis "Full featured redis cache backend for Django")
771 (description
772 "Full featured redis cache backend for Django.")
773 (license license:bsd-3)))
774
775(define-public python2-django-redis
776 (package-with-python2 python-django-redis))
cb9b6095
JL
777
778(define-public python-django-rq
779 (package
780 (name "python-django-rq")
103cdcd4 781 (version "1.3.1")
cb9b6095
JL
782 (source (origin
783 (method url-fetch)
784 (uri (pypi-uri "django-rq" version))
785 (sha256
786 (base32
103cdcd4 787 "1ips1ikv5qhgwb58ssn496vgqg9qv6jinwmwbrg9l3s75fskd1l5"))))
cb9b6095
JL
788 (build-system python-build-system)
789 (arguments
790 `(#:phases
791 (modify-phases %standard-phases
792 (replace 'check
793 (lambda _
13968371
JL
794 (invoke "redis-server" "--daemonize" "yes")
795 (invoke "django-admin.py" "test" "django_rq"
796 "--settings=django_rq.tests.settings"
797 "--pythonpath="))))))
cb9b6095 798 (native-inputs
13968371
JL
799 `(("python-mock" ,python-mock)
800 ("redis" ,redis)))
cb9b6095
JL
801 (propagated-inputs
802 `(("python-django" ,python-django)
803 ("python-rq" ,python-rq)))
804 (home-page "https://github.com/ui/django-rq")
805 (synopsis "Django integration with RQ")
806 (description
807 "Django integration with RQ, a Redis based Python queuing library.
808Django-RQ is a simple app that allows you to configure your queues in django's
809settings.py and easily use them in your project.")
810 (license license:expat)))
811
812(define-public python2-django-rq
813 (package-with-python2 python-django-rq))
b0395dd6
JL
814
815(define-public python-django-sortedm2m
816 (package
817 (name "python-django-sortedm2m")
818 (version "1.3.3")
819 (source (origin
820 (method url-fetch)
821 (uri (pypi-uri "django-sortedm2m" version))
822 (sha256
823 (base32
824 "0axf765i7b3c2s83nlph47asi8s071dhq8l7y382v1pw785s22vi"))))
825 (build-system python-build-system)
826 (arguments
827 ;; no tests.
828 `(#:tests? #f))
829 (propagated-inputs
830 `(("python-django" ,python-django)))
831 (home-page "https://github.com/gregmuellegger/django-sortedm2m")
832 (synopsis "Drop-in replacement for django's own ManyToManyField")
833 (description
834 "Sortedm2m is a drop-in replacement for django's own ManyToManyField.
835The provided SortedManyToManyField behaves like the original one but remembers
836the order of added relations.")
837 (license license:bsd-3)))
838
839(define-public python2-django-sortedm2m
840 (package-with-python2 python-django-sortedm2m))
9f4a3059
JL
841
842(define-public python-django-appconf
843 (package
844 (name "python-django-appconf")
ea282711 845 (version "1.0.3")
9f4a3059
JL
846 (source (origin
847 (method url-fetch)
848 (uri (pypi-uri "django-appconf" version))
849 (sha256
850 (base32
ea282711 851 "1qw0p9qh78bvkgi38ba58djwn0rd5j1lrkg2c2wk5wb7snj3rw9m"))))
9f4a3059
JL
852 (build-system python-build-system)
853 (propagated-inputs
ea282711
TGR
854 `(("python-django" ,python-django)
855 ("python-six" ,python-six)))
9f4a3059
JL
856 (home-page "https://github.com/django-compressor/django-appconf")
857 (synopsis "Handle configuration defaults of packaged Django apps")
858 (description
859 "This app precedes Django's own AppConfig classes that act as \"objects
860[to] store metadata for an application\" inside Django's app loading mechanism.
861In other words, they solve a related but different use case than
862django-appconf and can't easily be used as a replacement. The similarity in
863name is purely coincidental.")
864 (license license:bsd-3)))
865
866(define-public python2-django-appconf
867 (package-with-python2 python-django-appconf))
f77d82f1
JL
868
869(define-public python-django-statici18n
870 (package
871 (name "python-django-statici18n")
872 (version "1.3.0")
873 (source (origin
874 (method url-fetch)
875 (uri (pypi-uri "django-statici18n" version))
876 (sha256
877 (base32
878 "0alcf4g1nv69njhq5k3qw4mfl2k6dc18bik5nk0g1mnp3m8zyz7k"))))
879 (build-system python-build-system)
880 (propagated-inputs
881 `(("python-django" ,python-django)
882 ("django-appconf" ,python-django-appconf)))
883 (home-page "https://github.com/zyegfryed/django-statici18n")
884 (synopsis "Generate JavaScript catalog to static files")
885 (description
886 "A Django app that provides helper for generating JavaScript catalog to
887static files.")
888 (license license:bsd-3)))
889
890(define-public python2-django-statici18n
891 (package-with-python2 python-django-statici18n))
2601171e
JL
892
893(define-public pootle
894 (package
895 (name "pootle")
b95d758b 896 (version "2.8.2")
2601171e
JL
897 (source
898 (origin
899 (method url-fetch)
900 (uri (pypi-uri "Pootle" version ".tar.bz2"))
901 (sha256
902 (base32
b95d758b 903 "1ng8igq0alsqzasgxdh3fb23581anyzp121h9041pwdzzv98kn4m"))))
2601171e
JL
904 (build-system python-build-system)
905 (arguments
906 `(; pootle supports only python2.
907 #:python ,python-2
908 ;; tests are not run and fail with "pytest_pootle/data/po/.tmp: No such
909 ;; file or directory". If we create this directory,
910 ;; pytest_pootle/data/po/terminology.po is missing.
911 #:tests? #f
912 #:phases
913 (modify-phases %standard-phases
914 (add-before 'build 'fix-requirements
915 (lambda _
916 (substitute* "Pootle.egg-info/requires.txt"
917 (("1.7.3") "1.8.0")
918 (("2.0.0") "2.1.0"))
919 (substitute* "requirements/tests.txt"
920 (("==3.0.6") ">=3.0.6"))
921 (substitute* "requirements/base.txt"
922 (("1.7.3") "1.8.0")
923 (("2.0.0") "2.1.0")))))))
924 (propagated-inputs
925 `(("django-allauth" ,python2-django-allauth)
926 ("django-assets" ,python2-django-assets)
927 ("django-bulk-update" ,python2-django-bulk-update)
928 ("django-contact-form" ,python2-django-contact-form)
929 ("django-contrib-comments" ,python2-django-contrib-comments)
930 ("django-overextends" ,python2-django-overextends)
931 ("django-redis" ,python2-django-redis)
932 ("django-rq" ,python2-django-rq)
933 ("django-sortedm2m" ,python2-django-sortedm2m)
934 ("django-statici18n" ,python2-django-statici18n)
935 ("babel" ,python2-babel)
936 ("cssmin" ,python2-cssmin)
937 ("diff-match-patch" ,python2-diff-match-patch)
938 ("dirsync" ,python2-dirsync)
939 ("elasticsearch" ,python2-elasticsearch)
940 ("jsonfield" ,python2-django-jsonfield)
941 ("lxml" ,python2-lxml)
942 ("dateutil" ,python2-dateutil)
943 ("levenshtein" ,python2-levenshtein)
944 ("mysqlclient" ,python2-mysqlclient)
945 ("psycopg2" ,python2-psycopg2)
946 ("pytz" ,python2-pytz)
947 ("rq" ,python2-rq)
948 ("scandir" ,python2-scandir)
949 ("stemming" ,python2-stemming)
950 ("translate-toolkit" ,python2-translate-toolkit)))
951 (native-inputs
c8ccf7c5 952 `(("python2-pytest" ,python2-pytest)
2601171e
JL
953 ("python2-pytest-django" ,python2-pytest-django)
954 ("python2-pytest-catchlog" ,python2-pytest-catchlog)
955 ("python2-pytest-cov" ,python2-pytest-cov)
956 ("python2-factory-boy" ,python2-factory-boy)))
a3696828 957 (home-page "https://pootle.translatehouse.org/")
2601171e
JL
958 (synopsis "Community localization server")
959 (description
960 "Pootle is an online translation and localization tool. It works to
961lower the barrier of entry, providing tools to enable teams to work towards
962higher quality while welcoming newcomers.")
963 (license license:gpl3+)))
40fac51a
RW
964
965(define-public python-django-tagging
966 (package
967 (name "python-django-tagging")
968 (version "0.4.6")
969 (source
970 (origin
971 (method url-fetch)
972 (uri (pypi-uri "django-tagging" version))
973 (sha256
974 (base32
975 "0s7b4v45j783yaxs7rni10k24san0ya77nqz4s7zdf3jhfpk42r1"))))
976 (build-system python-build-system)
977 (home-page "https://github.com/Fantomas42/django-tagging")
978 (synopsis "Generic tagging application for Django")
979 (description "This package provides a generic tagging application for
980Django projects, which allows association of a number of tags with any
981@code{Model} instance and makes retrieval of tags simple.")
982 (license license:bsd-3)))
983
984(define-public python2-django-tagging
985 (package-with-python2 python-django-tagging))
d5f56e90
CB
986
987(define-public python-djangorestframework
988 (package
989 (name "python-djangorestframework")
990 (version "3.7.7")
991 (source
992 (origin
993 (method url-fetch)
994 (uri (pypi-uri "djangorestframework" version))
995 (sha256
996 (base32
997 "11qv117gqwswxjljs7wafxg1hyzzlx3qrviwlk9hw41bsbl997lz"))))
998 (build-system python-build-system)
999 (arguments
1000 '(;; No included tests
1001 #:tests? #f))
1002 (propagated-inputs
1003 `(("python-django" ,python-django)))
1004 (home-page "https://www.django-rest-framework.org")
1005 (synopsis "Toolkit for building Web APIs with Django")
1006 (description
1007 "The Django REST framework is for building Web APIs with Django. It
1008provides features like a web browseable API and authentication policies.")
1009 (license license:bsd-2)))
cc534f0c
CB
1010
1011(define-public python-django-crispy-forms
1012 (package
1013 (name "python-django-crispy-forms")
65ff6ab9 1014 (version "1.7.2")
cc534f0c
CB
1015 (source
1016 (origin
1017 (method url-fetch)
1018 (uri (pypi-uri "django-crispy-forms" version))
1019 (sha256
1020 (base32
65ff6ab9 1021 "0pv7y648i8iz7mf64gkjizpbx5d01ap2s4vqqa30n38if6wvlljr"))))
cc534f0c
CB
1022 (build-system python-build-system)
1023 (arguments
1024 '(;; No included tests
1025 #:tests? #f))
1026 (propagated-inputs
1027 `(("python-django" ,python-django)))
1028 (home-page
1029 "http://github.com/maraujop/django-crispy-forms")
1030 (synopsis "Tool to control Django forms without custom templates")
1031 (description
1032 "@code{django-crispy-forms} lets you easily build, customize and reuse
1033forms using your favorite CSS framework, without writing template code.")
1034 (license license:expat)))
8b209bb6
VV
1035
1036(define-public python-django-override-storage
1037 (package
1038 (name "python-django-override-storage")
373403bb 1039 (version "0.1.6")
8b209bb6
VV
1040 (source
1041 (origin
1042 (method url-fetch)
1043 (uri (pypi-uri "django-override-storage" version))
1044 (sha256
373403bb 1045 (base32 "022arq94lxnlyykn8wvfnkykhi2dldnsn93pa2i41na551i0wpiv"))))
8b209bb6
VV
1046 (build-system python-build-system)
1047 (propagated-inputs
1048 `(("python-django" ,python-django)))
1049 (home-page
1050 "https://github.com/danifus/django-override-storage")
1051 (synopsis "Django test helpers to manage file storage side effects")
1052 (description
1053 "This project provides tools to help reduce the side effects of using
1054FileFields during tests.")
1055 (license license:expat)))