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