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) | |
87f06765 | 129 | (properties `((cpe-name . "django"))))) |
b53fc294 | 130 | |
ac3103e8 MB |
131 | (define-public python-django-2.2 |
132 | (package | |
133 | (inherit python-django) | |
134 | (version "2.2.16") | |
135 | (source (origin | |
136 | (method url-fetch) | |
137 | (uri (pypi-uri "Django" version)) | |
138 | (sha256 | |
139 | (base32 | |
140 | "1535g2r322cl4x52fb0dmzlbg23539j2wx6027j54p22xvjlbkv2")))) | |
141 | (native-inputs | |
142 | `(;; XXX: In 2.2 and 3.0, selenium is required for the test suite. | |
143 | ("python-selenium" ,python-selenium) | |
144 | ,@(package-native-inputs python-django))))) | |
145 | ||
52c3cb26 S |
146 | (define-public python-django-extensions |
147 | (package | |
148 | (name "python-django-extensions") | |
0cac0e0b | 149 | (version "3.0.6") |
52c3cb26 S |
150 | (source |
151 | (origin | |
152 | (method git-fetch) | |
153 | ;; Fetch from the git repository, so that the tests can be run. | |
154 | (uri (git-reference | |
b0e7b699 | 155 | (url "https://github.com/django-extensions/django-extensions") |
52c3cb26 S |
156 | (commit version))) |
157 | (file-name (string-append name "-" version)) | |
158 | (sha256 | |
159 | (base32 | |
0cac0e0b | 160 | "0sra6hazqvspxd1pnx5cj7gia1rkaz3hn06ib4wd0frc167f5afy")))) |
52c3cb26 S |
161 | (build-system python-build-system) |
162 | (arguments | |
0cac0e0b | 163 | '(#:tests? #f)) ;XXX: requires a Postgres or MySQL database |
52c3cb26 S |
164 | (propagated-inputs |
165 | `(("python-six" ,python-six) | |
166 | ("python-vobject" ,python-vobject) | |
167 | ("python-werkzeug" ,python-werkzeug) | |
168 | ("python-dateutil" ,python-dateutil) | |
169 | ("python-django" ,python-django))) | |
170 | (native-inputs | |
171 | `(("python-mock" ,python-mock) | |
172 | ("python-factory-boy" ,python-factory-boy) | |
173 | ("python-tox" ,python-tox) | |
174 | ("python-pytest" ,python-pytest) | |
175 | ("python-pytest-cov" ,python-pytest-cov) | |
176 | ("python-pytest-django" ,python-pytest-django) | |
177 | ("python-shortuuid" , python-shortuuid))) | |
178 | (home-page | |
179 | "https://github.com/django-extensions/django-extensions") | |
180 | (synopsis "Custom management extensions for Django") | |
181 | (description | |
182 | "Django-extensions extends Django providing, for example, management | |
183 | commands, additional database fields and admin extensions.") | |
184 | (license license:expat))) | |
185 | ||
b53fc294 HG |
186 | (define-public python-django-simple-math-captcha |
187 | (package | |
188 | (name "python-django-simple-math-captcha") | |
9fb6275e MB |
189 | (version "1.0.9") |
190 | (home-page "https://github.com/alsoicode/django-simple-math-captcha") | |
b53fc294 | 191 | (source (origin |
9fb6275e MB |
192 | (method git-fetch) |
193 | (uri (git-reference | |
194 | (url home-page) | |
195 | (commit (string-append "v" version)))) | |
196 | (file-name (git-file-name name version)) | |
b53fc294 HG |
197 | (sha256 |
198 | (base32 | |
9fb6275e | 199 | "0fhy9k8haqa1296v0qpg1b5w7y3pyw9qi9z9laj5ijry1gk35qaw")))) |
b53fc294 | 200 | (build-system python-build-system) |
281cc11c | 201 | (arguments |
9fb6275e MB |
202 | '(#:phases (modify-phases %standard-phases |
203 | (add-after 'unpack 'patch-six-imports | |
204 | (lambda _ | |
205 | ;; Django no longer bundles six, adjust the imports | |
206 | ;; accordingly. The six dependency can likely be | |
207 | ;; removed in the next version. | |
208 | (substitute* (find-files "." "\\.py$") | |
209 | (("from django\\.utils import six") | |
210 | "import six")) | |
211 | #t)) | |
212 | (replace 'check | |
213 | (lambda _ | |
214 | (invoke "python" "runtests.py")))))) | |
215 | (native-inputs | |
216 | `(("python-mock" ,python-mock))) | |
b53fc294 | 217 | (propagated-inputs |
9fb6275e MB |
218 | `(("python-django" ,python-django) |
219 | ("python-six" ,python-six))) | |
b53fc294 HG |
220 | (synopsis "Easy-to-use math field/widget captcha for Django forms") |
221 | (description | |
222 | "A multi-value-field that presents a human answerable question, | |
223 | with no settings.py configuration necessary, but instead can be configured | |
224 | with arguments to the field constructor.") | |
225 | (license license:asl2.0))) | |
226 | ||
04eba1d0 EF |
227 | (define-public python-django-classy-tags |
228 | (package | |
229 | (name "python-django-classy-tags") | |
1fe17bc3 | 230 | (version "2.0.0") |
04eba1d0 EF |
231 | (source |
232 | (origin | |
233 | (method url-fetch) | |
234 | (uri (pypi-uri "django-classy-tags" version)) | |
235 | (sha256 | |
236 | (base32 | |
1fe17bc3 | 237 | "1javam3zqi3y3j0r490mm61v48yh75jaha99gb7lsxkaz6yri7fm")))) |
04eba1d0 | 238 | (build-system python-build-system) |
1fe17bc3 MB |
239 | ;; FIXME: How to make the test templates available to Django? |
240 | (arguments '(#:tests? #f)) | |
04eba1d0 | 241 | (propagated-inputs |
1fe17bc3 | 242 | `(("python-django" ,python-django))) |
04eba1d0 EF |
243 | (home-page "https://github.com/divio/django-classy-tags") |
244 | (synopsis "Class based template tags for Django") | |
245 | (description | |
246 | "@code{django-classy-tags} is an approach at making writing template tags | |
247 | in Django easier, shorter and more fun. It provides an extensible argument | |
248 | parser which reduces most of the boiler plate code you usually have to write | |
249 | when coding custom template tags.") | |
250 | (license license:bsd-3))) | |
251 | ||
8d73558d S |
252 | (define-public python-django-taggit |
253 | (package | |
254 | (name "python-django-taggit") | |
9eccb181 | 255 | (version "1.3.0") |
8d73558d S |
256 | (source |
257 | (origin | |
258 | (method url-fetch) | |
259 | (uri (pypi-uri "django-taggit" version)) | |
260 | (sha256 | |
261 | (base32 | |
9eccb181 | 262 | "0bbkabbs77z229ps0800gxfhf75yagp4x4j5jzfysbac3zvkp0sa")))) |
8d73558d S |
263 | (build-system python-build-system) |
264 | (arguments | |
265 | '(#:phases | |
266 | (modify-phases %standard-phases | |
267 | (replace 'check | |
268 | (lambda _ | |
269 | (invoke "python3" "-m" "django" "test" "--settings=tests.settings")))))) | |
270 | (propagated-inputs | |
271 | `(("python-django" ,python-django) | |
272 | ("python-isort" ,python-isort))) | |
273 | (native-inputs | |
274 | `(("python-pytest" ,python-pytest) | |
275 | ("python-mock" ,python-mock))) | |
276 | (home-page | |
277 | "https://github.com/jazzband/django-taggit") | |
278 | (synopsis | |
279 | "Reusable Django application for simple tagging") | |
280 | (description | |
281 | "Django-taggit is a reusable Django application for simple tagging.") | |
282 | (license license:bsd-3))) | |
9ae3e791 CB |
283 | |
284 | (define-public python-easy-thumbnails | |
285 | (package | |
286 | (name "python-easy-thumbnails") | |
287 | (version "2.7") | |
288 | (source | |
289 | (origin | |
290 | (method url-fetch) | |
291 | (uri (pypi-uri "easy-thumbnails" version)) | |
292 | (sha256 | |
293 | (base32 | |
294 | "14gzp5cv24z0qhxb7f7k7v9jgzpaj4n8yhjq83ynpx8183fs1rz4")))) | |
295 | (build-system python-build-system) | |
296 | (propagated-inputs | |
297 | `(("python-django" ,python-django) | |
298 | ("python-pillow" ,python-pillow))) | |
299 | (home-page "https://github.com/SmileyChris/easy-thumbnails") | |
300 | (synopsis "Easy thumbnails for Django") | |
301 | (description | |
302 | "Easy thumbnails is a Django plugin to dynamically create thumbnails | |
303 | based on source images. Multiple thumbnails can be created from a single | |
304 | source image, using different options to control parameters like the image | |
305 | size and quality.") | |
306 | (license license:bsd-3))) | |
8d73558d | 307 | |
23b563dc EF |
308 | (define-public python-pytest-django |
309 | (package | |
310 | (name "python-pytest-django") | |
92607967 | 311 | (version "3.10.0") |
23b563dc EF |
312 | (source (origin |
313 | (method url-fetch) | |
314 | (uri (pypi-uri "pytest-django" version)) | |
315 | (sha256 | |
316 | (base32 | |
92607967 | 317 | "19nvqsb7b9kz3ikpb50m8ppf7mfhzrapdxsqd5hhd1pdfz8dprjd")))) |
23b563dc EF |
318 | (build-system python-build-system) |
319 | (arguments | |
92607967 | 320 | `(#:phases |
23b563dc | 321 | (modify-phases %standard-phases |
92607967 MB |
322 | (replace 'check |
323 | (lambda* (#:key tests? inputs outputs #:allow-other-keys) | |
324 | (if tests? | |
325 | (begin | |
326 | (add-installed-pythonpath inputs outputs) | |
327 | (setenv "PYTHONPATH" | |
328 | (string-append ".:" ;for pytest_django_test | |
329 | (getenv "PYTHONPATH"))) | |
330 | (setenv "PYTEST_DJANGO_TEST_RUNNER" "pytest") | |
331 | (setenv "DJANGO_SETTINGS_MODULE" | |
332 | "pytest_django_test.settings_sqlite_file") | |
333 | (invoke "pytest" "-vv" "-k" | |
334 | ;; FIXME: these tests fail to locate Django templates ... | |
335 | (string-append "not test_django_not_loaded_without_settings" | |
336 | " and not test_settings" | |
337 | ;; ... and this does not discover | |
338 | ;; 'pytest_django_test'. | |
339 | " and not test_urls_cache_is_cleared"))) | |
340 | (format #t "test suite not run~%")) | |
23b563dc EF |
341 | #t))))) |
342 | (native-inputs | |
d18c69aa | 343 | `(("python-django" ,python-django) |
92607967 MB |
344 | ("python-setuptools-scm" ,python-setuptools-scm) |
345 | ||
346 | ;; For tests. | |
347 | ("python-pytest-xdist" ,python-pytest-xdist))) | |
f22efa01 | 348 | (propagated-inputs |
2dd12924 | 349 | `(("python-pytest" ,python-pytest))) |
16c896e8 | 350 | (home-page "https://pytest-django.readthedocs.org/") |
23b563dc EF |
351 | (synopsis "Django plugin for py.test") |
352 | (description "Pytest-django is a plugin for py.test that provides a set of | |
353 | useful tools for testing Django applications and projects.") | |
23b563dc EF |
354 | (license license:bsd-3))) |
355 | ||
4a82decd EF |
356 | (define-public python-django-haystack |
357 | (package | |
358 | (name "python-django-haystack") | |
359 | (version "2.8.1") | |
360 | (source | |
361 | (origin | |
362 | (method url-fetch) | |
363 | (uri (pypi-uri "django-haystack" version)) | |
364 | (sha256 | |
365 | (base32 | |
366 | "1302fqsrx8w474xk5cmnmg3hjqfprlxnjg9qlg86arsr4v4vqm4b")))) | |
367 | (build-system python-build-system) | |
368 | (arguments | |
369 | '(#:phases | |
370 | (modify-phases %standard-phases | |
371 | (add-after 'unpack 'loosen-verion-restrictions | |
372 | (lambda _ | |
373 | (substitute* "setup.py" | |
374 | (("geopy.*") "geopy',\n")) | |
375 | #t)) | |
376 | (add-before 'check 'set-gdal-lib-path | |
377 | (lambda* (#:key inputs #:allow-other-keys) | |
378 | (setenv "GDAL_LIBRARY_PATH" | |
379 | (string-append (assoc-ref inputs "gdal") | |
380 | "/lib")) | |
381 | #t))) | |
382 | #:tests? #f)) ; OSError: libgdal.so.27: cannot open shared object file | |
383 | (propagated-inputs | |
384 | `(("python-django" ,python-django))) | |
385 | (native-inputs | |
386 | `(("gdal" ,gdal) | |
387 | ("python-coverage" ,python-coverage) | |
388 | ("python-dateutil" ,python-dateutil) | |
389 | ("python-geopy" ,python-geopy) | |
390 | ("python-mock" ,python-mock) | |
391 | ("python-nose" ,python-nose) | |
392 | ("python-requests" ,python-requests) | |
393 | ("python-setuptools-scm" ,python-setuptools-scm) | |
394 | ("python-pysolr" ,python-pysolr) | |
395 | ("python-whoosh" ,python-whoosh))) | |
396 | (home-page "http://haystacksearch.org/") | |
397 | (synopsis "Pluggable search for Django") | |
398 | (description "Haystack provides modular search for Django. It features a | |
399 | unified, familiar API that allows you to plug in different search backends | |
400 | (such as Solr, Elasticsearch, Whoosh, Xapian, etc.) without having to modify | |
401 | your code.") | |
402 | (license license:bsd-3))) | |
403 | ||
894810c7 EF |
404 | (define-public python-django-filter |
405 | (package | |
406 | (name "python-django-filter") | |
357f5863 | 407 | (version "2.3.0") |
894810c7 EF |
408 | (source (origin |
409 | (method url-fetch) | |
410 | (uri (pypi-uri "django-filter" version)) | |
411 | (sha256 | |
412 | (base32 | |
357f5863 | 413 | "1bz5qzdk9pk4a2lp2yacrdnqmkv24vxnz4k3lykrnpc3b7bkvrhi")))) |
894810c7 | 414 | (build-system python-build-system) |
55ab6451 MB |
415 | (arguments |
416 | '(#:phases | |
417 | (modify-phases %standard-phases | |
418 | (replace 'check | |
419 | (lambda _ | |
7b282105 | 420 | (invoke "python" "runtests.py")))))) |
fa7cd333 EF |
421 | (native-inputs |
422 | `(("python-django" ,python-django) | |
da90f337 | 423 | ("python-djangorestframework" ,python-djangorestframework) |
c695fb76 | 424 | ("python-django-crispy-forms" ,python-django-crispy-forms) |
fa7cd333 | 425 | ("python-mock" ,python-mock))) |
894810c7 EF |
426 | (home-page "https://django-filter.readthedocs.io/en/latest/") |
427 | (synopsis "Reusable Django application to filter querysets dynamically") | |
428 | (description | |
429 | "Django-filter is a generic, reusable application to alleviate writing | |
430 | some of the more mundane bits of view code. Specifically, it allows users to | |
431 | filter down a queryset based on a model’s fields, displaying the form to let | |
432 | them do this.") | |
894810c7 EF |
433 | (license license:bsd-3))) |
434 | ||
e1f06e11 | 435 | (define-public python-django-allauth |
436 | (package | |
437 | (name "python-django-allauth") | |
6c0131b3 | 438 | (version "0.42.0") |
e1f06e11 | 439 | (source |
440 | (origin | |
441 | (method url-fetch) | |
442 | (uri (pypi-uri "django-allauth" version)) | |
443 | (sha256 | |
444 | (base32 | |
6c0131b3 | 445 | "0c0x8izvrnjhrr48w6pwsfk9ddbi6yfxg7v3hh5dm1vz1d0hjwpi")))) |
e1f06e11 | 446 | (build-system python-build-system) |
17dc2a09 CB |
447 | (arguments |
448 | '(#:phases | |
449 | (modify-phases %standard-phases | |
17dc2a09 CB |
450 | (replace 'check |
451 | (lambda _ | |
452 | (setenv "DJANGO_SETTINGS_MODULE" "test_settings") | |
5b1a9e07 EF |
453 | (invoke "django-admin" "test" "allauth.tests" |
454 | "--pythonpath=.")))))) | |
e1f06e11 | 455 | (propagated-inputs |
456 | `(("python-openid" ,python-openid) | |
457 | ("python-requests" ,python-requests) | |
458 | ("python-requests-oauthlib" ,python-requests-oauthlib))) | |
459 | (native-inputs | |
460 | `(("python-mock" ,python-mock))) | |
461 | (inputs | |
462 | `(("python-django" ,python-django))) | |
463 | (home-page "https://github.com/pennersr/django-allauth") | |
464 | (synopsis "Set of Django applications addressing authentication") | |
465 | (description | |
466 | "Integrated set of Django applications addressing authentication, | |
467 | registration, account management as well as 3rd party (social) | |
468 | account authentication.") | |
469 | (license license:expat))) | |
470 | ||
be02d4df CB |
471 | (define-public python-django-debug-toolbar |
472 | (package | |
473 | (name "python-django-debug-toolbar") | |
5495e880 | 474 | (version "2.2") |
be02d4df CB |
475 | (source |
476 | (origin | |
854d4d40 EF |
477 | (method git-fetch) |
478 | (uri (git-reference | |
b0e7b699 | 479 | (url "https://github.com/jazzband/django-debug-toolbar") |
854d4d40 EF |
480 | (commit version))) |
481 | (file-name (git-file-name name version)) | |
be02d4df CB |
482 | (sha256 |
483 | (base32 | |
5495e880 | 484 | "14069rlgjd5g724iaglai0nc636g9km4ba56r4j3k84chibqzn03")))) |
be02d4df CB |
485 | (build-system python-build-system) |
486 | (propagated-inputs | |
487 | `(("python-sqlparse" ,python-sqlparse) | |
488 | ("python-django" ,python-django))) | |
489 | (native-inputs | |
490 | `(("python-django-jinja" ,python-django-jinja) | |
491 | ("python-html5lib" ,python-html5lib))) | |
492 | (arguments | |
493 | '(#:phases | |
494 | (modify-phases %standard-phases | |
495 | (replace 'check | |
496 | (lambda _ | |
497 | (invoke "make" "test")))))) | |
498 | (home-page | |
499 | "https://github.com/jazzband/django-debug-toolbar") | |
500 | (synopsis "Toolbar to help with developing Django applications") | |
501 | (description | |
502 | "A configurable set of panels that display information about the current | |
503 | request and response as a toolbar on the rendered page.") | |
504 | (license license:bsd-3))) | |
505 | ||
14d8f653 | 506 | (define-public python-django-gravatar2 |
507 | (package | |
508 | (name "python-django-gravatar2") | |
384aa00c | 509 | (version "1.4.4") |
14d8f653 | 510 | (source |
511 | (origin | |
512 | (method url-fetch) | |
513 | (uri (pypi-uri "django-gravatar2" version)) | |
514 | (sha256 | |
515 | (base32 | |
384aa00c | 516 | "1vn921fb6jjx7rf5dzhy66rkb71nwmh9ydd0xs9ys72icw4jh4y8")))) |
14d8f653 | 517 | (build-system python-build-system) |
16bd3291 CB |
518 | (arguments |
519 | '(;; TODO: The django project for the tests is missing from the release. | |
520 | #:tests? #f)) | |
14d8f653 | 521 | (inputs |
522 | `(("python-django" ,python-django))) | |
523 | (home-page "https://github.com/twaddington/django-gravatar") | |
524 | (synopsis "Gravatar support for Django, improved version") | |
525 | (description | |
526 | "Essential Gravatar support for Django. Features helper methods, | |
527 | templatetags and a full test suite.") | |
528 | (license license:expat))) | |
529 | ||
01c64cb8 JL |
530 | (define-public python-django-assets |
531 | (package | |
532 | (name "python-django-assets") | |
357ab65b | 533 | (version "2.0") |
01c64cb8 JL |
534 | (source (origin |
535 | (method url-fetch) | |
536 | (uri (pypi-uri "django-assets" version)) | |
537 | (sha256 | |
538 | (base32 | |
357ab65b | 539 | "0fc6i77faxxv1gjlp06lv3kw64b5bhdiypaygfxh5djddgk83fwa")))) |
01c64cb8 | 540 | (build-system python-build-system) |
01c64cb8 JL |
541 | (native-inputs |
542 | `(("python-nose" ,python-nose))) | |
543 | (propagated-inputs | |
544 | `(("python-django" ,python-django) | |
545 | ("python-webassets" ,python-webassets))) | |
546 | (home-page "https://github.com/miracle2k/django-assets") | |
547 | (synopsis "Asset management for Django") | |
548 | (description | |
549 | "Asset management for Django, to compress and merge CSS and Javascript | |
550 | files. Integrates the webassets library with Django, adding support for | |
551 | merging, minifying and compiling CSS and Javascript files.") | |
552 | (license license:bsd-2))) | |
553 | ||
a2e92596 CB |
554 | (define-public python-django-jinja |
555 | (package | |
556 | (name "python-django-jinja") | |
bc136101 | 557 | (version "2.6.0") |
a2e92596 CB |
558 | (source |
559 | (origin | |
9f00d13d EF |
560 | (method git-fetch) |
561 | (uri (git-reference | |
b0e7b699 | 562 | (url "https://github.com/niwinz/django-jinja") |
9f00d13d EF |
563 | (commit version))) |
564 | (file-name (git-file-name name version)) | |
a2e92596 CB |
565 | (sha256 |
566 | (base32 | |
bc136101 | 567 | "06ldbkfkm6sc0p9sqpjph06gxrqpj78ih3dc2yik2fcba2y5mak1")))) |
a2e92596 CB |
568 | (build-system python-build-system) |
569 | (propagated-inputs | |
570 | `(("python-django" ,python-django) | |
571 | ("python-jinja2" ,python-jinja2) | |
572 | ("python-pytz" ,python-pytz) | |
573 | ("python-django-pipeline" ,python-django-pipeline))) | |
574 | (arguments | |
575 | '(;; TODO Tests currently fail due to issues with the configuration for | |
576 | ;; django-pipeline | |
577 | #:tests? #f | |
578 | #:phases | |
579 | (modify-phases %standard-phases | |
580 | (replace 'check | |
581 | (lambda* (#:key tests? #:allow-other-keys) | |
582 | (or | |
583 | (not tests?) | |
584 | (with-directory-excursion "testing" | |
585 | (invoke "python" "runtests.py")))))))) | |
586 | (home-page | |
587 | "https://niwinz.github.io/django-jinja/latest/") | |
588 | (synopsis "Simple jinja2 templating backend for Django") | |
589 | (description | |
590 | "This package provides a templating backend for Django, using Jinja2. It | |
591 | provides certain advantages over the builtin Jinja2 backend in Django, for | |
592 | example, explicit calls to callables from templates and better performance.") | |
593 | (license license:bsd-3))) | |
594 | ||
6673d1b5 | 595 | ;; JSONField is now built-in to Django, obsoleting this package. |
6c17e963 | 596 | (define-public python-django-jsonfield |
6673d1b5 | 597 | (deprecated-package "python-django-jsonfield" python-django)) |
6c17e963 | 598 | |
a326384b JL |
599 | (define-public python-dj-database-url |
600 | (package | |
601 | (name "python-dj-database-url") | |
76cd38f1 | 602 | (version "0.5.0") |
a326384b JL |
603 | (source (origin |
604 | (method url-fetch) | |
605 | (uri (pypi-uri "dj-database-url" version)) | |
606 | (sha256 | |
607 | (base32 | |
76cd38f1 | 608 | "0qs16g5y3lflxibsl8gwkwap21crhmmv98l60rdq6x1wawgypsja")))) |
a326384b JL |
609 | (build-system python-build-system) |
610 | (home-page "https://github.com/kennethreitz/dj-database-url") | |
611 | (synopsis "Use Database URLs in your Django Application") | |
612 | (description | |
613 | "This simple Django utility allows you to utilize the 12factor inspired | |
614 | DATABASE_URL environment variable to configure your Django application. | |
615 | ||
616 | The dj_database_url.config method returns a Django database connection | |
617 | dictionary, populated with all the data specified in your URL. There is also a | |
618 | conn_max_age argument to easily enable Django’s connection pool.") | |
619 | (license license:bsd-2))) | |
620 | ||
e1302edb EF |
621 | (define-public python-django-picklefield |
622 | (package | |
623 | (name "python-django-picklefield") | |
bfe8c030 MB |
624 | (version "3.0.1") |
625 | (home-page "https://github.com/gintas/django-picklefield") | |
626 | ;; Use a git checkout because the PyPI release lacks tests. | |
e1302edb EF |
627 | (source |
628 | (origin | |
bfe8c030 MB |
629 | (method git-fetch) |
630 | (uri (git-reference | |
631 | (url home-page) | |
632 | (commit (string-append "v" version)))) | |
633 | (file-name (git-file-name name version)) | |
e1302edb EF |
634 | (sha256 |
635 | (base32 | |
bfe8c030 | 636 | "0ni7bc86k0ra4pc8zv451pzlpkhs1nyil1sq9jdb4m2mib87b5fk")))) |
e1302edb | 637 | (build-system python-build-system) |
bfe8c030 MB |
638 | (arguments |
639 | '(#:phases (modify-phases %standard-phases | |
640 | (replace 'check | |
641 | (lambda _ | |
642 | (invoke "python" "-m" "django" "test" "-v2" | |
643 | "--settings=tests.settings")))))) | |
e1302edb | 644 | (propagated-inputs `(("python-django" ,python-django))) |
e1302edb EF |
645 | (synopsis "Pickled object field for Django") |
646 | (description "Pickled object field for Django") | |
647 | (license license:expat))) | |
648 | ||
afbfe564 JL |
649 | (define-public python-django-bulk-update |
650 | (package | |
651 | (name "python-django-bulk-update") | |
07440054 | 652 | (version "2.2.0") |
afbfe564 JL |
653 | (source (origin |
654 | (method url-fetch) | |
655 | (uri (pypi-uri "django-bulk-update" version)) | |
656 | (sha256 | |
657 | (base32 | |
07440054 | 658 | "0dxkmrm3skyw82i0qa8vklxw1ma1y308kh9w2hcnvhpacn5cxdss")))) |
afbfe564 JL |
659 | (build-system python-build-system) |
660 | (arguments | |
07440054 | 661 | ;; XXX: Tests require a Postgres database. |
afbfe564 | 662 | `(#:tests? #f)) |
afbfe564 JL |
663 | (propagated-inputs |
664 | `(("python-django" ,python-django))) | |
665 | (home-page "https://github.com/aykut/django-bulk-update") | |
666 | (synopsis "Simple bulk update over Django ORM or with helper function") | |
667 | (description | |
668 | "Simple bulk update over Django ORM or with helper function. This | |
669 | project aims to bulk update given objects using one query over Django ORM.") | |
670 | (license license:expat))) | |
671 | ||
03a34e87 JL |
672 | (define-public python-django-contact-form |
673 | (package | |
674 | (name "python-django-contact-form") | |
3be81c85 | 675 | (version "1.8.1") |
03a34e87 JL |
676 | (source (origin |
677 | (method url-fetch) | |
678 | (uri (pypi-uri "django-contact-form" version)) | |
679 | (sha256 | |
680 | (base32 | |
3be81c85 | 681 | "1zv7bcjfrg32gcsq3bclkld79l6mcy2wcvlj81h7q2ppv1wm8vqs")))) |
03a34e87 JL |
682 | (build-system python-build-system) |
683 | (arguments | |
684 | `(#:phases | |
685 | (modify-phases %standard-phases | |
686 | (replace 'check | |
687 | (lambda _ | |
3be81c85 MB |
688 | (setenv "PYTHONPATH" |
689 | (string-append "./build/lib:" | |
690 | (getenv "PYTHONPATH"))) | |
691 | (invoke "coverage" "run" "--source" "contact_form" | |
692 | "runtests.py")))))) | |
03a34e87 | 693 | (native-inputs |
3be81c85 | 694 | `(("python-coverage" ,python-coverage))) |
03a34e87 JL |
695 | (propagated-inputs |
696 | `(("python-django" ,python-django))) | |
697 | (home-page "https://github.com/ubernostrum/django-contact-form") | |
698 | (synopsis "Contact form for Django") | |
699 | (description | |
700 | "This application provides simple, extensible contact-form functionality | |
701 | for Django sites.") | |
702 | (license license:bsd-3))) | |
703 | ||
659692c0 JL |
704 | (define-public python-django-contrib-comments |
705 | (package | |
706 | (name "python-django-contrib-comments") | |
380b84f2 | 707 | (version "1.9.2") |
659692c0 JL |
708 | (source (origin |
709 | (method url-fetch) | |
710 | (uri (pypi-uri "django-contrib-comments" version)) | |
711 | (sha256 | |
712 | (base32 | |
380b84f2 | 713 | "0ccdiv784a5vnpfal36km4dyg12340rwhpr0riyy0k89wfnjn8yi")))) |
659692c0 JL |
714 | (build-system python-build-system) |
715 | (propagated-inputs | |
716 | `(("python-django" ,python-django))) | |
717 | (home-page "https://github.com/django/django-contrib-comments") | |
718 | (synopsis "Comments framework") | |
719 | (description | |
720 | "Django used to include a comments framework; since Django 1.6 it's been | |
721 | separated to a separate project. This is that project. This framework can be | |
722 | used to attach comments to any model, so you can use it for comments on blog | |
723 | entries, photos, book chapters, or anything else.") | |
724 | (license license:bsd-3))) | |
725 | ||
93246253 JL |
726 | (define-public python-django-overextends |
727 | (package | |
728 | (name "python-django-overextends") | |
729 | (version "0.4.3") | |
730 | (source (origin | |
731 | (method url-fetch) | |
732 | (uri (pypi-uri "django-overextends" version)) | |
733 | (sha256 | |
734 | (base32 | |
735 | "0qc2pcf3i56pmfxh2jw7k3pgljd8xzficmkl2541n7bkcbngqfzm")))) | |
736 | (build-system python-build-system) | |
737 | (arguments | |
738 | `(#:phases | |
739 | (modify-phases %standard-phases | |
740 | (replace 'check | |
dd2f0cdb | 741 | (lambda _ (invoke "./test_project/manage.py" "test")))))) |
93246253 JL |
742 | (propagated-inputs |
743 | `(("python-django" ,python-django))) | |
744 | (native-inputs | |
745 | `(("sphinx-me" ,python-sphinx-me))) | |
746 | (home-page "https://github.com/stephenmcd/django-overextends") | |
747 | (synopsis "Circular template inheritance") | |
748 | (description | |
749 | "A Django reusable app providing the overextends template tag, a drop-in | |
750 | replacement for Django's extends tag, which allows you to use circular template | |
751 | inheritance. The primary use-case for overextends is to simultaneously | |
752 | override and extend templates from other reusable apps, in your own Django | |
753 | project.") | |
754 | (license license:bsd-2))) | |
755 | ||
6cd1bbd0 CB |
756 | (define-public python-django-pipeline |
757 | (package | |
758 | (name "python-django-pipeline") | |
93b5bd7c | 759 | (version "2.0.5") |
6cd1bbd0 CB |
760 | (source |
761 | (origin | |
762 | (method url-fetch) | |
763 | (uri (pypi-uri "django-pipeline" version)) | |
764 | (sha256 | |
765 | (base32 | |
93b5bd7c | 766 | "19vrbd5s12qw4qlg5n8ldv7zz2rs5y2sdid1i7lvgp92m71dayvc")))) |
6cd1bbd0 CB |
767 | (build-system python-build-system) |
768 | (arguments | |
769 | '(#:phases | |
770 | (modify-phases %standard-phases | |
771 | (add-after 'unpack 'patch-source | |
772 | (lambda _ | |
773 | (substitute* "tests/tests/test_compiler.py" | |
774 | (("\\/usr\\/bin\\/env") | |
775 | (which "env"))))) | |
776 | (replace 'check | |
777 | (lambda*(#:key tests? #:allow-other-keys) | |
778 | (or | |
779 | (not tests?) | |
780 | (begin | |
74eee9f2 TGR |
781 | (setenv "PYTHONPATH" |
782 | (string-append (getcwd) ":" | |
783 | (getenv "PYTHONPATH"))) | |
6cd1bbd0 CB |
784 | (setenv "DJANGO_SETTINGS_MODULE" "tests.settings") |
785 | (invoke "django-admin" "test" "tests")))))))) | |
786 | (propagated-inputs | |
93b5bd7c MB |
787 | `(("python-css-html-js-minify" ,python-css-html-js-minify) |
788 | ("python-django" ,python-django) | |
6cd1bbd0 CB |
789 | ("python-slimit" ,python-slimit) |
790 | ("python-jsmin" ,python-jsmin))) | |
791 | (home-page | |
792 | "https://github.com/jazzband/django-pipeline") | |
793 | (synopsis "Asset packaging library for Django") | |
794 | (description | |
795 | "Pipeline is an asset packaging library for Django, providing both CSS | |
796 | and JavaScript concatenation and compression, built-in JavaScript template | |
797 | support, and optional data-URI image and font embedding.") | |
798 | (license license:expat))) | |
799 | ||
b939953b JL |
800 | (define-public python-django-redis |
801 | (package | |
802 | (name "python-django-redis") | |
924be573 | 803 | (version "4.12.1") |
b939953b JL |
804 | (source (origin |
805 | (method url-fetch) | |
806 | (uri (pypi-uri "django-redis" version)) | |
807 | (sha256 | |
808 | (base32 | |
924be573 | 809 | "0qvsm8yjchl0d3i7g20wba6px9lb5gv8kp3fcnr6hr0y0b3qjr9h")))) |
b939953b JL |
810 | (build-system python-build-system) |
811 | (arguments | |
812 | `(#:phases | |
813 | (modify-phases %standard-phases | |
814 | (replace 'check | |
815 | (lambda _ | |
f55fe42b JL |
816 | (invoke "redis-server" "--daemonize" "yes") |
817 | (with-directory-excursion "tests" | |
818 | (invoke "python" "runtests.py"))))))) | |
b939953b JL |
819 | (native-inputs |
820 | `(("python-fakeredis" ,python-fakeredis) | |
821 | ("python-hiredis" ,python-hiredis) | |
822 | ("python-mock" ,python-mock) | |
823 | ("python-msgpack" ,python-msgpack) | |
824 | ("redis" ,redis))) | |
825 | (propagated-inputs | |
826 | `(("python-django" ,python-django) | |
827 | ("python-redis" ,python-redis))) | |
828 | (home-page "https://github.com/niwibe/django-redis") | |
829 | (synopsis "Full featured redis cache backend for Django") | |
830 | (description | |
831 | "Full featured redis cache backend for Django.") | |
832 | (license license:bsd-3))) | |
833 | ||
cb9b6095 JL |
834 | (define-public python-django-rq |
835 | (package | |
836 | (name "python-django-rq") | |
da6448cd | 837 | (version "2.3.2") |
cb9b6095 JL |
838 | (source (origin |
839 | (method url-fetch) | |
840 | (uri (pypi-uri "django-rq" version)) | |
841 | (sha256 | |
842 | (base32 | |
da6448cd | 843 | "0lksnjn3q3f7y72bj2yr8870w28a5b6x0vjnd9nhpq2ah6xfz6pf")))) |
cb9b6095 JL |
844 | (build-system python-build-system) |
845 | (arguments | |
846 | `(#:phases | |
847 | (modify-phases %standard-phases | |
848 | (replace 'check | |
849 | (lambda _ | |
13968371 JL |
850 | (invoke "redis-server" "--daemonize" "yes") |
851 | (invoke "django-admin.py" "test" "django_rq" | |
852 | "--settings=django_rq.tests.settings" | |
1c24d6d6 | 853 | "--pythonpath=.")))))) |
cb9b6095 | 854 | (native-inputs |
da6448cd MB |
855 | `(("python-django-redis" ,python-django-redis) |
856 | ("python-mock" ,python-mock) | |
857 | ("python-rq-scheduler" ,python-rq-scheduler) | |
13968371 | 858 | ("redis" ,redis))) |
cb9b6095 JL |
859 | (propagated-inputs |
860 | `(("python-django" ,python-django) | |
861 | ("python-rq" ,python-rq))) | |
862 | (home-page "https://github.com/ui/django-rq") | |
863 | (synopsis "Django integration with RQ") | |
864 | (description | |
865 | "Django integration with RQ, a Redis based Python queuing library. | |
866 | Django-RQ is a simple app that allows you to configure your queues in django's | |
867 | settings.py and easily use them in your project.") | |
868 | (license license:expat))) | |
869 | ||
63c3f15d EF |
870 | (define-public python-django-q |
871 | (package | |
872 | (name "python-django-q") | |
27f32604 | 873 | (version "1.3.3") |
63c3f15d EF |
874 | (source |
875 | (origin | |
876 | (method url-fetch) | |
877 | (uri (pypi-uri "django-q" version)) | |
878 | (sha256 | |
879 | (base32 | |
27f32604 | 880 | "1fs29767940akbsn3vdzw2rqnn9v77b0b55bi7fvydny1rk7fw6y")))) |
63c3f15d | 881 | (build-system python-build-system) |
27f32604 MB |
882 | ;; FIXME: Tests require disque, Redis, MongoDB, Docker. |
883 | (arguments '(#:tests? #f)) | |
63c3f15d EF |
884 | (propagated-inputs |
885 | `(("python-arrow" ,python-arrow) | |
886 | ("python-blessed" ,python-blessed) | |
887 | ("python-django" ,python-django) | |
888 | ("python-django-picklefield" ,python-django-picklefield))) | |
63c3f15d EF |
889 | (home-page "https://django-q.readthedocs.io/") |
890 | (synopsis "Multiprocessing distributed task queue for Django") | |
891 | (description | |
892 | "Django Q is a native Django task queue, scheduler and worker application | |
893 | using Python multiprocessing.") | |
894 | (license license:expat))) | |
895 | ||
b0395dd6 JL |
896 | (define-public python-django-sortedm2m |
897 | (package | |
898 | (name "python-django-sortedm2m") | |
52c8d420 | 899 | (version "3.0.2") |
b0395dd6 JL |
900 | (source (origin |
901 | (method url-fetch) | |
902 | (uri (pypi-uri "django-sortedm2m" version)) | |
903 | (sha256 | |
904 | (base32 | |
52c8d420 | 905 | "0z0yymmrr2l5cznqbzwziw624df0qsiflvbpqwrpan52nww3dk4a")))) |
b0395dd6 JL |
906 | (build-system python-build-system) |
907 | (arguments | |
52c8d420 MB |
908 | `(#:phases (modify-phases %standard-phases |
909 | (replace 'check | |
910 | (lambda _ | |
911 | (setenv "PYTHONPATH" (string-append "./test_project:" | |
912 | "./build/lib:.:" | |
913 | (getenv "PYTHONPATH"))) | |
914 | (invoke "django-admin.py" "test" "--settings=settings")))))) | |
b0395dd6 JL |
915 | (propagated-inputs |
916 | `(("python-django" ,python-django))) | |
52c8d420 | 917 | (home-page "https://github.com/jazzband/django-sortedm2m") |
b0395dd6 JL |
918 | (synopsis "Drop-in replacement for django's own ManyToManyField") |
919 | (description | |
920 | "Sortedm2m is a drop-in replacement for django's own ManyToManyField. | |
921 | The provided SortedManyToManyField behaves like the original one but remembers | |
922 | the order of added relations.") | |
923 | (license license:bsd-3))) | |
924 | ||
9f4a3059 JL |
925 | (define-public python-django-appconf |
926 | (package | |
927 | (name "python-django-appconf") | |
7e244ac6 | 928 | (version "1.0.4") |
9f4a3059 JL |
929 | (source (origin |
930 | (method url-fetch) | |
931 | (uri (pypi-uri "django-appconf" version)) | |
932 | (sha256 | |
933 | (base32 | |
7e244ac6 | 934 | "101k8nkc7xlffpjdi2qbrp9pc4v8hzvmkzi12qp7vms39asxwn5y")))) |
9f4a3059 | 935 | (build-system python-build-system) |
7e244ac6 MB |
936 | (arguments |
937 | '(#:phases (modify-phases %standard-phases | |
938 | (replace 'check | |
939 | (lambda _ | |
940 | (setenv "PYTHONPATH" (string-append ".:" | |
941 | (getenv "PYTHONPATH"))) | |
942 | (setenv "DJANGO_SETTINGS_MODULE" "tests.test_settings") | |
943 | (invoke "django-admin.py" "test" "-v2")))))) | |
9f4a3059 | 944 | (propagated-inputs |
7e244ac6 | 945 | `(("python-django" ,python-django))) |
9f4a3059 JL |
946 | (home-page "https://github.com/django-compressor/django-appconf") |
947 | (synopsis "Handle configuration defaults of packaged Django apps") | |
948 | (description | |
949 | "This app precedes Django's own AppConfig classes that act as \"objects | |
950 | [to] store metadata for an application\" inside Django's app loading mechanism. | |
951 | In other words, they solve a related but different use case than | |
952 | django-appconf and can't easily be used as a replacement. The similarity in | |
953 | name is purely coincidental.") | |
954 | (license license:bsd-3))) | |
955 | ||
f77d82f1 JL |
956 | (define-public python-django-statici18n |
957 | (package | |
958 | (name "python-django-statici18n") | |
dfbe9d23 MB |
959 | (version "1.9.0") |
960 | (home-page "https://github.com/zyegfryed/django-statici18n") | |
f77d82f1 | 961 | (source (origin |
dfbe9d23 MB |
962 | (method git-fetch) |
963 | (uri (git-reference | |
964 | (url home-page) | |
965 | (commit (string-append "v" version)))) | |
966 | (file-name (git-file-name name version)) | |
f77d82f1 JL |
967 | (sha256 |
968 | (base32 | |
dfbe9d23 | 969 | "1p3myp2im6c87yc05alh91jyahqws5lcw3zzdsj4dh8lx9s9cgpf")))) |
f77d82f1 | 970 | (build-system python-build-system) |
dfbe9d23 MB |
971 | (arguments |
972 | '(#:phases (modify-phases %standard-phases | |
973 | (replace 'check | |
974 | (lambda _ | |
975 | (setenv "PYTHONPATH" | |
976 | (string-append "./tests/test_project:./build/lib:" | |
977 | (getenv "PYTHONPATH"))) | |
978 | (setenv "DJANGO_SETTINGS_MODULE" "project.settings") | |
979 | (invoke "pytest" "-vv")))))) | |
980 | (native-inputs | |
981 | `(("python-pytest" ,python-pytest) | |
982 | ("python-pytest-django" ,python-pytest-django))) | |
f77d82f1 JL |
983 | (propagated-inputs |
984 | `(("python-django" ,python-django) | |
985 | ("django-appconf" ,python-django-appconf))) | |
f77d82f1 JL |
986 | (synopsis "Generate JavaScript catalog to static files") |
987 | (description | |
988 | "A Django app that provides helper for generating JavaScript catalog to | |
989 | static files.") | |
990 | (license license:bsd-3))) | |
991 | ||
40fac51a RW |
992 | (define-public python-django-tagging |
993 | (package | |
994 | (name "python-django-tagging") | |
18f1bd25 | 995 | (version "0.5.0") |
40fac51a RW |
996 | (source |
997 | (origin | |
998 | (method url-fetch) | |
999 | (uri (pypi-uri "django-tagging" version)) | |
1000 | (sha256 | |
1001 | (base32 | |
18f1bd25 | 1002 | "13afxx30chssclxzd9gqnvwm9qyrdpnlbs6iswdfa18phfj8zmi8")))) |
40fac51a | 1003 | (build-system python-build-system) |
ba1c2e5b EF |
1004 | (arguments |
1005 | `(#:phases | |
1006 | (modify-phases %standard-phases | |
1007 | (replace 'check | |
1008 | (lambda _ | |
1009 | (setenv "DJANGO_SETTINGS_MODULE" "tagging.tests.settings") | |
1010 | (invoke "django-admin" "test" "--pythonpath=.")))))) | |
1011 | (inputs | |
1012 | `(("python-django" ,python-django))) | |
40fac51a RW |
1013 | (home-page "https://github.com/Fantomas42/django-tagging") |
1014 | (synopsis "Generic tagging application for Django") | |
1015 | (description "This package provides a generic tagging application for | |
1016 | Django projects, which allows association of a number of tags with any | |
1017 | @code{Model} instance and makes retrieval of tags simple.") | |
1018 | (license license:bsd-3))) | |
1019 | ||
d5f56e90 CB |
1020 | (define-public python-djangorestframework |
1021 | (package | |
1022 | (name "python-djangorestframework") | |
e073925c | 1023 | (version "3.11.1") |
d5f56e90 CB |
1024 | (source |
1025 | (origin | |
1026 | (method url-fetch) | |
1027 | (uri (pypi-uri "djangorestframework" version)) | |
1028 | (sha256 | |
1029 | (base32 | |
e073925c | 1030 | "0chbl1d0m1x23mmpdj7y85k3n32lpxrhcdl07ywnylfj9dd2vl3d")))) |
d5f56e90 CB |
1031 | (build-system python-build-system) |
1032 | (arguments | |
1033 | '(;; No included tests | |
1034 | #:tests? #f)) | |
1035 | (propagated-inputs | |
1036 | `(("python-django" ,python-django))) | |
1037 | (home-page "https://www.django-rest-framework.org") | |
1038 | (synopsis "Toolkit for building Web APIs with Django") | |
1039 | (description | |
1040 | "The Django REST framework is for building Web APIs with Django. It | |
1041 | provides features like a web browseable API and authentication policies.") | |
1042 | (license license:bsd-2))) | |
cc534f0c | 1043 | |
4fa01b78 EF |
1044 | (define-public python-django-sekizai |
1045 | (package | |
1046 | (name "python-django-sekizai") | |
c5955445 | 1047 | (version "2.0.0") |
4fa01b78 EF |
1048 | (source |
1049 | (origin | |
1050 | (method url-fetch) | |
1051 | (uri (pypi-uri "django-sekizai" version)) | |
1052 | (sha256 | |
1053 | (base32 | |
c5955445 | 1054 | "0vrkli625b5s1wldri3dyrfvqbxg7zxy2pg0rpjixw3b1ndz0ag8")))) |
4fa01b78 EF |
1055 | (build-system python-build-system) |
1056 | (arguments '(#:tests? #f)) ; Tests not included with release. | |
1057 | (propagated-inputs | |
1058 | `(("python-django" ,python-django) | |
1059 | ("python-django-classy-tags" ,python-django-classy-tags) | |
1060 | ("python-six" ,python-six))) | |
1061 | (home-page "https://github.com/divio/django-sekizai") | |
1062 | (synopsis "Template blocks for Django projects") | |
1063 | (description "Sekizai means blocks in Japanese, and thats what this app | |
1064 | provides. A fresh look at blocks. With @code{django-sekizai} you can define | |
1065 | placeholders where your blocks get rendered and at different places in your | |
1066 | templates append to those blocks. This is especially useful for css and | |
1067 | javascript. Your subtemplates can now define css and javscript files to be | |
1068 | included, and the css will be nicely put at the top and the javascript to the | |
1069 | bottom, just like you should. Also sekizai will ignore any duplicate content in | |
1070 | a single block.") | |
1071 | (license license:bsd-3))) | |
1072 | ||
cc534f0c CB |
1073 | (define-public python-django-crispy-forms |
1074 | (package | |
1075 | (name "python-django-crispy-forms") | |
9e4fef92 | 1076 | (version "1.9.2") |
cc534f0c CB |
1077 | (source |
1078 | (origin | |
1079 | (method url-fetch) | |
1080 | (uri (pypi-uri "django-crispy-forms" version)) | |
1081 | (sha256 | |
1082 | (base32 | |
9e4fef92 | 1083 | "0fxlf233f49hjax786p4r650rd0ilvhnpyvw8hv1d1aqnkxy1wgj")))) |
cc534f0c CB |
1084 | (build-system python-build-system) |
1085 | (arguments | |
1086 | '(;; No included tests | |
1087 | #:tests? #f)) | |
1088 | (propagated-inputs | |
1089 | `(("python-django" ,python-django))) | |
1090 | (home-page | |
1091 | "http://github.com/maraujop/django-crispy-forms") | |
1092 | (synopsis "Tool to control Django forms without custom templates") | |
1093 | (description | |
1094 | "@code{django-crispy-forms} lets you easily build, customize and reuse | |
1095 | forms using your favorite CSS framework, without writing template code.") | |
1096 | (license license:expat))) | |
8b209bb6 | 1097 | |
da3dbd61 EF |
1098 | (define-public python-django-compressor |
1099 | (package | |
1100 | (name "python-django-compressor") | |
1101 | (version "2.4") | |
1102 | (source | |
1103 | (origin | |
1104 | (method url-fetch) | |
1105 | (uri (pypi-uri "django_compressor" version)) | |
1106 | (sha256 | |
1107 | (base32 | |
1108 | "0kx7bclfa0sxlsz6ka70zr9ra00lks0hmv1kc99wbanx6xhirvfj")))) | |
1109 | (build-system python-build-system) | |
1110 | (arguments | |
1111 | '(#:phases | |
1112 | (modify-phases %standard-phases | |
1113 | (replace 'check | |
1114 | (lambda* (#:key tests? #:allow-other-keys) | |
1115 | (if tests? | |
1116 | (begin | |
1117 | (setenv "DJANGO_SETTINGS_MODULE" "compressor.test_settings") | |
1118 | (invoke "django-admin" "test" | |
1119 | "--pythonpath=.")) | |
1120 | #t)))) | |
1121 | ;; Tests fail with beautifulsoup 4.9+ | |
1122 | ;; https://github.com/django-compressor/django-compressor/issues/998 | |
1123 | #:tests? #f)) | |
1124 | (propagated-inputs | |
1125 | `(("python-django-appconf" ,python-django-appconf) | |
1126 | ("python-rcssmin" ,python-rcssmin) | |
1127 | ("python-rjsmin" ,python-rjsmin))) | |
1128 | (native-inputs | |
1129 | `(("python-beautifulsoup4" ,python-beautifulsoup4) | |
1130 | ("python-brotli" ,python-brotli) | |
1131 | ("python-csscompressor" ,python-csscompressor) | |
1132 | ("python-django-sekizai" ,python-django-sekizai) | |
1133 | ("python-mock" ,python-mock))) | |
1134 | (home-page "https://django-compressor.readthedocs.io/en/latest/") | |
1135 | (synopsis | |
1136 | "Compress linked and inline JavaScript or CSS into single cached files") | |
1137 | (description | |
1138 | "Django Compressor combines and compresses linked and inline Javascript or | |
1139 | CSS in a Django templates into cacheable static files by using the compress | |
1140 | template tag.") | |
1141 | (license license:expat))) | |
1142 | ||
8b209bb6 VV |
1143 | (define-public python-django-override-storage |
1144 | (package | |
1145 | (name "python-django-override-storage") | |
e06e250d MB |
1146 | (version "0.3.0") |
1147 | (home-page "https://github.com/danifus/django-override-storage") | |
8b209bb6 VV |
1148 | (source |
1149 | (origin | |
e06e250d MB |
1150 | (method git-fetch) |
1151 | (uri (git-reference | |
1152 | (url home-page) | |
1153 | (commit (string-append "v" version)))) | |
1154 | (file-name (git-file-name name version)) | |
8b209bb6 | 1155 | (sha256 |
e06e250d | 1156 | (base32 "081kzfk7mmybhihvc92d3hsdg0r2k20ydq88fs1fgd348sq1ax51")))) |
8b209bb6 | 1157 | (build-system python-build-system) |
e06e250d MB |
1158 | (arguments |
1159 | '(#:phases (modify-phases %standard-phases | |
1160 | (replace 'check | |
1161 | (lambda _ | |
1162 | (invoke "python" "runtests.py")))))) | |
1163 | (native-inputs | |
1164 | `(("python-mock" ,python-mock))) | |
8b209bb6 VV |
1165 | (propagated-inputs |
1166 | `(("python-django" ,python-django))) | |
8b209bb6 VV |
1167 | (synopsis "Django test helpers to manage file storage side effects") |
1168 | (description | |
1169 | "This project provides tools to help reduce the side effects of using | |
1170 | FileFields during tests.") | |
1171 | (license license:expat))) |