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