gnu: Add ruby-commander.
[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>
23b563dc 3;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
4a78fd46 4;;; Copyright © 2017 Nils Gillmann <ng0@n0.is>
65ff6ab9 5;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
40fac51a 6;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
8b209bb6 7;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
d18197af
HG
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)
b939953b 31 #:use-module (gnu packages databases)
ac257f12 32 #:use-module (gnu packages check)
1b2f753d 33 #:use-module (gnu packages python)
33dc54b0 34 #:use-module (gnu packages python-web)
44d10b1f 35 #:use-module (gnu packages python-xyz)
33dc54b0 36 #:use-module (gnu packages time))
d18197af
HG
37
38(define-public python-django
39 (package
40 (name "python-django")
93617188 41 (version "1.11.20")
d18197af
HG
42 (source (origin
43 (method url-fetch)
44 (uri (pypi-uri "Django" version))
45 (sha256
46 (base32
93617188 47 "0h90kdq8r4y8wa73hdxmyy5psnwlg61dcq3qsa098cpfiyh9vaa3"))))
d18197af
HG
48 (build-system python-build-system)
49 (arguments
0458ab53
JB
50 '(#:modules ((srfi srfi-1)
51 (guix build python-build-system)
52 (guix build utils))
53 #:phases
d18197af
HG
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
0458ab53 64 (lambda* (#:key inputs #:allow-other-keys)
d18197af
HG
65 (setenv "PYTHONPATH"
66 (string-append ".:" (getenv "PYTHONPATH")))
0458ab53
JB
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 "', ")))
4665d8c9 77 (invoke "python" "tests/runtests.py"))))))
d18197af 78 ;; TODO: Install extras/django_bash_completion.
dfdaea32 79 (native-inputs
c695fb76 80 `(("tzdata" ,tzdata-for-tests)
dfdaea32 81 ;; bcrypt and argon2-cffi are extra requirements not yet in guix
d18197af
HG
82 ;;("python-argon2-cffi" ,python-argon2-cffi) ; >= 16.1.0
83 ;;("python-bcrypt" ,python-bcrypt) ; not py-bcrypt!
dfdaea32
HG
84 ;; Remaining packages are test requirements taken from
85 ;; tests/requirements/py3.txt
d18197af
HG
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)
d18197af
HG
93 ;; optional for tests: ("python-selenium" ,python-selenium)
94 ("python-sqlparse" ,python-sqlparse)
95 ("python-tblib" ,python-tblib)))
0458ab53
JB
96 (propagated-inputs
97 `(("python-pytz" ,python-pytz)))
d18197af
HG
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
102development and clean, pragmatic design. It provides many tools for building
103any Web site. Django focuses on automating as much as possible and adhering
104to the @dfn{don't repeat yourself} (DRY) principle.")
105 (license license:bsd-3)
33b25201
MB
106 (properties `((python2-variant . ,(delay python2-django))
107 (cpe-name . "django")))))
d18197af
HG
108
109(define-public python2-django
110 (let ((base (package-with-python2 (strip-python2-variant python-django))))
111 (package
112 (inherit base)
dfdaea32
HG
113 (native-inputs
114 `(;; Test requirements for Python 2 taken from
115 ;; tests/requirements/py3.txt: enum34 and mock.
d18197af
HG
116 ("python2-enum34" ,python2-enum34)
117 ("python2-mock" ,python2-mock)
118 ;; When adding memcached mind: for Python 2 memcached <= 1.53 is
119 ;; required.
cda5e76f 120 ,@(package-native-inputs base))))))
b53fc294
HG
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)
281cc11c
MB
133 (arguments
134 ;; FIXME: Upstream uses a 'runtests.py' script that is not
135 ;; present in the pypi tarball.
136 '(#:tests? #f))
b53fc294
HG
137 (propagated-inputs
138 `(("python-django" ,python-django)))
b53fc294
HG
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,
143with no settings.py configuration necessary, but instead can be configured
144with 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))
23b563dc
EF
149
150(define-public python-pytest-django
151 (package
152 (name "python-pytest-django")
919d4ad0 153 (version "3.1.2")
23b563dc
EF
154 (source (origin
155 (method url-fetch)
156 (uri (pypi-uri "pytest-django" version))
157 (sha256
158 (base32
919d4ad0 159 "02932m2sr8x22m4az8syr8g835g4ak77varrnw71n6xakmdcr303"))))
23b563dc
EF
160 (build-system python-build-system)
161 (arguments
1f31a5e0
MB
162 `(#:tests? #f ; FIXME: How to run tests?
163 #:phases
23b563dc
EF
164 (modify-phases %standard-phases
165 (add-after 'unpack 'patch-setuppy
166 (lambda _
167 (substitute* "setup.py"
919d4ad0 168 (("setuptools_scm==1.11.1") "setuptools_scm"))
23b563dc
EF
169 #t)))))
170 (native-inputs
d18c69aa
EF
171 `(("python-django" ,python-django)
172 ("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 173 (propagated-inputs
2dd12924 174 `(("python-pytest" ,python-pytest)))
23b563dc
EF
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
178useful tools for testing Django applications and projects.")
23b563dc
EF
179 (license license:bsd-3)))
180
181(define-public python2-pytest-django
5c31f4aa 182 (package-with-python2 python-pytest-django))
894810c7
EF
183
184(define-public python-django-filter
185 (package
186 (name "python-django-filter")
da90f337 187 (version "1.1.0")
894810c7
EF
188 (source (origin
189 (method url-fetch)
190 (uri (pypi-uri "django-filter" version))
191 (sha256
192 (base32
da90f337 193 "0slpfqfhnjrzlrb6vmswyhrzn01p84s16j2x1xib35gg4fxg23pc"))))
894810c7 194 (build-system python-build-system)
55ab6451
MB
195 (arguments
196 '(#:phases
197 (modify-phases %standard-phases
198 (replace 'check
199 (lambda _
7b282105 200 (invoke "python" "runtests.py"))))))
fa7cd333
EF
201 (native-inputs
202 `(("python-django" ,python-django)
da90f337 203 ("python-djangorestframework" ,python-djangorestframework)
c695fb76 204 ("python-django-crispy-forms" ,python-django-crispy-forms)
fa7cd333 205 ("python-mock" ,python-mock)))
894810c7
EF
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
210some of the more mundane bits of view code. Specifically, it allows users to
211filter down a queryset based on a model’s fields, displaying the form to let
212them do this.")
894810c7
EF
213 (license license:bsd-3)))
214
215(define-public python2-django-filter
5c31f4aa 216 (package-with-python2 python-django-filter))
e1f06e11 217
218(define-public python-django-allauth
219 (package
220 (name "python-django-allauth")
221 (version "0.30.0")
222 (source
223 (origin
224 (method url-fetch)
225 (uri (pypi-uri "django-allauth" version))
226 (sha256
227 (base32
228 "1fslqc5qqb0b66yscvkyjwfv8cnbfx5nlkpnwimyb3pf1nc1w7r3"))))
229 (build-system python-build-system)
17dc2a09
CB
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 (("def test_login")
238 "from django.test import tag
239 @tag('requires-web')
240 def test_login"))))
241 (replace 'check
242 (lambda _
243 (setenv "DJANGO_SETTINGS_MODULE" "test_settings")
244 (zero? (system*
245 "django-admin"
246 "test"
247 "allauth"
248 "--verbosity=2"
249 "--exclude-tag=requires-web")))))))
e1f06e11 250 (propagated-inputs
251 `(("python-openid" ,python-openid)
252 ("python-requests" ,python-requests)
253 ("python-requests-oauthlib" ,python-requests-oauthlib)))
254 (native-inputs
255 `(("python-mock" ,python-mock)))
256 (inputs
257 `(("python-django" ,python-django)))
258 (home-page "https://github.com/pennersr/django-allauth")
259 (synopsis "Set of Django applications addressing authentication")
260 (description
261 "Integrated set of Django applications addressing authentication,
262registration, account management as well as 3rd party (social)
263account authentication.")
264 (license license:expat)))
265
266(define-public python2-django-allauth
267 (package-with-python2 python-django-allauth))
14d8f653 268
be02d4df
CB
269(define-public python-django-debug-toolbar
270 (package
271 (name "python-django-debug-toolbar")
272 (version "1.10.1")
273 (source
274 (origin
275 (method url-fetch)
276 (uri (string-append
277 "https://github.com/jazzband/django-debug-toolbar/archive/"
278 version ".tar.gz"))
279 (file-name (string-append name "-" version ".tar.gz"))
280 (sha256
281 (base32
282 "1rww056hyzks8spbgf4h7kf6ybxlc5p08a2b6gn1nqrrzs4yx9sy"))))
283 (build-system python-build-system)
284 (propagated-inputs
285 `(("python-sqlparse" ,python-sqlparse)
286 ("python-django" ,python-django)))
287 (native-inputs
288 `(("python-django-jinja" ,python-django-jinja)
289 ("python-html5lib" ,python-html5lib)))
290 (arguments
291 '(#:phases
292 (modify-phases %standard-phases
293 (replace 'check
294 (lambda _
295 (invoke "make" "test"))))))
296 (home-page
297 "https://github.com/jazzband/django-debug-toolbar")
298 (synopsis "Toolbar to help with developing Django applications")
299 (description
300 "A configurable set of panels that display information about the current
301request and response as a toolbar on the rendered page.")
302 (license license:bsd-3)))
303
14d8f653 304(define-public python-django-gravatar2
305 (package
306 (name "python-django-gravatar2")
16bd3291 307 (version "1.4.2")
14d8f653 308 (source
309 (origin
310 (method url-fetch)
311 (uri (pypi-uri "django-gravatar2" version))
312 (sha256
313 (base32
16bd3291 314 "1qsv40xywbqsf4mkrmsswrpzqd7nfljxpfiim9an2z3dykn5rka6"))))
14d8f653 315 (build-system python-build-system)
16bd3291
CB
316 (arguments
317 '(;; TODO: The django project for the tests is missing from the release.
318 #:tests? #f))
14d8f653 319 (inputs
320 `(("python-django" ,python-django)))
321 (home-page "https://github.com/twaddington/django-gravatar")
322 (synopsis "Gravatar support for Django, improved version")
323 (description
324 "Essential Gravatar support for Django. Features helper methods,
325templatetags and a full test suite.")
326 (license license:expat)))
327
328(define-public python2-django-gravatar2
329 (package-with-python2 python-django-gravatar2))
01c64cb8
JL
330
331(define-public python-django-assets
332 (package
333 (name "python-django-assets")
334 (version "0.12")
335 (source (origin
336 (method url-fetch)
337 (uri (pypi-uri "django-assets" version))
338 (sha256
339 (base32
340 "0y0007fvkn1rdlj2g0y6k1cnkx53kxab3g8i85i0rd58k335p365"))))
341 (build-system python-build-system)
342 (arguments
343 `(#:phases
344 (modify-phases %standard-phases
345 (add-before 'check 'fix-tests
346 (lambda _
347 (begin
348 ;; https://github.com/miracle2k/django-assets/issues/87
349 (substitute* "tests/__init__.py"
350 (("settings.configure.*")
351 (string-append
352 "settings.configure(\n"
353 "INSTALLED_APPS=['django_assets', "
354 "'django.contrib.staticfiles'],\n"
355 "TEMPLATES=[{'BACKEND': "
356 "'django.template.backends.django.DjangoTemplates'}],\n"
357 ")\n")))
358 ;; These tests fail
359 (substitute* "tests/test_django.py"
360 (("TestLoader") "NoTestLoader"))))))))
361 (native-inputs
362 `(("python-nose" ,python-nose)))
363 (propagated-inputs
364 `(("python-django" ,python-django)
365 ("python-webassets" ,python-webassets)))
366 (home-page "https://github.com/miracle2k/django-assets")
367 (synopsis "Asset management for Django")
368 (description
369 "Asset management for Django, to compress and merge CSS and Javascript
370files. Integrates the webassets library with Django, adding support for
371merging, minifying and compiling CSS and Javascript files.")
372 (license license:bsd-2)))
373
374(define-public python2-django-assets
375 (package-with-python2 python-django-assets))
6c17e963 376
a2e92596
CB
377(define-public python-django-jinja
378 (package
379 (name "python-django-jinja")
380 (version "2.4.1")
381 (source
382 (origin
383 (method url-fetch)
384 (uri (string-append
385 "https://github.com/niwinz/django-jinja/archive/"
386 version ".tar.gz"))
387 (file-name (string-append name "-" version ".tar.gz"))
388 (sha256
389 (base32
390 "0bzrb4m6wx9ph5cpvz7wpvg5k6ksvj0dnxlg0nhhqskhvp46brs1"))))
391 (build-system python-build-system)
392 (propagated-inputs
393 `(("python-django" ,python-django)
394 ("python-jinja2" ,python-jinja2)
395 ("python-pytz" ,python-pytz)
396 ("python-django-pipeline" ,python-django-pipeline)))
397 (arguments
398 '(;; TODO Tests currently fail due to issues with the configuration for
399 ;; django-pipeline
400 #:tests? #f
401 #:phases
402 (modify-phases %standard-phases
403 (replace 'check
404 (lambda* (#:key tests? #:allow-other-keys)
405 (or
406 (not tests?)
407 (with-directory-excursion "testing"
408 (invoke "python" "runtests.py"))))))))
409 (home-page
410 "https://niwinz.github.io/django-jinja/latest/")
411 (synopsis "Simple jinja2 templating backend for Django")
412 (description
413 "This package provides a templating backend for Django, using Jinja2. It
414provides certain advantages over the builtin Jinja2 backend in Django, for
415example, explicit calls to callables from templates and better performance.")
416 (license license:bsd-3)))
417
6c17e963
JL
418(define-public python-django-jsonfield
419 (package
420 (name "python-django-jsonfield")
421 (version "1.0.3")
422 (source (origin
423 (method url-fetch)
424 (uri (pypi-uri "jsonfield" version))
425 (sha256
426 (base32
427 "19x4lak0hg9c20r7mvf27w7i8r6i4sg2g0ypmlmp2665fnk76zvy"))))
428 (build-system python-build-system)
429 (arguments
430 `(#:phases
431 (modify-phases %standard-phases
432 (add-before 'check 'fix-tests
433 (lambda _
434 (substitute* "jsonfield/tests.py"
435 (("django.forms.util") "django.forms.utils")))))))
436 (propagated-inputs
437 `(("python-django" ,python-django)))
438 (home-page "https://github.com/bradjasper/django-jsonfield")
439 (synopsis "Store validated JSON in your model")
440 (description
441 "Django-jsonfield is a reusable Django field that allows you to store
442validated JSON in your model. It silently takes care of serialization. To
443use, simply add the field to one of your models.")
444 (license license:expat)))
445
446(define-public python2-django-jsonfield
447 (package-with-python2 python-django-jsonfield))
a326384b
JL
448
449(define-public python-dj-database-url
450 (package
451 (name "python-dj-database-url")
452 (version "0.4.2")
453 (source (origin
454 (method url-fetch)
455 (uri (pypi-uri "dj-database-url" version))
456 (sha256
457 (base32
458 "024zbkc5rli4hia9lz9g8kf1zxhb2gwawj5abf67i7gf8n22v0x6"))))
459 (build-system python-build-system)
460 (home-page "https://github.com/kennethreitz/dj-database-url")
461 (synopsis "Use Database URLs in your Django Application")
462 (description
463 "This simple Django utility allows you to utilize the 12factor inspired
464DATABASE_URL environment variable to configure your Django application.
465
466The dj_database_url.config method returns a Django database connection
467dictionary, populated with all the data specified in your URL. There is also a
468conn_max_age argument to easily enable Django’s connection pool.")
469 (license license:bsd-2)))
470
471(define-public python2-dj-database-url
472 (package-with-python2 python-dj-database-url))
afbfe564
JL
473
474(define-public python-django-bulk-update
475 (package
476 (name "python-django-bulk-update")
477 (version "1.1.10")
478 (source (origin
479 (method url-fetch)
480 (uri (pypi-uri "django-bulk-update" version))
481 (sha256
482 (base32
483 "0mbng9m7swfc0dnidipbzlxfhlfjrv755dlnha5s4m9mgdxb1fhc"))))
484 (build-system python-build-system)
485 (arguments
486 ;; tests don't support django 1.10, but the module seems to work.
487 `(#:tests? #f))
488 (native-inputs
489 `(("six" ,python-six)
490 ("jsonfield" ,python-django-jsonfield)
491 ("python-dj-database-url" ,python-dj-database-url)))
492 (propagated-inputs
493 `(("python-django" ,python-django)))
494 (home-page "https://github.com/aykut/django-bulk-update")
495 (synopsis "Simple bulk update over Django ORM or with helper function")
496 (description
497 "Simple bulk update over Django ORM or with helper function. This
498project aims to bulk update given objects using one query over Django ORM.")
499 (license license:expat)))
500
501(define-public python2-django-bulk-update
502 (package-with-python2 python-django-bulk-update))
03a34e87
JL
503
504(define-public python-django-contact-form
505 (package
506 (name "python-django-contact-form")
507 (version "1.3")
508 (source (origin
509 (method url-fetch)
510 (uri (pypi-uri "django-contact-form" version))
511 (sha256
512 (base32
513 "0az590y56k5ahv4sixrkn54d3a8ig2q2z9pl6s3m4f533mx2gj17"))))
514 (build-system python-build-system)
515 (arguments
516 `(#:phases
517 (modify-phases %standard-phases
518 (replace 'check
519 (lambda _
520 ;; the next version will need "make test"
521 (and (zero? (system* "flake8" "contact_form"))
522 (zero? (system* "coverage" "run" "contact_form/runtests.py"))
523 (zero? (system* "coverage" "report" "-m" "--fail-under" "0"))))))))
524 (native-inputs
525 `(("python-coverage" ,python-coverage)
526 ("python-flake8" ,python-flake8)))
527 (propagated-inputs
528 `(("python-django" ,python-django)))
529 (home-page "https://github.com/ubernostrum/django-contact-form")
530 (synopsis "Contact form for Django")
531 (description
532 "This application provides simple, extensible contact-form functionality
533for Django sites.")
534 (license license:bsd-3)))
535
536(define-public python2-django-contact-form
537 (package-with-python2 python-django-contact-form))
659692c0
JL
538
539(define-public python-django-contrib-comments
540 (package
541 (name "python-django-contrib-comments")
542 (version "1.8.0")
543 (source (origin
544 (method url-fetch)
545 (uri (pypi-uri "django-contrib-comments" version))
546 (sha256
547 (base32
548 "0bxsgw8jrkhg6r5s0z6ksfi4w8yknaqb1s9acmxd9pm3pnsnp5kx"))))
549 (build-system python-build-system)
550 (propagated-inputs
551 `(("python-django" ,python-django)))
552 (home-page "https://github.com/django/django-contrib-comments")
553 (synopsis "Comments framework")
554 (description
555 "Django used to include a comments framework; since Django 1.6 it's been
556separated to a separate project. This is that project. This framework can be
557used to attach comments to any model, so you can use it for comments on blog
558entries, photos, book chapters, or anything else.")
559 (license license:bsd-3)))
560
561(define-public python2-django-contrib-comments
562 (package-with-python2 python-django-contrib-comments))
93246253
JL
563
564(define-public python-django-overextends
565 (package
566 (name "python-django-overextends")
567 (version "0.4.3")
568 (source (origin
569 (method url-fetch)
570 (uri (pypi-uri "django-overextends" version))
571 (sha256
572 (base32
573 "0qc2pcf3i56pmfxh2jw7k3pgljd8xzficmkl2541n7bkcbngqfzm"))))
574 (build-system python-build-system)
575 (arguments
576 `(#:phases
577 (modify-phases %standard-phases
578 (replace 'check
579 (lambda _
580 (zero? (system* "./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
589replacement for Django's extends tag, which allows you to use circular template
590inheritance. The primary use-case for overextends is to simultaneously
591override and extend templates from other reusable apps, in your own Django
592project.")
593 (license license:bsd-2)))
594
595(define-public python2-django-overextends
596 (package-with-python2 python-django-overextends))
b939953b 597
6cd1bbd0
CB
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
634and JavaScript concatenation and compression, built-in JavaScript template
635support, and optional data-URI image and font embedding.")
636 (license license:expat)))
637
b939953b
JL
638(define-public python-django-redis
639 (package
640 (name "python-django-redis")
641 (version "4.7.0")
642 (source (origin
643 (method url-fetch)
644 (uri (pypi-uri "django-redis" version))
645 (sha256
646 (base32
647 "0yyyxv8n9l9dhs893jsqwg2cxqkkc79g719n9dzzzqgkzialv1c1"))))
648 (build-system python-build-system)
649 (arguments
650 `(#:phases
651 (modify-phases %standard-phases
652 (replace 'check
653 (lambda _
654 (and (zero? (system* "redis-server" "--daemonize" "yes"))
655 (with-directory-excursion "tests"
656 (zero? (system* "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))
cb9b6095
JL
674
675(define-public python-django-rq
676 (package
677 (name "python-django-rq")
678 (version "0.9.4")
679 (source (origin
680 (method url-fetch)
681 (uri (pypi-uri "django-rq" version))
682 (sha256
683 (base32
684 "04v8ilfdp10bk31fxgh4cn083gsn5m06342cnpm5d10nd8hc0vky"))))
685 (build-system python-build-system)
686 (arguments
687 `(#:phases
688 (modify-phases %standard-phases
689 (replace 'check
690 (lambda _
691 (and (zero? (system* "redis-server" "--daemonize" "yes"))
692 (zero? (system* "django-admin.py" "test" "django_rq"
693 "--settings=django_rq.test_settings"
694 "--pythonpath="))))))))
695 (native-inputs
696 `(("redis" ,redis)))
697 (propagated-inputs
698 `(("python-django" ,python-django)
699 ("python-rq" ,python-rq)))
700 (home-page "https://github.com/ui/django-rq")
701 (synopsis "Django integration with RQ")
702 (description
703 "Django integration with RQ, a Redis based Python queuing library.
704Django-RQ is a simple app that allows you to configure your queues in django's
705settings.py and easily use them in your project.")
706 (license license:expat)))
707
708(define-public python2-django-rq
709 (package-with-python2 python-django-rq))
b0395dd6
JL
710
711(define-public python-django-sortedm2m
712 (package
713 (name "python-django-sortedm2m")
714 (version "1.3.3")
715 (source (origin
716 (method url-fetch)
717 (uri (pypi-uri "django-sortedm2m" version))
718 (sha256
719 (base32
720 "0axf765i7b3c2s83nlph47asi8s071dhq8l7y382v1pw785s22vi"))))
721 (build-system python-build-system)
722 (arguments
723 ;; no tests.
724 `(#:tests? #f))
725 (propagated-inputs
726 `(("python-django" ,python-django)))
727 (home-page "https://github.com/gregmuellegger/django-sortedm2m")
728 (synopsis "Drop-in replacement for django's own ManyToManyField")
729 (description
730 "Sortedm2m is a drop-in replacement for django's own ManyToManyField.
731The provided SortedManyToManyField behaves like the original one but remembers
732the order of added relations.")
733 (license license:bsd-3)))
734
735(define-public python2-django-sortedm2m
736 (package-with-python2 python-django-sortedm2m))
9f4a3059
JL
737
738(define-public python-django-appconf
739 (package
740 (name "python-django-appconf")
741 (version "1.0.2")
742 (source (origin
743 (method url-fetch)
744 (uri (pypi-uri "django-appconf" version))
745 (sha256
746 (base32
747 "0qdjdx35g66xjsc50v0c5h3kg6njs8df33mbjx6j4k1vd3m9lkba"))))
748 (build-system python-build-system)
749 (propagated-inputs
750 `(("python-django" ,python-django)))
751 (home-page "https://github.com/django-compressor/django-appconf")
752 (synopsis "Handle configuration defaults of packaged Django apps")
753 (description
754 "This app precedes Django's own AppConfig classes that act as \"objects
755[to] store metadata for an application\" inside Django's app loading mechanism.
756In other words, they solve a related but different use case than
757django-appconf and can't easily be used as a replacement. The similarity in
758name is purely coincidental.")
759 (license license:bsd-3)))
760
761(define-public python2-django-appconf
762 (package-with-python2 python-django-appconf))
f77d82f1
JL
763
764(define-public python-django-statici18n
765 (package
766 (name "python-django-statici18n")
767 (version "1.3.0")
768 (source (origin
769 (method url-fetch)
770 (uri (pypi-uri "django-statici18n" version))
771 (sha256
772 (base32
773 "0alcf4g1nv69njhq5k3qw4mfl2k6dc18bik5nk0g1mnp3m8zyz7k"))))
774 (build-system python-build-system)
775 (propagated-inputs
776 `(("python-django" ,python-django)
777 ("django-appconf" ,python-django-appconf)))
778 (home-page "https://github.com/zyegfryed/django-statici18n")
779 (synopsis "Generate JavaScript catalog to static files")
780 (description
781 "A Django app that provides helper for generating JavaScript catalog to
782static files.")
783 (license license:bsd-3)))
784
785(define-public python2-django-statici18n
786 (package-with-python2 python-django-statici18n))
2601171e
JL
787
788(define-public pootle
789 (package
790 (name "pootle")
791 (version "2.8.0rc5")
792 (source
793 (origin
794 (method url-fetch)
795 (uri (pypi-uri "Pootle" version ".tar.bz2"))
796 (sha256
797 (base32
798 "0m6qcpkcy22dk3ad5y2k8851kqg2w6vrkywgy4vabwbacd7r1mvn"))))
799 (build-system python-build-system)
800 (arguments
801 `(; pootle supports only python2.
802 #:python ,python-2
803 ;; tests are not run and fail with "pytest_pootle/data/po/.tmp: No such
804 ;; file or directory". If we create this directory,
805 ;; pytest_pootle/data/po/terminology.po is missing.
806 #:tests? #f
807 #:phases
808 (modify-phases %standard-phases
809 (add-before 'build 'fix-requirements
810 (lambda _
811 (substitute* "Pootle.egg-info/requires.txt"
812 (("1.7.3") "1.8.0")
813 (("2.0.0") "2.1.0"))
814 (substitute* "requirements/tests.txt"
815 (("==3.0.6") ">=3.0.6"))
816 (substitute* "requirements/base.txt"
817 (("1.7.3") "1.8.0")
818 (("2.0.0") "2.1.0")))))))
819 (propagated-inputs
820 `(("django-allauth" ,python2-django-allauth)
821 ("django-assets" ,python2-django-assets)
822 ("django-bulk-update" ,python2-django-bulk-update)
823 ("django-contact-form" ,python2-django-contact-form)
824 ("django-contrib-comments" ,python2-django-contrib-comments)
825 ("django-overextends" ,python2-django-overextends)
826 ("django-redis" ,python2-django-redis)
827 ("django-rq" ,python2-django-rq)
828 ("django-sortedm2m" ,python2-django-sortedm2m)
829 ("django-statici18n" ,python2-django-statici18n)
830 ("babel" ,python2-babel)
831 ("cssmin" ,python2-cssmin)
832 ("diff-match-patch" ,python2-diff-match-patch)
833 ("dirsync" ,python2-dirsync)
834 ("elasticsearch" ,python2-elasticsearch)
835 ("jsonfield" ,python2-django-jsonfield)
836 ("lxml" ,python2-lxml)
837 ("dateutil" ,python2-dateutil)
838 ("levenshtein" ,python2-levenshtein)
839 ("mysqlclient" ,python2-mysqlclient)
840 ("psycopg2" ,python2-psycopg2)
841 ("pytz" ,python2-pytz)
842 ("rq" ,python2-rq)
843 ("scandir" ,python2-scandir)
844 ("stemming" ,python2-stemming)
845 ("translate-toolkit" ,python2-translate-toolkit)))
846 (native-inputs
c8ccf7c5 847 `(("python2-pytest" ,python2-pytest)
2601171e
JL
848 ("python2-pytest-django" ,python2-pytest-django)
849 ("python2-pytest-catchlog" ,python2-pytest-catchlog)
850 ("python2-pytest-cov" ,python2-pytest-cov)
851 ("python2-factory-boy" ,python2-factory-boy)))
852 (home-page "http://pootle.translatehouse.org/")
853 (synopsis "Community localization server")
854 (description
855 "Pootle is an online translation and localization tool. It works to
856lower the barrier of entry, providing tools to enable teams to work towards
857higher quality while welcoming newcomers.")
858 (license license:gpl3+)))
40fac51a
RW
859
860(define-public python-django-tagging
861 (package
862 (name "python-django-tagging")
863 (version "0.4.6")
864 (source
865 (origin
866 (method url-fetch)
867 (uri (pypi-uri "django-tagging" version))
868 (sha256
869 (base32
870 "0s7b4v45j783yaxs7rni10k24san0ya77nqz4s7zdf3jhfpk42r1"))))
871 (build-system python-build-system)
872 (home-page "https://github.com/Fantomas42/django-tagging")
873 (synopsis "Generic tagging application for Django")
874 (description "This package provides a generic tagging application for
875Django projects, which allows association of a number of tags with any
876@code{Model} instance and makes retrieval of tags simple.")
877 (license license:bsd-3)))
878
879(define-public python2-django-tagging
880 (package-with-python2 python-django-tagging))
d5f56e90
CB
881
882(define-public python-djangorestframework
883 (package
884 (name "python-djangorestframework")
885 (version "3.7.7")
886 (source
887 (origin
888 (method url-fetch)
889 (uri (pypi-uri "djangorestframework" version))
890 (sha256
891 (base32
892 "11qv117gqwswxjljs7wafxg1hyzzlx3qrviwlk9hw41bsbl997lz"))))
893 (build-system python-build-system)
894 (arguments
895 '(;; No included tests
896 #:tests? #f))
897 (propagated-inputs
898 `(("python-django" ,python-django)))
899 (home-page "https://www.django-rest-framework.org")
900 (synopsis "Toolkit for building Web APIs with Django")
901 (description
902 "The Django REST framework is for building Web APIs with Django. It
903provides features like a web browseable API and authentication policies.")
904 (license license:bsd-2)))
cc534f0c
CB
905
906(define-public python-django-crispy-forms
907 (package
908 (name "python-django-crispy-forms")
65ff6ab9 909 (version "1.7.2")
cc534f0c
CB
910 (source
911 (origin
912 (method url-fetch)
913 (uri (pypi-uri "django-crispy-forms" version))
914 (sha256
915 (base32
65ff6ab9 916 "0pv7y648i8iz7mf64gkjizpbx5d01ap2s4vqqa30n38if6wvlljr"))))
cc534f0c
CB
917 (build-system python-build-system)
918 (arguments
919 '(;; No included tests
920 #:tests? #f))
921 (propagated-inputs
922 `(("python-django" ,python-django)))
923 (home-page
924 "http://github.com/maraujop/django-crispy-forms")
925 (synopsis "Tool to control Django forms without custom templates")
926 (description
927 "@code{django-crispy-forms} lets you easily build, customize and reuse
928forms using your favorite CSS framework, without writing template code.")
929 (license license:expat)))
8b209bb6
VV
930
931(define-public python-django-override-storage
932 (package
933 (name "python-django-override-storage")
934 (version "0.1.4")
935 (source
936 (origin
937 (method url-fetch)
938 (uri (pypi-uri "django-override-storage" version))
939 (sha256
940 (base32
941 "0sqz1mh0yn8b1bzz2gr2azfiynljigm5gkzavp5n17zd3j2jg57x"))))
942 (build-system python-build-system)
943 (propagated-inputs
944 `(("python-django" ,python-django)))
945 (home-page
946 "https://github.com/danifus/django-override-storage")
947 (synopsis "Django test helpers to manage file storage side effects")
948 (description
949 "This project provides tools to help reduce the side effects of using
950FileFields during tests.")
951 (license license:expat)))