Commit | Line | Data |
---|---|---|
d18197af HG |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com> | |
e1302edb | 3 | ;;; Copyright © 2016, 2019, 2020 Efraim Flashner <efraim@flashner.co.il> |
3c986a7d | 4 | ;;; Copyright © 2017 Nikita <nikita@n0.is> |
ea282711 | 5 | ;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr> |
40fac51a | 6 | ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net> |
8b209bb6 | 7 | ;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com> |
52c3cb26 | 8 | ;;; Copyright © 2019 Sam <smbaines8@gmail.com> |
ac3103e8 | 9 | ;;; Copyright © 2020 Marius Bakke <marius@gnu.org> |
d18197af HG |
10 | ;;; |
11 | ;;; This file is part of GNU Guix. | |
12 | ;;; | |
13 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
14 | ;;; under the terms of the GNU General Public License as published by | |
15 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
16 | ;;; your option) any later version. | |
17 | ;;; | |
18 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
19 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
20 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
21 | ;;; GNU General Public License for more details. | |
22 | ;;; | |
23 | ;;; You should have received a copy of the GNU General Public License | |
24 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
25 | ||
26 | (define-module (gnu packages django) | |
27 | #:use-module ((guix licenses) #:prefix license:) | |
28 | #:use-module (guix packages) | |
29 | #:use-module (guix download) | |
52c3cb26 | 30 | #:use-module (guix git-download) |
d18197af HG |
31 | #:use-module (guix build-system python) |
32 | #:use-module (gnu packages) | |
33 | #:use-module (gnu packages base) | |
b939953b | 34 | #:use-module (gnu packages databases) |
ac257f12 | 35 | #:use-module (gnu packages check) |
4a82decd | 36 | #:use-module (gnu packages geo) |
1b2f753d | 37 | #:use-module (gnu packages python) |
da3dbd61 | 38 | #:use-module (gnu packages python-compression) |
3f8041f9 | 39 | #:use-module (gnu packages python-crypto) |
33dc54b0 | 40 | #:use-module (gnu packages python-web) |
44d10b1f | 41 | #:use-module (gnu packages python-xyz) |
9d0c291e | 42 | #:use-module (gnu packages sphinx) |
55e1475c MB |
43 | #:use-module (gnu packages time) |
44 | #:use-module (gnu packages xml)) | |
d18197af HG |
45 | |
46 | (define-public python-django | |
47 | (package | |
48 | (name "python-django") | |
ac3103e8 | 49 | (version "3.1.1") |
d18197af HG |
50 | (source (origin |
51 | (method url-fetch) | |
52 | (uri (pypi-uri "Django" version)) | |
53 | (sha256 | |
54 | (base32 | |
ac3103e8 | 55 | "0bzwy58hrxbsh7szak1yfh7qvvfnpdpi8ay1x7d3pvbkm1f15j2r")))) |
d18197af HG |
56 | (build-system python-build-system) |
57 | (arguments | |
ac3103e8 | 58 | '(#:phases |
d18197af | 59 | (modify-phases %standard-phases |
ac3103e8 | 60 | (add-before 'check 'pre-check |
d18197af HG |
61 | (lambda* (#:key inputs #:allow-other-keys) |
62 | ;; The test-suite tests timezone-dependent functions, thus tzdata | |
63 | ;; needs to be available. | |
64 | (setenv "TZDIR" | |
65 | (string-append (assoc-ref inputs "tzdata") | |
66 | "/share/zoneinfo")) | |
ac3103e8 MB |
67 | |
68 | ;; Disable test for incorrect timezone: it only raises the | |
69 | ;; expected error when /usr/share/zoneinfo exists, even though | |
70 | ;; the machinery gracefully falls back to TZDIR. According to | |
71 | ;; django/conf/__init__.py, lack of /usr/share/zoneinfo is | |
72 | ;; harmless, so just ignore this test. | |
73 | (substitute* "tests/settings_tests/tests.py" | |
74 | ((".*def test_incorrect_timezone.*" all) | |
75 | (string-append " @unittest.skipIf(True, 'Disabled by Guix')\n" | |
76 | all))) | |
77 | ||
78 | ;; Preserve the PYTHONPATH created by Guix when running the tests. | |
0458ab53 JB |
79 | (substitute* "tests/admin_scripts/tests.py" |
80 | (("python_path = \\[") | |
81 | (string-append "python_path = ['" | |
ac3103e8 MB |
82 | (string-join |
83 | (string-split (getenv "PYTHONPATH") #\:) | |
84 | "','") | |
0458ab53 | 85 | "', "))) |
ac3103e8 MB |
86 | |
87 | #t)) | |
88 | (replace 'check | |
89 | (lambda _ | |
90 | (with-directory-excursion "tests" | |
91 | (setenv "PYTHONPATH" | |
92 | (string-append "..:" (getenv "PYTHONPATH"))) | |
93 | (invoke "python" "runtests.py" | |
94 | ;; By default tests run in parallel, which may cause | |
95 | ;; various race conditions. Run sequentially for | |
96 | ;; consistent results. | |
97 | "--parallel=1"))))))) | |
d18197af | 98 | ;; TODO: Install extras/django_bash_completion. |
dfdaea32 | 99 | (native-inputs |
c695fb76 | 100 | `(("tzdata" ,tzdata-for-tests) |
dfdaea32 HG |
101 | ;; Remaining packages are test requirements taken from |
102 | ;; tests/requirements/py3.txt | |
d18197af HG |
103 | ("python-docutils" ,python-docutils) |
104 | ;; optional for tests: ("python-geoip2" ,python-geoip2) | |
105 | ("python-jinja2" ,python-jinja2) ; >= 2.7 | |
106 | ;; optional for tests: ("python-memcached" ,python-memcached) | |
107 | ("python-numpy" ,python-numpy) | |
108 | ("python-pillow" ,python-pillow) | |
109 | ("python-pyyaml" ,python-pyyaml) | |
d18197af | 110 | ;; optional for tests: ("python-selenium" ,python-selenium) |
d18197af | 111 | ("python-tblib" ,python-tblib))) |
0458ab53 | 112 | (propagated-inputs |
3f8041f9 | 113 | `(("python-argon2-cffi" ,python-argon2-cffi) |
ac3103e8 | 114 | ("python-asgiref" ,python-asgiref) |
3f8041f9 | 115 | ("python-bcrypt" ,python-bcrypt) |
60c964ab MB |
116 | ("python-pytz" ,python-pytz) |
117 | ||
118 | ;; This input is not strictly required, but in practice many Django | |
119 | ;; libraries need it for test suites and similar. | |
120 | ("python-sqlparse" ,python-sqlparse))) | |
8198c19c | 121 | (home-page "https://www.djangoproject.com/") |
d18197af HG |
122 | (synopsis "High-level Python Web framework") |
123 | (description | |
124 | "Django is a high-level Python Web framework that encourages rapid | |
125 | development and clean, pragmatic design. It provides many tools for building | |
126 | any Web site. Django focuses on automating as much as possible and adhering | |
127 | to the @dfn{don't repeat yourself} (DRY) principle.") | |
128 | (license license:bsd-3) | |
33b25201 MB |
129 | (properties `((python2-variant . ,(delay python2-django)) |
130 | (cpe-name . "django"))))) | |
d18197af HG |
131 | |
132 | (define-public python2-django | |
133 | (let ((base (package-with-python2 (strip-python2-variant python-django)))) | |
134 | (package | |
135 | (inherit base) | |
dfdaea32 HG |
136 | (native-inputs |
137 | `(;; Test requirements for Python 2 taken from | |
138 | ;; tests/requirements/py3.txt: enum34 and mock. | |
d18197af HG |
139 | ("python2-enum34" ,python2-enum34) |
140 | ("python2-mock" ,python2-mock) | |
141 | ;; When adding memcached mind: for Python 2 memcached <= 1.53 is | |
142 | ;; required. | |
cda5e76f | 143 | ,@(package-native-inputs base)))))) |
b53fc294 | 144 | |
ac3103e8 MB |
145 | (define-public python-django-2.2 |
146 | (package | |
147 | (inherit python-django) | |
148 | (version "2.2.16") | |
149 | (source (origin | |
150 | (method url-fetch) | |
151 | (uri (pypi-uri "Django" version)) | |
152 | (sha256 | |
153 | (base32 | |
154 | "1535g2r322cl4x52fb0dmzlbg23539j2wx6027j54p22xvjlbkv2")))) | |
155 | (native-inputs | |
156 | `(;; XXX: In 2.2 and 3.0, selenium is required for the test suite. | |
157 | ("python-selenium" ,python-selenium) | |
158 | ,@(package-native-inputs python-django))))) | |
159 | ||
52c3cb26 S |
160 | (define-public python-django-extensions |
161 | (package | |
162 | (name "python-django-extensions") | |
0cac0e0b | 163 | (version "3.0.6") |
52c3cb26 S |
164 | (source |
165 | (origin | |
166 | (method git-fetch) | |
167 | ;; Fetch from the git repository, so that the tests can be run. | |
168 | (uri (git-reference | |
b0e7b699 | 169 | (url "https://github.com/django-extensions/django-extensions") |
52c3cb26 S |
170 | (commit version))) |
171 | (file-name (string-append name "-" version)) | |
172 | (sha256 | |
173 | (base32 | |
0cac0e0b | 174 | "0sra6hazqvspxd1pnx5cj7gia1rkaz3hn06ib4wd0frc167f5afy")))) |
52c3cb26 S |
175 | (build-system python-build-system) |
176 | (arguments | |
0cac0e0b | 177 | '(#:tests? #f)) ;XXX: requires a Postgres or MySQL database |
52c3cb26 S |
178 | (propagated-inputs |
179 | `(("python-six" ,python-six) | |
180 | ("python-vobject" ,python-vobject) | |
181 | ("python-werkzeug" ,python-werkzeug) | |
182 | ("python-dateutil" ,python-dateutil) | |
183 | ("python-django" ,python-django))) | |
184 | (native-inputs | |
185 | `(("python-mock" ,python-mock) | |
186 | ("python-factory-boy" ,python-factory-boy) | |
187 | ("python-tox" ,python-tox) | |
188 | ("python-pytest" ,python-pytest) | |
189 | ("python-pytest-cov" ,python-pytest-cov) | |
190 | ("python-pytest-django" ,python-pytest-django) | |
191 | ("python-shortuuid" , python-shortuuid))) | |
192 | (home-page | |
193 | "https://github.com/django-extensions/django-extensions") | |
194 | (synopsis "Custom management extensions for Django") | |
195 | (description | |
196 | "Django-extensions extends Django providing, for example, management | |
197 | commands, additional database fields and admin extensions.") | |
198 | (license license:expat))) | |
199 | ||
b53fc294 HG |
200 | (define-public python-django-simple-math-captcha |
201 | (package | |
202 | (name "python-django-simple-math-captcha") | |
9fb6275e MB |
203 | (version "1.0.9") |
204 | (home-page "https://github.com/alsoicode/django-simple-math-captcha") | |
b53fc294 | 205 | (source (origin |
9fb6275e MB |
206 | (method git-fetch) |
207 | (uri (git-reference | |
208 | (url home-page) | |
209 | (commit (string-append "v" version)))) | |
210 | (file-name (git-file-name name version)) | |
b53fc294 HG |
211 | (sha256 |
212 | (base32 | |
9fb6275e | 213 | "0fhy9k8haqa1296v0qpg1b5w7y3pyw9qi9z9laj5ijry1gk35qaw")))) |
b53fc294 | 214 | (build-system python-build-system) |
281cc11c | 215 | (arguments |
9fb6275e MB |
216 | '(#:phases (modify-phases %standard-phases |
217 | (add-after 'unpack 'patch-six-imports | |
218 | (lambda _ | |
219 | ;; Django no longer bundles six, adjust the imports | |
220 | ;; accordingly. The six dependency can likely be | |
221 | ;; removed in the next version. | |
222 | (substitute* (find-files "." "\\.py$") | |
223 | (("from django\\.utils import six") | |
224 | "import six")) | |
225 | #t)) | |
226 | (replace 'check | |
227 | (lambda _ | |
228 | (invoke "python" "runtests.py")))))) | |
229 | (native-inputs | |
230 | `(("python-mock" ,python-mock))) | |
b53fc294 | 231 | (propagated-inputs |
9fb6275e MB |
232 | `(("python-django" ,python-django) |
233 | ("python-six" ,python-six))) | |
b53fc294 HG |
234 | (synopsis "Easy-to-use math field/widget captcha for Django forms") |
235 | (description | |
236 | "A multi-value-field that presents a human answerable question, | |
237 | with no settings.py configuration necessary, but instead can be configured | |
238 | with arguments to the field constructor.") | |
239 | (license license:asl2.0))) | |
240 | ||
241 | (define-public python2-django-simple-math-captcha | |
242 | (package-with-python2 python-django-simple-math-captcha)) | |
23b563dc | 243 | |
04eba1d0 EF |
244 | (define-public python-django-classy-tags |
245 | (package | |
246 | (name "python-django-classy-tags") | |
1fe17bc3 | 247 | (version "2.0.0") |
04eba1d0 EF |
248 | (source |
249 | (origin | |
250 | (method url-fetch) | |
251 | (uri (pypi-uri "django-classy-tags" version)) | |
252 | (sha256 | |
253 | (base32 | |
1fe17bc3 | 254 | "1javam3zqi3y3j0r490mm61v48yh75jaha99gb7lsxkaz6yri7fm")))) |
04eba1d0 | 255 | (build-system python-build-system) |
1fe17bc3 MB |
256 | ;; FIXME: How to make the test templates available to Django? |
257 | (arguments '(#:tests? #f)) | |
04eba1d0 | 258 | (propagated-inputs |
1fe17bc3 | 259 | `(("python-django" ,python-django))) |
04eba1d0 EF |
260 | (home-page "https://github.com/divio/django-classy-tags") |
261 | (synopsis "Class based template tags for Django") | |
262 | (description | |
263 | "@code{django-classy-tags} is an approach at making writing template tags | |
264 | in Django easier, shorter and more fun. It provides an extensible argument | |
265 | parser which reduces most of the boiler plate code you usually have to write | |
266 | when coding custom template tags.") | |
267 | (license license:bsd-3))) | |
268 | ||
8d73558d S |
269 | (define-public python-django-taggit |
270 | (package | |
271 | (name "python-django-taggit") | |
9eccb181 | 272 | (version "1.3.0") |
8d73558d S |
273 | (source |
274 | (origin | |
275 | (method url-fetch) | |
276 | (uri (pypi-uri "django-taggit" version)) | |
277 | (sha256 | |
278 | (base32 | |
9eccb181 | 279 | "0bbkabbs77z229ps0800gxfhf75yagp4x4j5jzfysbac3zvkp0sa")))) |
8d73558d S |
280 | (build-system python-build-system) |
281 | (arguments | |
282 | '(#:phases | |
283 | (modify-phases %standard-phases | |
284 | (replace 'check | |
285 | (lambda _ | |
286 | (invoke "python3" "-m" "django" "test" "--settings=tests.settings")))))) | |
287 | (propagated-inputs | |
288 | `(("python-django" ,python-django) | |
289 | ("python-isort" ,python-isort))) | |
290 | (native-inputs | |
291 | `(("python-pytest" ,python-pytest) | |
292 | ("python-mock" ,python-mock))) | |
293 | (home-page | |
294 | "https://github.com/jazzband/django-taggit") | |
295 | (synopsis | |
296 | "Reusable Django application for simple tagging") | |
297 | (description | |
298 | "Django-taggit is a reusable Django application for simple tagging.") | |
299 | (license license:bsd-3))) | |
9ae3e791 CB |
300 | |
301 | (define-public python-easy-thumbnails | |
302 | (package | |
303 | (name "python-easy-thumbnails") | |
304 | (version "2.7") | |
305 | (source | |
306 | (origin | |
307 | (method url-fetch) | |
308 | (uri (pypi-uri "easy-thumbnails" version)) | |
309 | (sha256 | |
310 | (base32 | |
311 | "14gzp5cv24z0qhxb7f7k7v9jgzpaj4n8yhjq83ynpx8183fs1rz4")))) | |
312 | (build-system python-build-system) | |
313 | (propagated-inputs | |
314 | `(("python-django" ,python-django) | |
315 | ("python-pillow" ,python-pillow))) | |
316 | (home-page "https://github.com/SmileyChris/easy-thumbnails") | |
317 | (synopsis "Easy thumbnails for Django") | |
318 | (description | |
319 | "Easy thumbnails is a Django plugin to dynamically create thumbnails | |
320 | based on source images. Multiple thumbnails can be created from a single | |
321 | source image, using different options to control parameters like the image | |
322 | size and quality.") | |
323 | (license license:bsd-3))) | |
8d73558d | 324 | |
23b563dc EF |
325 | (define-public python-pytest-django |
326 | (package | |
327 | (name "python-pytest-django") | |
92607967 | 328 | (version "3.10.0") |
23b563dc EF |
329 | (source (origin |
330 | (method url-fetch) | |
331 | (uri (pypi-uri "pytest-django" version)) | |
332 | (sha256 | |
333 | (base32 | |
92607967 | 334 | "19nvqsb7b9kz3ikpb50m8ppf7mfhzrapdxsqd5hhd1pdfz8dprjd")))) |
23b563dc EF |
335 | (build-system python-build-system) |
336 | (arguments | |
92607967 | 337 | `(#:phases |
23b563dc | 338 | (modify-phases %standard-phases |
92607967 MB |
339 | (replace 'check |
340 | (lambda* (#:key tests? inputs outputs #:allow-other-keys) | |
341 | (if tests? | |
342 | (begin | |
343 | (add-installed-pythonpath inputs outputs) | |
344 | (setenv "PYTHONPATH" | |
345 | (string-append ".:" ;for pytest_django_test | |
346 | (getenv "PYTHONPATH"))) | |
347 | (setenv "PYTEST_DJANGO_TEST_RUNNER" "pytest") | |
348 | (setenv "DJANGO_SETTINGS_MODULE" | |
349 | "pytest_django_test.settings_sqlite_file") | |
350 | (invoke "pytest" "-vv" "-k" | |
351 | ;; FIXME: these tests fail to locate Django templates ... | |
352 | (string-append "not test_django_not_loaded_without_settings" | |
353 | " and not test_settings" | |
354 | ;; ... and this does not discover | |
355 | ;; 'pytest_django_test'. | |
356 | " and not test_urls_cache_is_cleared"))) | |
357 | (format #t "test suite not run~%")) | |
23b563dc EF |
358 | #t))))) |
359 | (native-inputs | |
d18c69aa | 360 | `(("python-django" ,python-django) |
92607967 MB |
361 | ("python-setuptools-scm" ,python-setuptools-scm) |
362 | ||
363 | ;; For tests. | |
364 | ("python-pytest-xdist" ,python-pytest-xdist))) | |
f22efa01 | 365 | (propagated-inputs |
2dd12924 | 366 | `(("python-pytest" ,python-pytest))) |
16c896e8 | 367 | (home-page "https://pytest-django.readthedocs.org/") |
23b563dc EF |
368 | (synopsis "Django plugin for py.test") |
369 | (description "Pytest-django is a plugin for py.test that provides a set of | |
370 | useful tools for testing Django applications and projects.") | |
23b563dc EF |
371 | (license license:bsd-3))) |
372 | ||
373 | (define-public python2-pytest-django | |
5c31f4aa | 374 | (package-with-python2 python-pytest-django)) |
894810c7 | 375 | |
4a82decd EF |
376 | (define-public python-django-haystack |
377 | (package | |
378 | (name "python-django-haystack") | |
379 | (version "2.8.1") | |
380 | (source | |
381 | (origin | |
382 | (method url-fetch) | |
383 | (uri (pypi-uri "django-haystack" version)) | |
384 | (sha256 | |
385 | (base32 | |
386 | "1302fqsrx8w474xk5cmnmg3hjqfprlxnjg9qlg86arsr4v4vqm4b")))) | |
387 | (build-system python-build-system) | |
388 | (arguments | |
389 | '(#:phases | |
390 | (modify-phases %standard-phases | |
391 | (add-after 'unpack 'loosen-verion-restrictions | |
392 | (lambda _ | |
393 | (substitute* "setup.py" | |
394 | (("geopy.*") "geopy',\n")) | |
395 | #t)) | |
396 | (add-before 'check 'set-gdal-lib-path | |
397 | (lambda* (#:key inputs #:allow-other-keys) | |
398 | (setenv "GDAL_LIBRARY_PATH" | |
399 | (string-append (assoc-ref inputs "gdal") | |
400 | "/lib")) | |
401 | #t))) | |
402 | #:tests? #f)) ; OSError: libgdal.so.27: cannot open shared object file | |
403 | (propagated-inputs | |
404 | `(("python-django" ,python-django))) | |
405 | (native-inputs | |
406 | `(("gdal" ,gdal) | |
407 | ("python-coverage" ,python-coverage) | |
408 | ("python-dateutil" ,python-dateutil) | |
409 | ("python-geopy" ,python-geopy) | |
410 | ("python-mock" ,python-mock) | |
411 | ("python-nose" ,python-nose) | |
412 | ("python-requests" ,python-requests) | |
413 | ("python-setuptools-scm" ,python-setuptools-scm) | |
414 | ("python-pysolr" ,python-pysolr) | |
415 | ("python-whoosh" ,python-whoosh))) | |
416 | (home-page "http://haystacksearch.org/") | |
417 | (synopsis "Pluggable search for Django") | |
418 | (description "Haystack provides modular search for Django. It features a | |
419 | unified, familiar API that allows you to plug in different search backends | |
420 | (such as Solr, Elasticsearch, Whoosh, Xapian, etc.) without having to modify | |
421 | your code.") | |
422 | (license license:bsd-3))) | |
423 | ||
894810c7 EF |
424 | (define-public python-django-filter |
425 | (package | |
426 | (name "python-django-filter") | |
357f5863 | 427 | (version "2.3.0") |
894810c7 EF |
428 | (source (origin |
429 | (method url-fetch) | |
430 | (uri (pypi-uri "django-filter" version)) | |
431 | (sha256 | |
432 | (base32 | |
357f5863 | 433 | "1bz5qzdk9pk4a2lp2yacrdnqmkv24vxnz4k3lykrnpc3b7bkvrhi")))) |
894810c7 | 434 | (build-system python-build-system) |
55ab6451 MB |
435 | (arguments |
436 | '(#:phases | |
437 | (modify-phases %standard-phases | |
438 | (replace 'check | |
439 | (lambda _ | |
7b282105 | 440 | (invoke "python" "runtests.py")))))) |
fa7cd333 EF |
441 | (native-inputs |
442 | `(("python-django" ,python-django) | |
da90f337 | 443 | ("python-djangorestframework" ,python-djangorestframework) |
c695fb76 | 444 | ("python-django-crispy-forms" ,python-django-crispy-forms) |
fa7cd333 | 445 | ("python-mock" ,python-mock))) |
894810c7 EF |
446 | (home-page "https://django-filter.readthedocs.io/en/latest/") |
447 | (synopsis "Reusable Django application to filter querysets dynamically") | |
448 | (description | |
449 | "Django-filter is a generic, reusable application to alleviate writing | |
450 | some of the more mundane bits of view code. Specifically, it allows users to | |
451 | filter down a queryset based on a model’s fields, displaying the form to let | |
452 | them do this.") | |
894810c7 EF |
453 | (license license:bsd-3))) |
454 | ||
455 | (define-public python2-django-filter | |
5c31f4aa | 456 | (package-with-python2 python-django-filter)) |
e1f06e11 | 457 | |
458 | (define-public python-django-allauth | |
459 | (package | |
460 | (name "python-django-allauth") | |
6c0131b3 | 461 | (version "0.42.0") |
e1f06e11 | 462 | (source |
463 | (origin | |
464 | (method url-fetch) | |
465 | (uri (pypi-uri "django-allauth" version)) | |
466 | (sha256 | |
467 | (base32 | |
6c0131b3 | 468 | "0c0x8izvrnjhrr48w6pwsfk9ddbi6yfxg7v3hh5dm1vz1d0hjwpi")))) |
e1f06e11 | 469 | (build-system python-build-system) |
17dc2a09 CB |
470 | (arguments |
471 | '(#:phases | |
472 | (modify-phases %standard-phases | |
17dc2a09 CB |
473 | (replace 'check |
474 | (lambda _ | |
475 | (setenv "DJANGO_SETTINGS_MODULE" "test_settings") | |
5b1a9e07 EF |
476 | (invoke "django-admin" "test" "allauth.tests" |
477 | "--pythonpath=.")))))) | |
e1f06e11 | 478 | (propagated-inputs |
479 | `(("python-openid" ,python-openid) | |
480 | ("python-requests" ,python-requests) | |
481 | ("python-requests-oauthlib" ,python-requests-oauthlib))) | |
482 | (native-inputs | |
483 | `(("python-mock" ,python-mock))) | |
484 | (inputs | |
485 | `(("python-django" ,python-django))) | |
486 | (home-page "https://github.com/pennersr/django-allauth") | |
487 | (synopsis "Set of Django applications addressing authentication") | |
488 | (description | |
489 | "Integrated set of Django applications addressing authentication, | |
490 | registration, account management as well as 3rd party (social) | |
491 | account authentication.") | |
492 | (license license:expat))) | |
493 | ||
494 | (define-public python2-django-allauth | |
495 | (package-with-python2 python-django-allauth)) | |
14d8f653 | 496 | |
be02d4df CB |
497 | (define-public python-django-debug-toolbar |
498 | (package | |
499 | (name "python-django-debug-toolbar") | |
500 | (version "1.10.1") | |
501 | (source | |
502 | (origin | |
854d4d40 EF |
503 | (method git-fetch) |
504 | (uri (git-reference | |
b0e7b699 | 505 | (url "https://github.com/jazzband/django-debug-toolbar") |
854d4d40 EF |
506 | (commit version))) |
507 | (file-name (git-file-name name version)) | |
be02d4df CB |
508 | (sha256 |
509 | (base32 | |
854d4d40 | 510 | "0zr6yjsms97wlvvd17rdbrx01irkg887dn9x70c1hzfjmfvp9afk")))) |
be02d4df CB |
511 | (build-system python-build-system) |
512 | (propagated-inputs | |
513 | `(("python-sqlparse" ,python-sqlparse) | |
514 | ("python-django" ,python-django))) | |
515 | (native-inputs | |
516 | `(("python-django-jinja" ,python-django-jinja) | |
517 | ("python-html5lib" ,python-html5lib))) | |
518 | (arguments | |
519 | '(#:phases | |
520 | (modify-phases %standard-phases | |
521 | (replace 'check | |
522 | (lambda _ | |
523 | (invoke "make" "test")))))) | |
524 | (home-page | |
525 | "https://github.com/jazzband/django-debug-toolbar") | |
526 | (synopsis "Toolbar to help with developing Django applications") | |
527 | (description | |
528 | "A configurable set of panels that display information about the current | |
529 | request and response as a toolbar on the rendered page.") | |
530 | (license license:bsd-3))) | |
531 | ||
14d8f653 | 532 | (define-public python-django-gravatar2 |
533 | (package | |
534 | (name "python-django-gravatar2") | |
16bd3291 | 535 | (version "1.4.2") |
14d8f653 | 536 | (source |
537 | (origin | |
538 | (method url-fetch) | |
539 | (uri (pypi-uri "django-gravatar2" version)) | |
540 | (sha256 | |
541 | (base32 | |
16bd3291 | 542 | "1qsv40xywbqsf4mkrmsswrpzqd7nfljxpfiim9an2z3dykn5rka6")))) |
14d8f653 | 543 | (build-system python-build-system) |
16bd3291 CB |
544 | (arguments |
545 | '(;; TODO: The django project for the tests is missing from the release. | |
546 | #:tests? #f)) | |
14d8f653 | 547 | (inputs |
548 | `(("python-django" ,python-django))) | |
549 | (home-page "https://github.com/twaddington/django-gravatar") | |
550 | (synopsis "Gravatar support for Django, improved version") | |
551 | (description | |
552 | "Essential Gravatar support for Django. Features helper methods, | |
553 | templatetags and a full test suite.") | |
554 | (license license:expat))) | |
555 | ||
556 | (define-public python2-django-gravatar2 | |
557 | (package-with-python2 python-django-gravatar2)) | |
01c64cb8 JL |
558 | |
559 | (define-public python-django-assets | |
560 | (package | |
561 | (name "python-django-assets") | |
562 | (version "0.12") | |
563 | (source (origin | |
564 | (method url-fetch) | |
565 | (uri (pypi-uri "django-assets" version)) | |
566 | (sha256 | |
567 | (base32 | |
568 | "0y0007fvkn1rdlj2g0y6k1cnkx53kxab3g8i85i0rd58k335p365")))) | |
569 | (build-system python-build-system) | |
570 | (arguments | |
571 | `(#:phases | |
572 | (modify-phases %standard-phases | |
573 | (add-before 'check 'fix-tests | |
574 | (lambda _ | |
575 | (begin | |
576 | ;; https://github.com/miracle2k/django-assets/issues/87 | |
577 | (substitute* "tests/__init__.py" | |
578 | (("settings.configure.*") | |
579 | (string-append | |
580 | "settings.configure(\n" | |
581 | "INSTALLED_APPS=['django_assets', " | |
582 | "'django.contrib.staticfiles'],\n" | |
583 | "TEMPLATES=[{'BACKEND': " | |
584 | "'django.template.backends.django.DjangoTemplates'}],\n" | |
585 | ")\n"))) | |
586 | ;; These tests fail | |
587 | (substitute* "tests/test_django.py" | |
588 | (("TestLoader") "NoTestLoader")))))))) | |
589 | (native-inputs | |
590 | `(("python-nose" ,python-nose))) | |
591 | (propagated-inputs | |
592 | `(("python-django" ,python-django) | |
593 | ("python-webassets" ,python-webassets))) | |
594 | (home-page "https://github.com/miracle2k/django-assets") | |
595 | (synopsis "Asset management for Django") | |
596 | (description | |
597 | "Asset management for Django, to compress and merge CSS and Javascript | |
598 | files. Integrates the webassets library with Django, adding support for | |
599 | merging, minifying and compiling CSS and Javascript files.") | |
600 | (license license:bsd-2))) | |
601 | ||
602 | (define-public python2-django-assets | |
603 | (package-with-python2 python-django-assets)) | |
6c17e963 | 604 | |
a2e92596 CB |
605 | (define-public python-django-jinja |
606 | (package | |
607 | (name "python-django-jinja") | |
608 | (version "2.4.1") | |
609 | (source | |
610 | (origin | |
9f00d13d EF |
611 | (method git-fetch) |
612 | (uri (git-reference | |
b0e7b699 | 613 | (url "https://github.com/niwinz/django-jinja") |
9f00d13d EF |
614 | (commit version))) |
615 | (file-name (git-file-name name version)) | |
a2e92596 CB |
616 | (sha256 |
617 | (base32 | |
9f00d13d | 618 | "1fcrxlznlq1xvl26y3j1r22vvy6m08r5l97xi2wj50rdmxhfvhis")))) |
a2e92596 CB |
619 | (build-system python-build-system) |
620 | (propagated-inputs | |
621 | `(("python-django" ,python-django) | |
622 | ("python-jinja2" ,python-jinja2) | |
623 | ("python-pytz" ,python-pytz) | |
624 | ("python-django-pipeline" ,python-django-pipeline))) | |
625 | (arguments | |
626 | '(;; TODO Tests currently fail due to issues with the configuration for | |
627 | ;; django-pipeline | |
628 | #:tests? #f | |
629 | #:phases | |
630 | (modify-phases %standard-phases | |
631 | (replace 'check | |
632 | (lambda* (#:key tests? #:allow-other-keys) | |
633 | (or | |
634 | (not tests?) | |
635 | (with-directory-excursion "testing" | |
636 | (invoke "python" "runtests.py")))))))) | |
637 | (home-page | |
638 | "https://niwinz.github.io/django-jinja/latest/") | |
639 | (synopsis "Simple jinja2 templating backend for Django") | |
640 | (description | |
641 | "This package provides a templating backend for Django, using Jinja2. It | |
642 | provides certain advantages over the builtin Jinja2 backend in Django, for | |
643 | example, explicit calls to callables from templates and better performance.") | |
644 | (license license:bsd-3))) | |
645 | ||
6c17e963 JL |
646 | (define-public python-django-jsonfield |
647 | (package | |
648 | (name "python-django-jsonfield") | |
649 | (version "1.0.3") | |
650 | (source (origin | |
651 | (method url-fetch) | |
652 | (uri (pypi-uri "jsonfield" version)) | |
653 | (sha256 | |
654 | (base32 | |
655 | "19x4lak0hg9c20r7mvf27w7i8r6i4sg2g0ypmlmp2665fnk76zvy")))) | |
656 | (build-system python-build-system) | |
657 | (arguments | |
658 | `(#:phases | |
659 | (modify-phases %standard-phases | |
660 | (add-before 'check 'fix-tests | |
661 | (lambda _ | |
662 | (substitute* "jsonfield/tests.py" | |
663 | (("django.forms.util") "django.forms.utils"))))))) | |
664 | (propagated-inputs | |
665 | `(("python-django" ,python-django))) | |
666 | (home-page "https://github.com/bradjasper/django-jsonfield") | |
667 | (synopsis "Store validated JSON in your model") | |
668 | (description | |
669 | "Django-jsonfield is a reusable Django field that allows you to store | |
670 | validated JSON in your model. It silently takes care of serialization. To | |
671 | use, simply add the field to one of your models.") | |
672 | (license license:expat))) | |
673 | ||
674 | (define-public python2-django-jsonfield | |
675 | (package-with-python2 python-django-jsonfield)) | |
a326384b JL |
676 | |
677 | (define-public python-dj-database-url | |
678 | (package | |
679 | (name "python-dj-database-url") | |
680 | (version "0.4.2") | |
681 | (source (origin | |
682 | (method url-fetch) | |
683 | (uri (pypi-uri "dj-database-url" version)) | |
684 | (sha256 | |
685 | (base32 | |
686 | "024zbkc5rli4hia9lz9g8kf1zxhb2gwawj5abf67i7gf8n22v0x6")))) | |
687 | (build-system python-build-system) | |
688 | (home-page "https://github.com/kennethreitz/dj-database-url") | |
689 | (synopsis "Use Database URLs in your Django Application") | |
690 | (description | |
691 | "This simple Django utility allows you to utilize the 12factor inspired | |
692 | DATABASE_URL environment variable to configure your Django application. | |
693 | ||
694 | The dj_database_url.config method returns a Django database connection | |
695 | dictionary, populated with all the data specified in your URL. There is also a | |
696 | conn_max_age argument to easily enable Django’s connection pool.") | |
697 | (license license:bsd-2))) | |
698 | ||
699 | (define-public python2-dj-database-url | |
700 | (package-with-python2 python-dj-database-url)) | |
afbfe564 | 701 | |
e1302edb EF |
702 | (define-public python-django-picklefield |
703 | (package | |
704 | (name "python-django-picklefield") | |
705 | (version "2.1.1") | |
706 | (source | |
707 | (origin | |
708 | (method url-fetch) | |
709 | (uri (pypi-uri "django-picklefield" version)) | |
710 | (sha256 | |
711 | (base32 | |
712 | "0imncys5s3vsy2q79nn7k5d670da1xgmcr9gmhn06fry6ibf39b7")))) | |
713 | (build-system python-build-system) | |
714 | (propagated-inputs `(("python-django" ,python-django))) | |
715 | (native-inputs `(("python-tox" ,python-tox))) | |
716 | (home-page "https://github.com/gintas/django-picklefield") | |
717 | (synopsis "Pickled object field for Django") | |
718 | (description "Pickled object field for Django") | |
719 | (license license:expat))) | |
720 | ||
afbfe564 JL |
721 | (define-public python-django-bulk-update |
722 | (package | |
723 | (name "python-django-bulk-update") | |
724 | (version "1.1.10") | |
725 | (source (origin | |
726 | (method url-fetch) | |
727 | (uri (pypi-uri "django-bulk-update" version)) | |
728 | (sha256 | |
729 | (base32 | |
730 | "0mbng9m7swfc0dnidipbzlxfhlfjrv755dlnha5s4m9mgdxb1fhc")))) | |
731 | (build-system python-build-system) | |
732 | (arguments | |
733 | ;; tests don't support django 1.10, but the module seems to work. | |
734 | `(#:tests? #f)) | |
735 | (native-inputs | |
736 | `(("six" ,python-six) | |
737 | ("jsonfield" ,python-django-jsonfield) | |
738 | ("python-dj-database-url" ,python-dj-database-url))) | |
739 | (propagated-inputs | |
740 | `(("python-django" ,python-django))) | |
741 | (home-page "https://github.com/aykut/django-bulk-update") | |
742 | (synopsis "Simple bulk update over Django ORM or with helper function") | |
743 | (description | |
744 | "Simple bulk update over Django ORM or with helper function. This | |
745 | project aims to bulk update given objects using one query over Django ORM.") | |
746 | (license license:expat))) | |
747 | ||
748 | (define-public python2-django-bulk-update | |
749 | (package-with-python2 python-django-bulk-update)) | |
03a34e87 JL |
750 | |
751 | (define-public python-django-contact-form | |
752 | (package | |
753 | (name "python-django-contact-form") | |
754 | (version "1.3") | |
755 | (source (origin | |
756 | (method url-fetch) | |
757 | (uri (pypi-uri "django-contact-form" version)) | |
758 | (sha256 | |
759 | (base32 | |
760 | "0az590y56k5ahv4sixrkn54d3a8ig2q2z9pl6s3m4f533mx2gj17")))) | |
761 | (build-system python-build-system) | |
762 | (arguments | |
763 | `(#:phases | |
764 | (modify-phases %standard-phases | |
765 | (replace 'check | |
766 | (lambda _ | |
767 | ;; the next version will need "make test" | |
de6be023 RW |
768 | (invoke "flake8" "contact_form") |
769 | (invoke "coverage" "run" "contact_form/runtests.py") | |
770 | (invoke "coverage" "report" "-m" "--fail-under" "0")))))) | |
03a34e87 JL |
771 | (native-inputs |
772 | `(("python-coverage" ,python-coverage) | |
773 | ("python-flake8" ,python-flake8))) | |
774 | (propagated-inputs | |
775 | `(("python-django" ,python-django))) | |
776 | (home-page "https://github.com/ubernostrum/django-contact-form") | |
777 | (synopsis "Contact form for Django") | |
778 | (description | |
779 | "This application provides simple, extensible contact-form functionality | |
780 | for Django sites.") | |
781 | (license license:bsd-3))) | |
782 | ||
783 | (define-public python2-django-contact-form | |
784 | (package-with-python2 python-django-contact-form)) | |
659692c0 JL |
785 | |
786 | (define-public python-django-contrib-comments | |
787 | (package | |
788 | (name "python-django-contrib-comments") | |
789 | (version "1.8.0") | |
790 | (source (origin | |
791 | (method url-fetch) | |
792 | (uri (pypi-uri "django-contrib-comments" version)) | |
793 | (sha256 | |
794 | (base32 | |
795 | "0bxsgw8jrkhg6r5s0z6ksfi4w8yknaqb1s9acmxd9pm3pnsnp5kx")))) | |
796 | (build-system python-build-system) | |
797 | (propagated-inputs | |
798 | `(("python-django" ,python-django))) | |
799 | (home-page "https://github.com/django/django-contrib-comments") | |
800 | (synopsis "Comments framework") | |
801 | (description | |
802 | "Django used to include a comments framework; since Django 1.6 it's been | |
803 | separated to a separate project. This is that project. This framework can be | |
804 | used to attach comments to any model, so you can use it for comments on blog | |
805 | entries, photos, book chapters, or anything else.") | |
806 | (license license:bsd-3))) | |
807 | ||
808 | (define-public python2-django-contrib-comments | |
809 | (package-with-python2 python-django-contrib-comments)) | |
93246253 JL |
810 | |
811 | (define-public python-django-overextends | |
812 | (package | |
813 | (name "python-django-overextends") | |
814 | (version "0.4.3") | |
815 | (source (origin | |
816 | (method url-fetch) | |
817 | (uri (pypi-uri "django-overextends" version)) | |
818 | (sha256 | |
819 | (base32 | |
820 | "0qc2pcf3i56pmfxh2jw7k3pgljd8xzficmkl2541n7bkcbngqfzm")))) | |
821 | (build-system python-build-system) | |
822 | (arguments | |
823 | `(#:phases | |
824 | (modify-phases %standard-phases | |
825 | (replace 'check | |
dd2f0cdb | 826 | (lambda _ (invoke "./test_project/manage.py" "test")))))) |
93246253 JL |
827 | (propagated-inputs |
828 | `(("python-django" ,python-django))) | |
829 | (native-inputs | |
830 | `(("sphinx-me" ,python-sphinx-me))) | |
831 | (home-page "https://github.com/stephenmcd/django-overextends") | |
832 | (synopsis "Circular template inheritance") | |
833 | (description | |
834 | "A Django reusable app providing the overextends template tag, a drop-in | |
835 | replacement for Django's extends tag, which allows you to use circular template | |
836 | inheritance. The primary use-case for overextends is to simultaneously | |
837 | override and extend templates from other reusable apps, in your own Django | |
838 | project.") | |
839 | (license license:bsd-2))) | |
840 | ||
841 | (define-public python2-django-overextends | |
842 | (package-with-python2 python-django-overextends)) | |
b939953b | 843 | |
6cd1bbd0 CB |
844 | (define-public python-django-pipeline |
845 | (package | |
846 | (name "python-django-pipeline") | |
93b5bd7c | 847 | (version "2.0.5") |
6cd1bbd0 CB |
848 | (source |
849 | (origin | |
850 | (method url-fetch) | |
851 | (uri (pypi-uri "django-pipeline" version)) | |
852 | (sha256 | |
853 | (base32 | |
93b5bd7c | 854 | "19vrbd5s12qw4qlg5n8ldv7zz2rs5y2sdid1i7lvgp92m71dayvc")))) |
6cd1bbd0 CB |
855 | (build-system python-build-system) |
856 | (arguments | |
857 | '(#:phases | |
858 | (modify-phases %standard-phases | |
859 | (add-after 'unpack 'patch-source | |
860 | (lambda _ | |
861 | (substitute* "tests/tests/test_compiler.py" | |
862 | (("\\/usr\\/bin\\/env") | |
863 | (which "env"))))) | |
864 | (replace 'check | |
865 | (lambda*(#:key tests? #:allow-other-keys) | |
866 | (or | |
867 | (not tests?) | |
868 | (begin | |
74eee9f2 TGR |
869 | (setenv "PYTHONPATH" |
870 | (string-append (getcwd) ":" | |
871 | (getenv "PYTHONPATH"))) | |
6cd1bbd0 CB |
872 | (setenv "DJANGO_SETTINGS_MODULE" "tests.settings") |
873 | (invoke "django-admin" "test" "tests")))))))) | |
874 | (propagated-inputs | |
93b5bd7c MB |
875 | `(("python-css-html-js-minify" ,python-css-html-js-minify) |
876 | ("python-django" ,python-django) | |
6cd1bbd0 CB |
877 | ("python-slimit" ,python-slimit) |
878 | ("python-jsmin" ,python-jsmin))) | |
879 | (home-page | |
880 | "https://github.com/jazzband/django-pipeline") | |
881 | (synopsis "Asset packaging library for Django") | |
882 | (description | |
883 | "Pipeline is an asset packaging library for Django, providing both CSS | |
884 | and JavaScript concatenation and compression, built-in JavaScript template | |
885 | support, and optional data-URI image and font embedding.") | |
886 | (license license:expat))) | |
887 | ||
b939953b JL |
888 | (define-public python-django-redis |
889 | (package | |
890 | (name "python-django-redis") | |
f55fe42b | 891 | (version "4.10.0") |
b939953b JL |
892 | (source (origin |
893 | (method url-fetch) | |
894 | (uri (pypi-uri "django-redis" version)) | |
895 | (sha256 | |
896 | (base32 | |
f55fe42b | 897 | "1rxcwnv9ik0swkwvfqdi9i9baw6n8if5pj6q63fjh4p9chw3j2xg")))) |
b939953b JL |
898 | (build-system python-build-system) |
899 | (arguments | |
900 | `(#:phases | |
901 | (modify-phases %standard-phases | |
902 | (replace 'check | |
903 | (lambda _ | |
f55fe42b JL |
904 | (invoke "redis-server" "--daemonize" "yes") |
905 | (with-directory-excursion "tests" | |
906 | (invoke "python" "runtests.py"))))))) | |
b939953b JL |
907 | (native-inputs |
908 | `(("python-fakeredis" ,python-fakeredis) | |
909 | ("python-hiredis" ,python-hiredis) | |
910 | ("python-mock" ,python-mock) | |
911 | ("python-msgpack" ,python-msgpack) | |
912 | ("redis" ,redis))) | |
913 | (propagated-inputs | |
914 | `(("python-django" ,python-django) | |
915 | ("python-redis" ,python-redis))) | |
916 | (home-page "https://github.com/niwibe/django-redis") | |
917 | (synopsis "Full featured redis cache backend for Django") | |
918 | (description | |
919 | "Full featured redis cache backend for Django.") | |
920 | (license license:bsd-3))) | |
921 | ||
922 | (define-public python2-django-redis | |
923 | (package-with-python2 python-django-redis)) | |
cb9b6095 JL |
924 | |
925 | (define-public python-django-rq | |
926 | (package | |
927 | (name "python-django-rq") | |
103cdcd4 | 928 | (version "1.3.1") |
cb9b6095 JL |
929 | (source (origin |
930 | (method url-fetch) | |
931 | (uri (pypi-uri "django-rq" version)) | |
932 | (sha256 | |
933 | (base32 | |
103cdcd4 | 934 | "1ips1ikv5qhgwb58ssn496vgqg9qv6jinwmwbrg9l3s75fskd1l5")))) |
cb9b6095 JL |
935 | (build-system python-build-system) |
936 | (arguments | |
937 | `(#:phases | |
938 | (modify-phases %standard-phases | |
939 | (replace 'check | |
940 | (lambda _ | |
13968371 JL |
941 | (invoke "redis-server" "--daemonize" "yes") |
942 | (invoke "django-admin.py" "test" "django_rq" | |
943 | "--settings=django_rq.tests.settings" | |
1c24d6d6 | 944 | "--pythonpath=.")))))) |
cb9b6095 | 945 | (native-inputs |
13968371 JL |
946 | `(("python-mock" ,python-mock) |
947 | ("redis" ,redis))) | |
cb9b6095 JL |
948 | (propagated-inputs |
949 | `(("python-django" ,python-django) | |
950 | ("python-rq" ,python-rq))) | |
951 | (home-page "https://github.com/ui/django-rq") | |
952 | (synopsis "Django integration with RQ") | |
953 | (description | |
954 | "Django integration with RQ, a Redis based Python queuing library. | |
955 | Django-RQ is a simple app that allows you to configure your queues in django's | |
956 | settings.py and easily use them in your project.") | |
957 | (license license:expat))) | |
958 | ||
959 | (define-public python2-django-rq | |
960 | (package-with-python2 python-django-rq)) | |
b0395dd6 | 961 | |
63c3f15d EF |
962 | (define-public python-django-q |
963 | (package | |
964 | (name "python-django-q") | |
965 | (version "1.3.2") | |
966 | (source | |
967 | (origin | |
968 | (method url-fetch) | |
969 | (uri (pypi-uri "django-q" version)) | |
970 | (sha256 | |
971 | (base32 | |
972 | "0ac3rjxv37bn97a62ly8b7qvbv765z6paiinzpwxx83nal2icc42")))) | |
973 | (build-system python-build-system) | |
974 | (arguments | |
975 | '(#:phases | |
976 | (modify-phases %standard-phases | |
977 | (replace 'check | |
978 | (lambda _ | |
979 | (setenv "DJANGO_SETTINGS_MODULE" "django_q.tests.settings") | |
980 | (invoke "django-admin" "test" "django_q.tests" | |
981 | "--pythonpath=.")))))) | |
982 | (propagated-inputs | |
983 | `(("python-arrow" ,python-arrow) | |
984 | ("python-blessed" ,python-blessed) | |
985 | ("python-django" ,python-django) | |
986 | ("python-django-picklefield" ,python-django-picklefield))) | |
987 | (native-inputs | |
988 | `(("python-django-redis" ,python-django-redis) | |
989 | ("python-pytest-django" ,python-pytest-django))) | |
990 | (home-page "https://django-q.readthedocs.io/") | |
991 | (synopsis "Multiprocessing distributed task queue for Django") | |
992 | (description | |
993 | "Django Q is a native Django task queue, scheduler and worker application | |
994 | using Python multiprocessing.") | |
995 | (license license:expat))) | |
996 | ||
b0395dd6 JL |
997 | (define-public python-django-sortedm2m |
998 | (package | |
999 | (name "python-django-sortedm2m") | |
1000 | (version "1.3.3") | |
1001 | (source (origin | |
1002 | (method url-fetch) | |
1003 | (uri (pypi-uri "django-sortedm2m" version)) | |
1004 | (sha256 | |
1005 | (base32 | |
1006 | "0axf765i7b3c2s83nlph47asi8s071dhq8l7y382v1pw785s22vi")))) | |
1007 | (build-system python-build-system) | |
1008 | (arguments | |
1009 | ;; no tests. | |
1010 | `(#:tests? #f)) | |
1011 | (propagated-inputs | |
1012 | `(("python-django" ,python-django))) | |
1013 | (home-page "https://github.com/gregmuellegger/django-sortedm2m") | |
1014 | (synopsis "Drop-in replacement for django's own ManyToManyField") | |
1015 | (description | |
1016 | "Sortedm2m is a drop-in replacement for django's own ManyToManyField. | |
1017 | The provided SortedManyToManyField behaves like the original one but remembers | |
1018 | the order of added relations.") | |
1019 | (license license:bsd-3))) | |
1020 | ||
1021 | (define-public python2-django-sortedm2m | |
1022 | (package-with-python2 python-django-sortedm2m)) | |
9f4a3059 JL |
1023 | |
1024 | (define-public python-django-appconf | |
1025 | (package | |
1026 | (name "python-django-appconf") | |
ea282711 | 1027 | (version "1.0.3") |
9f4a3059 JL |
1028 | (source (origin |
1029 | (method url-fetch) | |
1030 | (uri (pypi-uri "django-appconf" version)) | |
1031 | (sha256 | |
1032 | (base32 | |
ea282711 | 1033 | "1qw0p9qh78bvkgi38ba58djwn0rd5j1lrkg2c2wk5wb7snj3rw9m")))) |
9f4a3059 JL |
1034 | (build-system python-build-system) |
1035 | (propagated-inputs | |
ea282711 TGR |
1036 | `(("python-django" ,python-django) |
1037 | ("python-six" ,python-six))) | |
9f4a3059 JL |
1038 | (home-page "https://github.com/django-compressor/django-appconf") |
1039 | (synopsis "Handle configuration defaults of packaged Django apps") | |
1040 | (description | |
1041 | "This app precedes Django's own AppConfig classes that act as \"objects | |
1042 | [to] store metadata for an application\" inside Django's app loading mechanism. | |
1043 | In other words, they solve a related but different use case than | |
1044 | django-appconf and can't easily be used as a replacement. The similarity in | |
1045 | name is purely coincidental.") | |
1046 | (license license:bsd-3))) | |
1047 | ||
1048 | (define-public python2-django-appconf | |
1049 | (package-with-python2 python-django-appconf)) | |
f77d82f1 JL |
1050 | |
1051 | (define-public python-django-statici18n | |
1052 | (package | |
1053 | (name "python-django-statici18n") | |
1054 | (version "1.3.0") | |
1055 | (source (origin | |
1056 | (method url-fetch) | |
1057 | (uri (pypi-uri "django-statici18n" version)) | |
1058 | (sha256 | |
1059 | (base32 | |
1060 | "0alcf4g1nv69njhq5k3qw4mfl2k6dc18bik5nk0g1mnp3m8zyz7k")))) | |
1061 | (build-system python-build-system) | |
1062 | (propagated-inputs | |
1063 | `(("python-django" ,python-django) | |
1064 | ("django-appconf" ,python-django-appconf))) | |
1065 | (home-page "https://github.com/zyegfryed/django-statici18n") | |
1066 | (synopsis "Generate JavaScript catalog to static files") | |
1067 | (description | |
1068 | "A Django app that provides helper for generating JavaScript catalog to | |
1069 | static files.") | |
1070 | (license license:bsd-3))) | |
1071 | ||
1072 | (define-public python2-django-statici18n | |
1073 | (package-with-python2 python-django-statici18n)) | |
2601171e | 1074 | |
40fac51a RW |
1075 | (define-public python-django-tagging |
1076 | (package | |
1077 | (name "python-django-tagging") | |
18f1bd25 | 1078 | (version "0.5.0") |
40fac51a RW |
1079 | (source |
1080 | (origin | |
1081 | (method url-fetch) | |
1082 | (uri (pypi-uri "django-tagging" version)) | |
1083 | (sha256 | |
1084 | (base32 | |
18f1bd25 | 1085 | "13afxx30chssclxzd9gqnvwm9qyrdpnlbs6iswdfa18phfj8zmi8")))) |
40fac51a | 1086 | (build-system python-build-system) |
ba1c2e5b EF |
1087 | (arguments |
1088 | `(#:phases | |
1089 | (modify-phases %standard-phases | |
1090 | (replace 'check | |
1091 | (lambda _ | |
1092 | (setenv "DJANGO_SETTINGS_MODULE" "tagging.tests.settings") | |
1093 | (invoke "django-admin" "test" "--pythonpath=.")))))) | |
1094 | (inputs | |
1095 | `(("python-django" ,python-django))) | |
40fac51a RW |
1096 | (home-page "https://github.com/Fantomas42/django-tagging") |
1097 | (synopsis "Generic tagging application for Django") | |
1098 | (description "This package provides a generic tagging application for | |
1099 | Django projects, which allows association of a number of tags with any | |
1100 | @code{Model} instance and makes retrieval of tags simple.") | |
18f1bd25 | 1101 | (properties `((python2-variant . ,(delay python2-django-tagging)))) |
40fac51a RW |
1102 | (license license:bsd-3))) |
1103 | ||
1104 | (define-public python2-django-tagging | |
18f1bd25 EF |
1105 | (let ((base (package-with-python2 |
1106 | (strip-python2-variant python-django-tagging)))) | |
1107 | (package | |
1108 | (inherit base) | |
1109 | (version "0.4.6") | |
1110 | (source | |
1111 | (origin | |
1112 | (method url-fetch) | |
1113 | (uri (pypi-uri "django-tagging" version)) | |
1114 | (sha256 | |
1115 | (base32 | |
1116 | "0s7b4v45j783yaxs7rni10k24san0ya77nqz4s7zdf3jhfpk42r1"))))))) | |
d5f56e90 CB |
1117 | |
1118 | (define-public python-djangorestframework | |
1119 | (package | |
1120 | (name "python-djangorestframework") | |
e073925c | 1121 | (version "3.11.1") |
d5f56e90 CB |
1122 | (source |
1123 | (origin | |
1124 | (method url-fetch) | |
1125 | (uri (pypi-uri "djangorestframework" version)) | |
1126 | (sha256 | |
1127 | (base32 | |
e073925c | 1128 | "0chbl1d0m1x23mmpdj7y85k3n32lpxrhcdl07ywnylfj9dd2vl3d")))) |
d5f56e90 CB |
1129 | (build-system python-build-system) |
1130 | (arguments | |
1131 | '(;; No included tests | |
1132 | #:tests? #f)) | |
1133 | (propagated-inputs | |
1134 | `(("python-django" ,python-django))) | |
1135 | (home-page "https://www.django-rest-framework.org") | |
1136 | (synopsis "Toolkit for building Web APIs with Django") | |
1137 | (description | |
1138 | "The Django REST framework is for building Web APIs with Django. It | |
1139 | provides features like a web browseable API and authentication policies.") | |
1140 | (license license:bsd-2))) | |
cc534f0c | 1141 | |
4fa01b78 EF |
1142 | (define-public python-django-sekizai |
1143 | (package | |
1144 | (name "python-django-sekizai") | |
1145 | (version "1.1.0") | |
1146 | (source | |
1147 | (origin | |
1148 | (method url-fetch) | |
1149 | (uri (pypi-uri "django-sekizai" version)) | |
1150 | (sha256 | |
1151 | (base32 | |
1152 | "1nc4sv109valdn6azmgm2j01k7khxy2wnji84z63x7fxsikfdxp2")))) | |
1153 | (build-system python-build-system) | |
1154 | (arguments '(#:tests? #f)) ; Tests not included with release. | |
1155 | (propagated-inputs | |
1156 | `(("python-django" ,python-django) | |
1157 | ("python-django-classy-tags" ,python-django-classy-tags) | |
1158 | ("python-six" ,python-six))) | |
1159 | (home-page "https://github.com/divio/django-sekizai") | |
1160 | (synopsis "Template blocks for Django projects") | |
1161 | (description "Sekizai means blocks in Japanese, and thats what this app | |
1162 | provides. A fresh look at blocks. With @code{django-sekizai} you can define | |
1163 | placeholders where your blocks get rendered and at different places in your | |
1164 | templates append to those blocks. This is especially useful for css and | |
1165 | javascript. Your subtemplates can now define css and javscript files to be | |
1166 | included, and the css will be nicely put at the top and the javascript to the | |
1167 | bottom, just like you should. Also sekizai will ignore any duplicate content in | |
1168 | a single block.") | |
1169 | (license license:bsd-3))) | |
1170 | ||
cc534f0c CB |
1171 | (define-public python-django-crispy-forms |
1172 | (package | |
1173 | (name "python-django-crispy-forms") | |
9e4fef92 | 1174 | (version "1.9.2") |
cc534f0c CB |
1175 | (source |
1176 | (origin | |
1177 | (method url-fetch) | |
1178 | (uri (pypi-uri "django-crispy-forms" version)) | |
1179 | (sha256 | |
1180 | (base32 | |
9e4fef92 | 1181 | "0fxlf233f49hjax786p4r650rd0ilvhnpyvw8hv1d1aqnkxy1wgj")))) |
cc534f0c CB |
1182 | (build-system python-build-system) |
1183 | (arguments | |
1184 | '(;; No included tests | |
1185 | #:tests? #f)) | |
1186 | (propagated-inputs | |
1187 | `(("python-django" ,python-django))) | |
1188 | (home-page | |
1189 | "http://github.com/maraujop/django-crispy-forms") | |
1190 | (synopsis "Tool to control Django forms without custom templates") | |
1191 | (description | |
1192 | "@code{django-crispy-forms} lets you easily build, customize and reuse | |
1193 | forms using your favorite CSS framework, without writing template code.") | |
1194 | (license license:expat))) | |
8b209bb6 | 1195 | |
da3dbd61 EF |
1196 | (define-public python-django-compressor |
1197 | (package | |
1198 | (name "python-django-compressor") | |
1199 | (version "2.4") | |
1200 | (source | |
1201 | (origin | |
1202 | (method url-fetch) | |
1203 | (uri (pypi-uri "django_compressor" version)) | |
1204 | (sha256 | |
1205 | (base32 | |
1206 | "0kx7bclfa0sxlsz6ka70zr9ra00lks0hmv1kc99wbanx6xhirvfj")))) | |
1207 | (build-system python-build-system) | |
1208 | (arguments | |
1209 | '(#:phases | |
1210 | (modify-phases %standard-phases | |
1211 | (replace 'check | |
1212 | (lambda* (#:key tests? #:allow-other-keys) | |
1213 | (if tests? | |
1214 | (begin | |
1215 | (setenv "DJANGO_SETTINGS_MODULE" "compressor.test_settings") | |
1216 | (invoke "django-admin" "test" | |
1217 | "--pythonpath=.")) | |
1218 | #t)))) | |
1219 | ;; Tests fail with beautifulsoup 4.9+ | |
1220 | ;; https://github.com/django-compressor/django-compressor/issues/998 | |
1221 | #:tests? #f)) | |
1222 | (propagated-inputs | |
1223 | `(("python-django-appconf" ,python-django-appconf) | |
1224 | ("python-rcssmin" ,python-rcssmin) | |
1225 | ("python-rjsmin" ,python-rjsmin))) | |
1226 | (native-inputs | |
1227 | `(("python-beautifulsoup4" ,python-beautifulsoup4) | |
1228 | ("python-brotli" ,python-brotli) | |
1229 | ("python-csscompressor" ,python-csscompressor) | |
1230 | ("python-django-sekizai" ,python-django-sekizai) | |
1231 | ("python-mock" ,python-mock))) | |
1232 | (home-page "https://django-compressor.readthedocs.io/en/latest/") | |
1233 | (synopsis | |
1234 | "Compress linked and inline JavaScript or CSS into single cached files") | |
1235 | (description | |
1236 | "Django Compressor combines and compresses linked and inline Javascript or | |
1237 | CSS in a Django templates into cacheable static files by using the compress | |
1238 | template tag.") | |
1239 | (license license:expat))) | |
1240 | ||
8b209bb6 VV |
1241 | (define-public python-django-override-storage |
1242 | (package | |
1243 | (name "python-django-override-storage") | |
373403bb | 1244 | (version "0.1.6") |
8b209bb6 VV |
1245 | (source |
1246 | (origin | |
1247 | (method url-fetch) | |
1248 | (uri (pypi-uri "django-override-storage" version)) | |
1249 | (sha256 | |
373403bb | 1250 | (base32 "022arq94lxnlyykn8wvfnkykhi2dldnsn93pa2i41na551i0wpiv")))) |
8b209bb6 VV |
1251 | (build-system python-build-system) |
1252 | (propagated-inputs | |
1253 | `(("python-django" ,python-django))) | |
1254 | (home-page | |
1255 | "https://github.com/danifus/django-override-storage") | |
1256 | (synopsis "Django test helpers to manage file storage side effects") | |
1257 | (description | |
1258 | "This project provides tools to help reduce the side effects of using | |
1259 | FileFields during tests.") | |
1260 | (license license:expat))) |