Commit | Line | Data |
---|---|---|
d18197af HG |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com> | |
ccb7d134 | 3 | ;;; Copyright © 2016, 2019, 2020, 2021 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) |
44272f2d | 37 | #:use-module (gnu packages openldap) |
1b2f753d | 38 | #:use-module (gnu packages python) |
da3dbd61 | 39 | #:use-module (gnu packages python-compression) |
3f8041f9 | 40 | #:use-module (gnu packages python-crypto) |
33dc54b0 | 41 | #:use-module (gnu packages python-web) |
44d10b1f | 42 | #:use-module (gnu packages python-xyz) |
9d0c291e | 43 | #:use-module (gnu packages sphinx) |
55e1475c MB |
44 | #:use-module (gnu packages time) |
45 | #:use-module (gnu packages xml)) | |
d18197af HG |
46 | |
47 | (define-public python-django | |
48 | (package | |
49 | (name "python-django") | |
26f34f3d | 50 | (version "3.1.8") |
d18197af HG |
51 | (source (origin |
52 | (method url-fetch) | |
53 | (uri (pypi-uri "Django" version)) | |
54 | (sha256 | |
55 | (base32 | |
26f34f3d | 56 | "1b0ymqv09b523k3c2jnpb2gjy2fsy6irbfyc2g9x5hjyw41k2fgq")))) |
d18197af HG |
57 | (build-system python-build-system) |
58 | (arguments | |
ac3103e8 | 59 | '(#:phases |
d18197af | 60 | (modify-phases %standard-phases |
ac3103e8 | 61 | (add-before 'check 'pre-check |
d18197af HG |
62 | (lambda* (#:key inputs #:allow-other-keys) |
63 | ;; The test-suite tests timezone-dependent functions, thus tzdata | |
64 | ;; needs to be available. | |
65 | (setenv "TZDIR" | |
66 | (string-append (assoc-ref inputs "tzdata") | |
67 | "/share/zoneinfo")) | |
ac3103e8 MB |
68 | |
69 | ;; Disable test for incorrect timezone: it only raises the | |
70 | ;; expected error when /usr/share/zoneinfo exists, even though | |
71 | ;; the machinery gracefully falls back to TZDIR. According to | |
72 | ;; django/conf/__init__.py, lack of /usr/share/zoneinfo is | |
73 | ;; harmless, so just ignore this test. | |
74 | (substitute* "tests/settings_tests/tests.py" | |
75 | ((".*def test_incorrect_timezone.*" all) | |
76 | (string-append " @unittest.skipIf(True, 'Disabled by Guix')\n" | |
77 | all))) | |
78 | ||
79 | ;; Preserve the PYTHONPATH created by Guix when running the tests. | |
0458ab53 JB |
80 | (substitute* "tests/admin_scripts/tests.py" |
81 | (("python_path = \\[") | |
82 | (string-append "python_path = ['" | |
ac3103e8 MB |
83 | (string-join |
84 | (string-split (getenv "PYTHONPATH") #\:) | |
85 | "','") | |
0458ab53 | 86 | "', "))) |
ac3103e8 MB |
87 | |
88 | #t)) | |
89 | (replace 'check | |
90 | (lambda _ | |
91 | (with-directory-excursion "tests" | |
92 | (setenv "PYTHONPATH" | |
93 | (string-append "..:" (getenv "PYTHONPATH"))) | |
94 | (invoke "python" "runtests.py" | |
95 | ;; By default tests run in parallel, which may cause | |
96 | ;; various race conditions. Run sequentially for | |
97 | ;; consistent results. | |
98 | "--parallel=1"))))))) | |
d18197af | 99 | ;; TODO: Install extras/django_bash_completion. |
dfdaea32 | 100 | (native-inputs |
c695fb76 | 101 | `(("tzdata" ,tzdata-for-tests) |
dfdaea32 HG |
102 | ;; Remaining packages are test requirements taken from |
103 | ;; tests/requirements/py3.txt | |
d18197af HG |
104 | ("python-docutils" ,python-docutils) |
105 | ;; optional for tests: ("python-geoip2" ,python-geoip2) | |
106 | ("python-jinja2" ,python-jinja2) ; >= 2.7 | |
107 | ;; optional for tests: ("python-memcached" ,python-memcached) | |
108 | ("python-numpy" ,python-numpy) | |
109 | ("python-pillow" ,python-pillow) | |
110 | ("python-pyyaml" ,python-pyyaml) | |
d18197af | 111 | ;; optional for tests: ("python-selenium" ,python-selenium) |
d18197af | 112 | ("python-tblib" ,python-tblib))) |
0458ab53 | 113 | (propagated-inputs |
3f8041f9 | 114 | `(("python-argon2-cffi" ,python-argon2-cffi) |
ac3103e8 | 115 | ("python-asgiref" ,python-asgiref) |
3f8041f9 | 116 | ("python-bcrypt" ,python-bcrypt) |
60c964ab MB |
117 | ("python-pytz" ,python-pytz) |
118 | ||
119 | ;; This input is not strictly required, but in practice many Django | |
120 | ;; libraries need it for test suites and similar. | |
121 | ("python-sqlparse" ,python-sqlparse))) | |
8198c19c | 122 | (home-page "https://www.djangoproject.com/") |
d18197af HG |
123 | (synopsis "High-level Python Web framework") |
124 | (description | |
125 | "Django is a high-level Python Web framework that encourages rapid | |
126 | development and clean, pragmatic design. It provides many tools for building | |
127 | any Web site. Django focuses on automating as much as possible and adhering | |
128 | to the @dfn{don't repeat yourself} (DRY) principle.") | |
129 | (license license:bsd-3) | |
87f06765 | 130 | (properties `((cpe-name . "django"))))) |
b53fc294 | 131 | |
ac3103e8 MB |
132 | (define-public python-django-2.2 |
133 | (package | |
134 | (inherit python-django) | |
1467080d | 135 | (version "2.2.20") |
ac3103e8 MB |
136 | (source (origin |
137 | (method url-fetch) | |
138 | (uri (pypi-uri "Django" version)) | |
139 | (sha256 | |
140 | (base32 | |
1467080d | 141 | "0r3a6gbhwngxl172yy6n0sq5knibl2vxc0wbk1g8licfbzfgjs95")))) |
ac3103e8 MB |
142 | (native-inputs |
143 | `(;; XXX: In 2.2 and 3.0, selenium is required for the test suite. | |
144 | ("python-selenium" ,python-selenium) | |
145 | ,@(package-native-inputs python-django))))) | |
146 | ||
52c3cb26 S |
147 | (define-public python-django-extensions |
148 | (package | |
149 | (name "python-django-extensions") | |
0cac0e0b | 150 | (version "3.0.6") |
52c3cb26 S |
151 | (source |
152 | (origin | |
153 | (method git-fetch) | |
154 | ;; Fetch from the git repository, so that the tests can be run. | |
155 | (uri (git-reference | |
b0e7b699 | 156 | (url "https://github.com/django-extensions/django-extensions") |
52c3cb26 S |
157 | (commit version))) |
158 | (file-name (string-append name "-" version)) | |
159 | (sha256 | |
160 | (base32 | |
0cac0e0b | 161 | "0sra6hazqvspxd1pnx5cj7gia1rkaz3hn06ib4wd0frc167f5afy")))) |
52c3cb26 S |
162 | (build-system python-build-system) |
163 | (arguments | |
0cac0e0b | 164 | '(#:tests? #f)) ;XXX: requires a Postgres or MySQL database |
52c3cb26 S |
165 | (propagated-inputs |
166 | `(("python-six" ,python-six) | |
167 | ("python-vobject" ,python-vobject) | |
168 | ("python-werkzeug" ,python-werkzeug) | |
d7922f48 | 169 | ("python-dateutil" ,python-dateutil))) |
52c3cb26 | 170 | (native-inputs |
d7922f48 MB |
171 | `(("python-django" ,python-django) |
172 | ("python-mock" ,python-mock) | |
52c3cb26 S |
173 | ("python-factory-boy" ,python-factory-boy) |
174 | ("python-tox" ,python-tox) | |
175 | ("python-pytest" ,python-pytest) | |
176 | ("python-pytest-cov" ,python-pytest-cov) | |
177 | ("python-pytest-django" ,python-pytest-django) | |
178 | ("python-shortuuid" , python-shortuuid))) | |
179 | (home-page | |
180 | "https://github.com/django-extensions/django-extensions") | |
181 | (synopsis "Custom management extensions for Django") | |
182 | (description | |
183 | "Django-extensions extends Django providing, for example, management | |
184 | commands, additional database fields and admin extensions.") | |
185 | (license license:expat))) | |
186 | ||
b53fc294 HG |
187 | (define-public python-django-simple-math-captcha |
188 | (package | |
189 | (name "python-django-simple-math-captcha") | |
9fb6275e MB |
190 | (version "1.0.9") |
191 | (home-page "https://github.com/alsoicode/django-simple-math-captcha") | |
b53fc294 | 192 | (source (origin |
9fb6275e MB |
193 | (method git-fetch) |
194 | (uri (git-reference | |
195 | (url home-page) | |
196 | (commit (string-append "v" version)))) | |
197 | (file-name (git-file-name name version)) | |
b53fc294 HG |
198 | (sha256 |
199 | (base32 | |
9fb6275e | 200 | "0fhy9k8haqa1296v0qpg1b5w7y3pyw9qi9z9laj5ijry1gk35qaw")))) |
b53fc294 | 201 | (build-system python-build-system) |
281cc11c | 202 | (arguments |
9fb6275e MB |
203 | '(#:phases (modify-phases %standard-phases |
204 | (add-after 'unpack 'patch-six-imports | |
205 | (lambda _ | |
206 | ;; Django no longer bundles six, adjust the imports | |
207 | ;; accordingly. The six dependency can likely be | |
208 | ;; removed in the next version. | |
209 | (substitute* (find-files "." "\\.py$") | |
210 | (("from django\\.utils import six") | |
211 | "import six")) | |
212 | #t)) | |
213 | (replace 'check | |
214 | (lambda _ | |
215 | (invoke "python" "runtests.py")))))) | |
216 | (native-inputs | |
9fb6275e | 217 | `(("python-django" ,python-django) |
d7922f48 MB |
218 | ("python-mock" ,python-mock))) |
219 | (propagated-inputs | |
220 | `(("python-six" ,python-six))) | |
b53fc294 HG |
221 | (synopsis "Easy-to-use math field/widget captcha for Django forms") |
222 | (description | |
223 | "A multi-value-field that presents a human answerable question, | |
224 | with no settings.py configuration necessary, but instead can be configured | |
225 | with arguments to the field constructor.") | |
226 | (license license:asl2.0))) | |
227 | ||
04eba1d0 EF |
228 | (define-public python-django-classy-tags |
229 | (package | |
230 | (name "python-django-classy-tags") | |
1fe17bc3 | 231 | (version "2.0.0") |
04eba1d0 EF |
232 | (source |
233 | (origin | |
234 | (method url-fetch) | |
235 | (uri (pypi-uri "django-classy-tags" version)) | |
236 | (sha256 | |
237 | (base32 | |
1fe17bc3 | 238 | "1javam3zqi3y3j0r490mm61v48yh75jaha99gb7lsxkaz6yri7fm")))) |
04eba1d0 | 239 | (build-system python-build-system) |
1fe17bc3 MB |
240 | ;; FIXME: How to make the test templates available to Django? |
241 | (arguments '(#:tests? #f)) | |
04eba1d0 EF |
242 | (home-page "https://github.com/divio/django-classy-tags") |
243 | (synopsis "Class based template tags for Django") | |
244 | (description | |
245 | "@code{django-classy-tags} is an approach at making writing template tags | |
246 | in Django easier, shorter and more fun. It provides an extensible argument | |
247 | parser which reduces most of the boiler plate code you usually have to write | |
248 | when coding custom template tags.") | |
249 | (license license:bsd-3))) | |
250 | ||
8d73558d S |
251 | (define-public python-django-taggit |
252 | (package | |
253 | (name "python-django-taggit") | |
9eccb181 | 254 | (version "1.3.0") |
8d73558d S |
255 | (source |
256 | (origin | |
257 | (method url-fetch) | |
258 | (uri (pypi-uri "django-taggit" version)) | |
259 | (sha256 | |
260 | (base32 | |
9eccb181 | 261 | "0bbkabbs77z229ps0800gxfhf75yagp4x4j5jzfysbac3zvkp0sa")))) |
8d73558d S |
262 | (build-system python-build-system) |
263 | (arguments | |
264 | '(#:phases | |
265 | (modify-phases %standard-phases | |
266 | (replace 'check | |
267 | (lambda _ | |
268 | (invoke "python3" "-m" "django" "test" "--settings=tests.settings")))))) | |
269 | (propagated-inputs | |
d7922f48 | 270 | `(("python-isort" ,python-isort))) |
8d73558d | 271 | (native-inputs |
d7922f48 MB |
272 | `(("python-django" ,python-django) |
273 | ("python-pytest" ,python-pytest) | |
8d73558d S |
274 | ("python-mock" ,python-mock))) |
275 | (home-page | |
276 | "https://github.com/jazzband/django-taggit") | |
277 | (synopsis | |
278 | "Reusable Django application for simple tagging") | |
279 | (description | |
280 | "Django-taggit is a reusable Django application for simple tagging.") | |
281 | (license license:bsd-3))) | |
9ae3e791 CB |
282 | |
283 | (define-public python-easy-thumbnails | |
284 | (package | |
285 | (name "python-easy-thumbnails") | |
286 | (version "2.7") | |
287 | (source | |
288 | (origin | |
289 | (method url-fetch) | |
290 | (uri (pypi-uri "easy-thumbnails" version)) | |
291 | (sha256 | |
292 | (base32 | |
293 | "14gzp5cv24z0qhxb7f7k7v9jgzpaj4n8yhjq83ynpx8183fs1rz4")))) | |
294 | (build-system python-build-system) | |
d7922f48 MB |
295 | (native-inputs |
296 | `(("python-django" ,python-django))) | |
9ae3e791 | 297 | (propagated-inputs |
d7922f48 | 298 | `(("python-pillow" ,python-pillow))) |
9ae3e791 CB |
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 |
ccb7d134 | 349 | `(("python-pytest" ,python-pytest-6))) |
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 | |
4a82decd EF |
383 | (native-inputs |
384 | `(("gdal" ,gdal) | |
385 | ("python-coverage" ,python-coverage) | |
d7922f48 | 386 | ("python-django" ,python-django) |
4a82decd EF |
387 | ("python-dateutil" ,python-dateutil) |
388 | ("python-geopy" ,python-geopy) | |
389 | ("python-mock" ,python-mock) | |
390 | ("python-nose" ,python-nose) | |
391 | ("python-requests" ,python-requests) | |
392 | ("python-setuptools-scm" ,python-setuptools-scm) | |
393 | ("python-pysolr" ,python-pysolr) | |
394 | ("python-whoosh" ,python-whoosh))) | |
395 | (home-page "http://haystacksearch.org/") | |
396 | (synopsis "Pluggable search for Django") | |
397 | (description "Haystack provides modular search for Django. It features a | |
398 | unified, familiar API that allows you to plug in different search backends | |
399 | (such as Solr, Elasticsearch, Whoosh, Xapian, etc.) without having to modify | |
400 | your code.") | |
401 | (license license:bsd-3))) | |
402 | ||
894810c7 EF |
403 | (define-public python-django-filter |
404 | (package | |
405 | (name "python-django-filter") | |
357f5863 | 406 | (version "2.3.0") |
894810c7 EF |
407 | (source (origin |
408 | (method url-fetch) | |
409 | (uri (pypi-uri "django-filter" version)) | |
410 | (sha256 | |
411 | (base32 | |
357f5863 | 412 | "1bz5qzdk9pk4a2lp2yacrdnqmkv24vxnz4k3lykrnpc3b7bkvrhi")))) |
894810c7 | 413 | (build-system python-build-system) |
55ab6451 MB |
414 | (arguments |
415 | '(#:phases | |
416 | (modify-phases %standard-phases | |
417 | (replace 'check | |
418 | (lambda _ | |
7b282105 | 419 | (invoke "python" "runtests.py")))))) |
fa7cd333 EF |
420 | (native-inputs |
421 | `(("python-django" ,python-django) | |
da90f337 | 422 | ("python-djangorestframework" ,python-djangorestframework) |
c695fb76 | 423 | ("python-django-crispy-forms" ,python-django-crispy-forms) |
fa7cd333 | 424 | ("python-mock" ,python-mock))) |
894810c7 EF |
425 | (home-page "https://django-filter.readthedocs.io/en/latest/") |
426 | (synopsis "Reusable Django application to filter querysets dynamically") | |
427 | (description | |
428 | "Django-filter is a generic, reusable application to alleviate writing | |
429 | some of the more mundane bits of view code. Specifically, it allows users to | |
430 | filter down a queryset based on a model’s fields, displaying the form to let | |
431 | them do this.") | |
894810c7 EF |
432 | (license license:bsd-3))) |
433 | ||
e1f06e11 | 434 | (define-public python-django-allauth |
435 | (package | |
436 | (name "python-django-allauth") | |
6c0131b3 | 437 | (version "0.42.0") |
e1f06e11 | 438 | (source |
439 | (origin | |
440 | (method url-fetch) | |
441 | (uri (pypi-uri "django-allauth" version)) | |
442 | (sha256 | |
443 | (base32 | |
6c0131b3 | 444 | "0c0x8izvrnjhrr48w6pwsfk9ddbi6yfxg7v3hh5dm1vz1d0hjwpi")))) |
e1f06e11 | 445 | (build-system python-build-system) |
17dc2a09 CB |
446 | (arguments |
447 | '(#:phases | |
448 | (modify-phases %standard-phases | |
17dc2a09 CB |
449 | (replace 'check |
450 | (lambda _ | |
451 | (setenv "DJANGO_SETTINGS_MODULE" "test_settings") | |
5b1a9e07 EF |
452 | (invoke "django-admin" "test" "allauth.tests" |
453 | "--pythonpath=.")))))) | |
e1f06e11 | 454 | (propagated-inputs |
455 | `(("python-openid" ,python-openid) | |
456 | ("python-requests" ,python-requests) | |
457 | ("python-requests-oauthlib" ,python-requests-oauthlib))) | |
458 | (native-inputs | |
d7922f48 MB |
459 | `(("python-django" ,python-django) |
460 | ("python-mock" ,python-mock))) | |
e1f06e11 | 461 | (home-page "https://github.com/pennersr/django-allauth") |
462 | (synopsis "Set of Django applications addressing authentication") | |
463 | (description | |
464 | "Integrated set of Django applications addressing authentication, | |
465 | registration, account management as well as 3rd party (social) | |
466 | account authentication.") | |
467 | (license license:expat))) | |
468 | ||
be02d4df CB |
469 | (define-public python-django-debug-toolbar |
470 | (package | |
471 | (name "python-django-debug-toolbar") | |
5495e880 | 472 | (version "2.2") |
be02d4df CB |
473 | (source |
474 | (origin | |
854d4d40 EF |
475 | (method git-fetch) |
476 | (uri (git-reference | |
b0e7b699 | 477 | (url "https://github.com/jazzband/django-debug-toolbar") |
854d4d40 EF |
478 | (commit version))) |
479 | (file-name (git-file-name name version)) | |
be02d4df CB |
480 | (sha256 |
481 | (base32 | |
5495e880 | 482 | "14069rlgjd5g724iaglai0nc636g9km4ba56r4j3k84chibqzn03")))) |
be02d4df CB |
483 | (build-system python-build-system) |
484 | (propagated-inputs | |
d7922f48 | 485 | `(("python-sqlparse" ,python-sqlparse))) |
be02d4df | 486 | (native-inputs |
d7922f48 MB |
487 | `(("python-django" ,python-django) |
488 | ("python-django-jinja" ,python-django-jinja) | |
be02d4df CB |
489 | ("python-html5lib" ,python-html5lib))) |
490 | (arguments | |
491 | '(#:phases | |
492 | (modify-phases %standard-phases | |
493 | (replace 'check | |
494 | (lambda _ | |
495 | (invoke "make" "test")))))) | |
496 | (home-page | |
497 | "https://github.com/jazzband/django-debug-toolbar") | |
498 | (synopsis "Toolbar to help with developing Django applications") | |
499 | (description | |
500 | "A configurable set of panels that display information about the current | |
501 | request and response as a toolbar on the rendered page.") | |
502 | (license license:bsd-3))) | |
503 | ||
5bbc98a3 MB |
504 | (define-public python-django-debug-toolbar-alchemy |
505 | (package | |
506 | (name "python-django-debug-toolbar-alchemy") | |
507 | (version "0.1.5") | |
508 | (home-page "https://github.com/miki725/django-debug-toolbar-alchemy") | |
509 | (source (origin | |
510 | (method url-fetch) | |
511 | (uri (pypi-uri "django-debug-toolbar-alchemy" version)) | |
512 | (sha256 | |
513 | (base32 | |
514 | "1kmpzghnsc247bc1dl22s4y62k9ijgy1pjms227018h5a4frsa5b")))) | |
515 | (build-system python-build-system) | |
516 | (arguments '(#:tests? #f)) ;XXX: 'make check' does "echo TODO" | |
517 | (propagated-inputs | |
d7922f48 | 518 | `(("python-django-debug-toolbar" ,python-django-debug-toolbar) |
5bbc98a3 MB |
519 | ("python-jsonplus" ,python-jsonplus) |
520 | ("python-six" ,python-six) | |
521 | ("python-sqlalchemy" ,python-sqlalchemy))) | |
522 | (synopsis "Django Debug Toolbar panel for SQLAlchemy") | |
523 | (description | |
524 | "This package completely mimics the default Django Debug Toolbar SQL | |
525 | panel (internally it is actually subclassed), but instead of displaying | |
526 | queries done via the Django ORM, SQLAlchemy generated queries are displayed.") | |
527 | (license license:expat))) | |
528 | ||
14d8f653 | 529 | (define-public python-django-gravatar2 |
530 | (package | |
531 | (name "python-django-gravatar2") | |
384aa00c | 532 | (version "1.4.4") |
14d8f653 | 533 | (source |
534 | (origin | |
535 | (method url-fetch) | |
536 | (uri (pypi-uri "django-gravatar2" version)) | |
537 | (sha256 | |
538 | (base32 | |
384aa00c | 539 | "1vn921fb6jjx7rf5dzhy66rkb71nwmh9ydd0xs9ys72icw4jh4y8")))) |
14d8f653 | 540 | (build-system python-build-system) |
16bd3291 CB |
541 | (arguments |
542 | '(;; TODO: The django project for the tests is missing from the release. | |
543 | #:tests? #f)) | |
14d8f653 | 544 | (inputs |
545 | `(("python-django" ,python-django))) | |
546 | (home-page "https://github.com/twaddington/django-gravatar") | |
547 | (synopsis "Gravatar support for Django, improved version") | |
548 | (description | |
549 | "Essential Gravatar support for Django. Features helper methods, | |
550 | templatetags and a full test suite.") | |
551 | (license license:expat))) | |
552 | ||
01c64cb8 JL |
553 | (define-public python-django-assets |
554 | (package | |
555 | (name "python-django-assets") | |
357ab65b | 556 | (version "2.0") |
01c64cb8 JL |
557 | (source (origin |
558 | (method url-fetch) | |
559 | (uri (pypi-uri "django-assets" version)) | |
560 | (sha256 | |
561 | (base32 | |
357ab65b | 562 | "0fc6i77faxxv1gjlp06lv3kw64b5bhdiypaygfxh5djddgk83fwa")))) |
01c64cb8 | 563 | (build-system python-build-system) |
01c64cb8 | 564 | (native-inputs |
01c64cb8 | 565 | `(("python-django" ,python-django) |
d7922f48 MB |
566 | ("python-nose" ,python-nose))) |
567 | (propagated-inputs | |
568 | `(("python-webassets" ,python-webassets))) | |
01c64cb8 JL |
569 | (home-page "https://github.com/miracle2k/django-assets") |
570 | (synopsis "Asset management for Django") | |
571 | (description | |
572 | "Asset management for Django, to compress and merge CSS and Javascript | |
573 | files. Integrates the webassets library with Django, adding support for | |
574 | merging, minifying and compiling CSS and Javascript files.") | |
575 | (license license:bsd-2))) | |
576 | ||
a2e92596 CB |
577 | (define-public python-django-jinja |
578 | (package | |
579 | (name "python-django-jinja") | |
bc136101 | 580 | (version "2.6.0") |
a2e92596 CB |
581 | (source |
582 | (origin | |
9f00d13d EF |
583 | (method git-fetch) |
584 | (uri (git-reference | |
b0e7b699 | 585 | (url "https://github.com/niwinz/django-jinja") |
9f00d13d EF |
586 | (commit version))) |
587 | (file-name (git-file-name name version)) | |
a2e92596 CB |
588 | (sha256 |
589 | (base32 | |
bc136101 | 590 | "06ldbkfkm6sc0p9sqpjph06gxrqpj78ih3dc2yik2fcba2y5mak1")))) |
a2e92596 CB |
591 | (build-system python-build-system) |
592 | (propagated-inputs | |
d7922f48 | 593 | `(("python-jinja2" ,python-jinja2) |
a2e92596 CB |
594 | ("python-pytz" ,python-pytz) |
595 | ("python-django-pipeline" ,python-django-pipeline))) | |
596 | (arguments | |
597 | '(;; TODO Tests currently fail due to issues with the configuration for | |
598 | ;; django-pipeline | |
599 | #:tests? #f | |
600 | #:phases | |
601 | (modify-phases %standard-phases | |
602 | (replace 'check | |
603 | (lambda* (#:key tests? #:allow-other-keys) | |
604 | (or | |
605 | (not tests?) | |
606 | (with-directory-excursion "testing" | |
607 | (invoke "python" "runtests.py")))))))) | |
608 | (home-page | |
609 | "https://niwinz.github.io/django-jinja/latest/") | |
610 | (synopsis "Simple jinja2 templating backend for Django") | |
611 | (description | |
612 | "This package provides a templating backend for Django, using Jinja2. It | |
613 | provides certain advantages over the builtin Jinja2 backend in Django, for | |
614 | example, explicit calls to callables from templates and better performance.") | |
615 | (license license:bsd-3))) | |
616 | ||
6673d1b5 | 617 | ;; JSONField is now built-in to Django, obsoleting this package. |
6c17e963 | 618 | (define-public python-django-jsonfield |
6673d1b5 | 619 | (deprecated-package "python-django-jsonfield" python-django)) |
6c17e963 | 620 | |
a326384b JL |
621 | (define-public python-dj-database-url |
622 | (package | |
623 | (name "python-dj-database-url") | |
76cd38f1 | 624 | (version "0.5.0") |
a326384b JL |
625 | (source (origin |
626 | (method url-fetch) | |
627 | (uri (pypi-uri "dj-database-url" version)) | |
628 | (sha256 | |
629 | (base32 | |
76cd38f1 | 630 | "0qs16g5y3lflxibsl8gwkwap21crhmmv98l60rdq6x1wawgypsja")))) |
a326384b JL |
631 | (build-system python-build-system) |
632 | (home-page "https://github.com/kennethreitz/dj-database-url") | |
633 | (synopsis "Use Database URLs in your Django Application") | |
634 | (description | |
635 | "This simple Django utility allows you to utilize the 12factor inspired | |
636 | DATABASE_URL environment variable to configure your Django application. | |
637 | ||
638 | The dj_database_url.config method returns a Django database connection | |
639 | dictionary, populated with all the data specified in your URL. There is also a | |
640 | conn_max_age argument to easily enable Django’s connection pool.") | |
641 | (license license:bsd-2))) | |
642 | ||
e1302edb EF |
643 | (define-public python-django-picklefield |
644 | (package | |
645 | (name "python-django-picklefield") | |
bfe8c030 MB |
646 | (version "3.0.1") |
647 | (home-page "https://github.com/gintas/django-picklefield") | |
648 | ;; Use a git checkout because the PyPI release lacks tests. | |
e1302edb EF |
649 | (source |
650 | (origin | |
bfe8c030 MB |
651 | (method git-fetch) |
652 | (uri (git-reference | |
653 | (url home-page) | |
654 | (commit (string-append "v" version)))) | |
655 | (file-name (git-file-name name version)) | |
e1302edb EF |
656 | (sha256 |
657 | (base32 | |
bfe8c030 | 658 | "0ni7bc86k0ra4pc8zv451pzlpkhs1nyil1sq9jdb4m2mib87b5fk")))) |
e1302edb | 659 | (build-system python-build-system) |
bfe8c030 MB |
660 | (arguments |
661 | '(#:phases (modify-phases %standard-phases | |
662 | (replace 'check | |
663 | (lambda _ | |
664 | (invoke "python" "-m" "django" "test" "-v2" | |
665 | "--settings=tests.settings")))))) | |
d7922f48 | 666 | (native-inputs `(("python-django" ,python-django))) |
e1302edb EF |
667 | (synopsis "Pickled object field for Django") |
668 | (description "Pickled object field for Django") | |
669 | (license license:expat))) | |
670 | ||
afbfe564 JL |
671 | (define-public python-django-bulk-update |
672 | (package | |
673 | (name "python-django-bulk-update") | |
07440054 | 674 | (version "2.2.0") |
afbfe564 JL |
675 | (source (origin |
676 | (method url-fetch) | |
677 | (uri (pypi-uri "django-bulk-update" version)) | |
678 | (sha256 | |
679 | (base32 | |
07440054 | 680 | "0dxkmrm3skyw82i0qa8vklxw1ma1y308kh9w2hcnvhpacn5cxdss")))) |
afbfe564 JL |
681 | (build-system python-build-system) |
682 | (arguments | |
07440054 | 683 | ;; XXX: Tests require a Postgres database. |
afbfe564 | 684 | `(#:tests? #f)) |
afbfe564 JL |
685 | (home-page "https://github.com/aykut/django-bulk-update") |
686 | (synopsis "Simple bulk update over Django ORM or with helper function") | |
687 | (description | |
688 | "Simple bulk update over Django ORM or with helper function. This | |
689 | project aims to bulk update given objects using one query over Django ORM.") | |
690 | (license license:expat))) | |
691 | ||
03a34e87 JL |
692 | (define-public python-django-contact-form |
693 | (package | |
694 | (name "python-django-contact-form") | |
3be81c85 | 695 | (version "1.8.1") |
03a34e87 JL |
696 | (source (origin |
697 | (method url-fetch) | |
698 | (uri (pypi-uri "django-contact-form" version)) | |
699 | (sha256 | |
700 | (base32 | |
3be81c85 | 701 | "1zv7bcjfrg32gcsq3bclkld79l6mcy2wcvlj81h7q2ppv1wm8vqs")))) |
03a34e87 JL |
702 | (build-system python-build-system) |
703 | (arguments | |
704 | `(#:phases | |
705 | (modify-phases %standard-phases | |
706 | (replace 'check | |
707 | (lambda _ | |
3be81c85 MB |
708 | (setenv "PYTHONPATH" |
709 | (string-append "./build/lib:" | |
710 | (getenv "PYTHONPATH"))) | |
711 | (invoke "coverage" "run" "--source" "contact_form" | |
712 | "runtests.py")))))) | |
03a34e87 | 713 | (native-inputs |
d7922f48 MB |
714 | `(("python-coverage" ,python-coverage) |
715 | ("python-django" ,python-django))) | |
03a34e87 JL |
716 | (home-page "https://github.com/ubernostrum/django-contact-form") |
717 | (synopsis "Contact form for Django") | |
718 | (description | |
719 | "This application provides simple, extensible contact-form functionality | |
720 | for Django sites.") | |
721 | (license license:bsd-3))) | |
722 | ||
659692c0 JL |
723 | (define-public python-django-contrib-comments |
724 | (package | |
725 | (name "python-django-contrib-comments") | |
380b84f2 | 726 | (version "1.9.2") |
659692c0 JL |
727 | (source (origin |
728 | (method url-fetch) | |
729 | (uri (pypi-uri "django-contrib-comments" version)) | |
730 | (sha256 | |
731 | (base32 | |
380b84f2 | 732 | "0ccdiv784a5vnpfal36km4dyg12340rwhpr0riyy0k89wfnjn8yi")))) |
659692c0 | 733 | (build-system python-build-system) |
d7922f48 | 734 | (native-inputs |
659692c0 | 735 | `(("python-django" ,python-django))) |
d7922f48 MB |
736 | (propagated-inputs |
737 | `(("python-six" ,python-six))) | |
659692c0 JL |
738 | (home-page "https://github.com/django/django-contrib-comments") |
739 | (synopsis "Comments framework") | |
740 | (description | |
741 | "Django used to include a comments framework; since Django 1.6 it's been | |
742 | separated to a separate project. This is that project. This framework can be | |
743 | used to attach comments to any model, so you can use it for comments on blog | |
744 | entries, photos, book chapters, or anything else.") | |
745 | (license license:bsd-3))) | |
746 | ||
6cd1bbd0 CB |
747 | (define-public python-django-pipeline |
748 | (package | |
749 | (name "python-django-pipeline") | |
93b5bd7c | 750 | (version "2.0.5") |
6cd1bbd0 CB |
751 | (source |
752 | (origin | |
753 | (method url-fetch) | |
754 | (uri (pypi-uri "django-pipeline" version)) | |
755 | (sha256 | |
756 | (base32 | |
93b5bd7c | 757 | "19vrbd5s12qw4qlg5n8ldv7zz2rs5y2sdid1i7lvgp92m71dayvc")))) |
6cd1bbd0 CB |
758 | (build-system python-build-system) |
759 | (arguments | |
760 | '(#:phases | |
761 | (modify-phases %standard-phases | |
762 | (add-after 'unpack 'patch-source | |
763 | (lambda _ | |
764 | (substitute* "tests/tests/test_compiler.py" | |
765 | (("\\/usr\\/bin\\/env") | |
766 | (which "env"))))) | |
767 | (replace 'check | |
768 | (lambda*(#:key tests? #:allow-other-keys) | |
769 | (or | |
770 | (not tests?) | |
771 | (begin | |
74eee9f2 TGR |
772 | (setenv "PYTHONPATH" |
773 | (string-append (getcwd) ":" | |
774 | (getenv "PYTHONPATH"))) | |
6cd1bbd0 CB |
775 | (setenv "DJANGO_SETTINGS_MODULE" "tests.settings") |
776 | (invoke "django-admin" "test" "tests")))))))) | |
d7922f48 MB |
777 | (native-inputs |
778 | `(("python-django" ,python-django))) | |
6cd1bbd0 | 779 | (propagated-inputs |
93b5bd7c | 780 | `(("python-css-html-js-minify" ,python-css-html-js-minify) |
6cd1bbd0 CB |
781 | ("python-slimit" ,python-slimit) |
782 | ("python-jsmin" ,python-jsmin))) | |
783 | (home-page | |
784 | "https://github.com/jazzband/django-pipeline") | |
785 | (synopsis "Asset packaging library for Django") | |
786 | (description | |
787 | "Pipeline is an asset packaging library for Django, providing both CSS | |
788 | and JavaScript concatenation and compression, built-in JavaScript template | |
789 | support, and optional data-URI image and font embedding.") | |
790 | (license license:expat))) | |
791 | ||
b939953b JL |
792 | (define-public python-django-redis |
793 | (package | |
794 | (name "python-django-redis") | |
924be573 | 795 | (version "4.12.1") |
b939953b JL |
796 | (source (origin |
797 | (method url-fetch) | |
798 | (uri (pypi-uri "django-redis" version)) | |
799 | (sha256 | |
800 | (base32 | |
924be573 | 801 | "0qvsm8yjchl0d3i7g20wba6px9lb5gv8kp3fcnr6hr0y0b3qjr9h")))) |
b939953b JL |
802 | (build-system python-build-system) |
803 | (arguments | |
804 | `(#:phases | |
805 | (modify-phases %standard-phases | |
806 | (replace 'check | |
807 | (lambda _ | |
f55fe42b JL |
808 | (invoke "redis-server" "--daemonize" "yes") |
809 | (with-directory-excursion "tests" | |
810 | (invoke "python" "runtests.py"))))))) | |
b939953b | 811 | (native-inputs |
d7922f48 MB |
812 | `(("python-django" ,python-django) |
813 | ("python-fakeredis" ,python-fakeredis) | |
b939953b JL |
814 | ("python-hiredis" ,python-hiredis) |
815 | ("python-mock" ,python-mock) | |
816 | ("python-msgpack" ,python-msgpack) | |
817 | ("redis" ,redis))) | |
818 | (propagated-inputs | |
d7922f48 | 819 | `(("python-redis" ,python-redis))) |
b939953b JL |
820 | (home-page "https://github.com/niwibe/django-redis") |
821 | (synopsis "Full featured redis cache backend for Django") | |
822 | (description | |
823 | "Full featured redis cache backend for Django.") | |
824 | (license license:bsd-3))) | |
825 | ||
cb9b6095 JL |
826 | (define-public python-django-rq |
827 | (package | |
828 | (name "python-django-rq") | |
da6448cd | 829 | (version "2.3.2") |
cb9b6095 JL |
830 | (source (origin |
831 | (method url-fetch) | |
832 | (uri (pypi-uri "django-rq" version)) | |
833 | (sha256 | |
834 | (base32 | |
da6448cd | 835 | "0lksnjn3q3f7y72bj2yr8870w28a5b6x0vjnd9nhpq2ah6xfz6pf")))) |
cb9b6095 JL |
836 | (build-system python-build-system) |
837 | (arguments | |
838 | `(#:phases | |
839 | (modify-phases %standard-phases | |
840 | (replace 'check | |
841 | (lambda _ | |
13968371 JL |
842 | (invoke "redis-server" "--daemonize" "yes") |
843 | (invoke "django-admin.py" "test" "django_rq" | |
844 | "--settings=django_rq.tests.settings" | |
1c24d6d6 | 845 | "--pythonpath=.")))))) |
cb9b6095 | 846 | (native-inputs |
d7922f48 MB |
847 | `(("python-django" ,python-django) |
848 | ("python-django-redis" ,python-django-redis) | |
da6448cd MB |
849 | ("python-mock" ,python-mock) |
850 | ("python-rq-scheduler" ,python-rq-scheduler) | |
13968371 | 851 | ("redis" ,redis))) |
cb9b6095 | 852 | (propagated-inputs |
d7922f48 | 853 | `(("python-rq" ,python-rq))) |
cb9b6095 JL |
854 | (home-page "https://github.com/ui/django-rq") |
855 | (synopsis "Django integration with RQ") | |
856 | (description | |
857 | "Django integration with RQ, a Redis based Python queuing library. | |
858 | Django-RQ is a simple app that allows you to configure your queues in django's | |
859 | settings.py and easily use them in your project.") | |
860 | (license license:expat))) | |
861 | ||
63c3f15d EF |
862 | (define-public python-django-q |
863 | (package | |
864 | (name "python-django-q") | |
534a6801 | 865 | (version "1.3.4") |
63c3f15d EF |
866 | (source |
867 | (origin | |
868 | (method url-fetch) | |
869 | (uri (pypi-uri "django-q" version)) | |
870 | (sha256 | |
534a6801 | 871 | (base32 "03z1pf6wlf47i7afr79a8fiiidfk1vq19yaqnv0m4qdny7f58gaj")))) |
63c3f15d | 872 | (build-system python-build-system) |
27f32604 MB |
873 | ;; FIXME: Tests require disque, Redis, MongoDB, Docker. |
874 | (arguments '(#:tests? #f)) | |
d7922f48 MB |
875 | (native-inputs |
876 | `(("python-django" ,python-django))) | |
63c3f15d EF |
877 | (propagated-inputs |
878 | `(("python-arrow" ,python-arrow) | |
879 | ("python-blessed" ,python-blessed) | |
63c3f15d | 880 | ("python-django-picklefield" ,python-django-picklefield))) |
63c3f15d EF |
881 | (home-page "https://django-q.readthedocs.io/") |
882 | (synopsis "Multiprocessing distributed task queue for Django") | |
883 | (description | |
884 | "Django Q is a native Django task queue, scheduler and worker application | |
885 | using Python multiprocessing.") | |
886 | (license license:expat))) | |
887 | ||
b0395dd6 JL |
888 | (define-public python-django-sortedm2m |
889 | (package | |
890 | (name "python-django-sortedm2m") | |
52c8d420 | 891 | (version "3.0.2") |
b0395dd6 JL |
892 | (source (origin |
893 | (method url-fetch) | |
894 | (uri (pypi-uri "django-sortedm2m" version)) | |
895 | (sha256 | |
896 | (base32 | |
52c8d420 | 897 | "0z0yymmrr2l5cznqbzwziw624df0qsiflvbpqwrpan52nww3dk4a")))) |
b0395dd6 JL |
898 | (build-system python-build-system) |
899 | (arguments | |
52c8d420 MB |
900 | `(#:phases (modify-phases %standard-phases |
901 | (replace 'check | |
902 | (lambda _ | |
903 | (setenv "PYTHONPATH" (string-append "./test_project:" | |
904 | "./build/lib:.:" | |
905 | (getenv "PYTHONPATH"))) | |
906 | (invoke "django-admin.py" "test" "--settings=settings")))))) | |
d7922f48 | 907 | (native-inputs |
b0395dd6 | 908 | `(("python-django" ,python-django))) |
52c8d420 | 909 | (home-page "https://github.com/jazzband/django-sortedm2m") |
b0395dd6 JL |
910 | (synopsis "Drop-in replacement for django's own ManyToManyField") |
911 | (description | |
912 | "Sortedm2m is a drop-in replacement for django's own ManyToManyField. | |
913 | The provided SortedManyToManyField behaves like the original one but remembers | |
914 | the order of added relations.") | |
915 | (license license:bsd-3))) | |
916 | ||
9f4a3059 JL |
917 | (define-public python-django-appconf |
918 | (package | |
919 | (name "python-django-appconf") | |
7e244ac6 | 920 | (version "1.0.4") |
9f4a3059 JL |
921 | (source (origin |
922 | (method url-fetch) | |
923 | (uri (pypi-uri "django-appconf" version)) | |
924 | (sha256 | |
925 | (base32 | |
7e244ac6 | 926 | "101k8nkc7xlffpjdi2qbrp9pc4v8hzvmkzi12qp7vms39asxwn5y")))) |
9f4a3059 | 927 | (build-system python-build-system) |
7e244ac6 MB |
928 | (arguments |
929 | '(#:phases (modify-phases %standard-phases | |
930 | (replace 'check | |
931 | (lambda _ | |
932 | (setenv "PYTHONPATH" (string-append ".:" | |
933 | (getenv "PYTHONPATH"))) | |
934 | (setenv "DJANGO_SETTINGS_MODULE" "tests.test_settings") | |
935 | (invoke "django-admin.py" "test" "-v2")))))) | |
d7922f48 | 936 | (native-inputs |
7e244ac6 | 937 | `(("python-django" ,python-django))) |
9f4a3059 JL |
938 | (home-page "https://github.com/django-compressor/django-appconf") |
939 | (synopsis "Handle configuration defaults of packaged Django apps") | |
940 | (description | |
941 | "This app precedes Django's own AppConfig classes that act as \"objects | |
942 | [to] store metadata for an application\" inside Django's app loading mechanism. | |
943 | In other words, they solve a related but different use case than | |
944 | django-appconf and can't easily be used as a replacement. The similarity in | |
945 | name is purely coincidental.") | |
946 | (license license:bsd-3))) | |
947 | ||
f77d82f1 JL |
948 | (define-public python-django-statici18n |
949 | (package | |
950 | (name "python-django-statici18n") | |
dfbe9d23 MB |
951 | (version "1.9.0") |
952 | (home-page "https://github.com/zyegfryed/django-statici18n") | |
f77d82f1 | 953 | (source (origin |
dfbe9d23 MB |
954 | (method git-fetch) |
955 | (uri (git-reference | |
956 | (url home-page) | |
957 | (commit (string-append "v" version)))) | |
958 | (file-name (git-file-name name version)) | |
f77d82f1 JL |
959 | (sha256 |
960 | (base32 | |
dfbe9d23 | 961 | "1p3myp2im6c87yc05alh91jyahqws5lcw3zzdsj4dh8lx9s9cgpf")))) |
f77d82f1 | 962 | (build-system python-build-system) |
dfbe9d23 MB |
963 | (arguments |
964 | '(#:phases (modify-phases %standard-phases | |
965 | (replace 'check | |
966 | (lambda _ | |
967 | (setenv "PYTHONPATH" | |
968 | (string-append "./tests/test_project:./build/lib:" | |
969 | (getenv "PYTHONPATH"))) | |
970 | (setenv "DJANGO_SETTINGS_MODULE" "project.settings") | |
971 | (invoke "pytest" "-vv")))))) | |
972 | (native-inputs | |
d7922f48 MB |
973 | `(("python-django" ,python-django) |
974 | ("python-pytest" ,python-pytest) | |
dfbe9d23 | 975 | ("python-pytest-django" ,python-pytest-django))) |
f77d82f1 | 976 | (propagated-inputs |
d7922f48 | 977 | `(("django-appconf" ,python-django-appconf))) |
f77d82f1 JL |
978 | (synopsis "Generate JavaScript catalog to static files") |
979 | (description | |
980 | "A Django app that provides helper for generating JavaScript catalog to | |
981 | static files.") | |
982 | (license license:bsd-3))) | |
983 | ||
40fac51a RW |
984 | (define-public python-django-tagging |
985 | (package | |
986 | (name "python-django-tagging") | |
18f1bd25 | 987 | (version "0.5.0") |
40fac51a RW |
988 | (source |
989 | (origin | |
990 | (method url-fetch) | |
991 | (uri (pypi-uri "django-tagging" version)) | |
992 | (sha256 | |
993 | (base32 | |
18f1bd25 | 994 | "13afxx30chssclxzd9gqnvwm9qyrdpnlbs6iswdfa18phfj8zmi8")))) |
40fac51a | 995 | (build-system python-build-system) |
ba1c2e5b EF |
996 | (arguments |
997 | `(#:phases | |
998 | (modify-phases %standard-phases | |
999 | (replace 'check | |
1000 | (lambda _ | |
1001 | (setenv "DJANGO_SETTINGS_MODULE" "tagging.tests.settings") | |
1002 | (invoke "django-admin" "test" "--pythonpath=.")))))) | |
1003 | (inputs | |
1004 | `(("python-django" ,python-django))) | |
40fac51a RW |
1005 | (home-page "https://github.com/Fantomas42/django-tagging") |
1006 | (synopsis "Generic tagging application for Django") | |
1007 | (description "This package provides a generic tagging application for | |
1008 | Django projects, which allows association of a number of tags with any | |
1009 | @code{Model} instance and makes retrieval of tags simple.") | |
1010 | (license license:bsd-3))) | |
1011 | ||
d5f56e90 CB |
1012 | (define-public python-djangorestframework |
1013 | (package | |
1014 | (name "python-djangorestframework") | |
c98f68cd | 1015 | (version "3.12.1") |
d5f56e90 CB |
1016 | (source |
1017 | (origin | |
1018 | (method url-fetch) | |
1019 | (uri (pypi-uri "djangorestframework" version)) | |
1020 | (sha256 | |
1021 | (base32 | |
c98f68cd | 1022 | "0jb22psb823vh5fj9az63p5lgyax9ygjy2faah16ajxvvsp54i6m")))) |
d5f56e90 CB |
1023 | (build-system python-build-system) |
1024 | (arguments | |
1025 | '(;; No included tests | |
1026 | #:tests? #f)) | |
d5f56e90 CB |
1027 | (home-page "https://www.django-rest-framework.org") |
1028 | (synopsis "Toolkit for building Web APIs with Django") | |
1029 | (description | |
1030 | "The Django REST framework is for building Web APIs with Django. It | |
7230f6d5 | 1031 | provides features like a Web-browsable API and authentication policies.") |
d5f56e90 | 1032 | (license license:bsd-2))) |
cc534f0c | 1033 | |
4fa01b78 EF |
1034 | (define-public python-django-sekizai |
1035 | (package | |
1036 | (name "python-django-sekizai") | |
c5955445 | 1037 | (version "2.0.0") |
4fa01b78 EF |
1038 | (source |
1039 | (origin | |
1040 | (method url-fetch) | |
1041 | (uri (pypi-uri "django-sekizai" version)) | |
1042 | (sha256 | |
1043 | (base32 | |
c5955445 | 1044 | "0vrkli625b5s1wldri3dyrfvqbxg7zxy2pg0rpjixw3b1ndz0ag8")))) |
4fa01b78 EF |
1045 | (build-system python-build-system) |
1046 | (arguments '(#:tests? #f)) ; Tests not included with release. | |
d7922f48 MB |
1047 | (native-inputs |
1048 | `(("python-django" ,python-django))) | |
4fa01b78 | 1049 | (propagated-inputs |
d7922f48 | 1050 | `(("python-django-classy-tags" ,python-django-classy-tags) |
4fa01b78 EF |
1051 | ("python-six" ,python-six))) |
1052 | (home-page "https://github.com/divio/django-sekizai") | |
1053 | (synopsis "Template blocks for Django projects") | |
403809af | 1054 | (description "Sekizai means blocks in Japanese, and that is what this app |
4fa01b78 EF |
1055 | provides. A fresh look at blocks. With @code{django-sekizai} you can define |
1056 | placeholders where your blocks get rendered and at different places in your | |
1057 | templates append to those blocks. This is especially useful for css and | |
1058 | javascript. Your subtemplates can now define css and javscript files to be | |
1059 | included, and the css will be nicely put at the top and the javascript to the | |
1060 | bottom, just like you should. Also sekizai will ignore any duplicate content in | |
1061 | a single block.") | |
1062 | (license license:bsd-3))) | |
1063 | ||
cc534f0c CB |
1064 | (define-public python-django-crispy-forms |
1065 | (package | |
1066 | (name "python-django-crispy-forms") | |
9e4fef92 | 1067 | (version "1.9.2") |
cc534f0c CB |
1068 | (source |
1069 | (origin | |
1070 | (method url-fetch) | |
1071 | (uri (pypi-uri "django-crispy-forms" version)) | |
1072 | (sha256 | |
1073 | (base32 | |
9e4fef92 | 1074 | "0fxlf233f49hjax786p4r650rd0ilvhnpyvw8hv1d1aqnkxy1wgj")))) |
cc534f0c CB |
1075 | (build-system python-build-system) |
1076 | (arguments | |
1077 | '(;; No included tests | |
1078 | #:tests? #f)) | |
d7922f48 | 1079 | (native-inputs |
cc534f0c CB |
1080 | `(("python-django" ,python-django))) |
1081 | (home-page | |
1082 | "http://github.com/maraujop/django-crispy-forms") | |
1083 | (synopsis "Tool to control Django forms without custom templates") | |
1084 | (description | |
1085 | "@code{django-crispy-forms} lets you easily build, customize and reuse | |
1086 | forms using your favorite CSS framework, without writing template code.") | |
1087 | (license license:expat))) | |
8b209bb6 | 1088 | |
da3dbd61 EF |
1089 | (define-public python-django-compressor |
1090 | (package | |
1091 | (name "python-django-compressor") | |
1092 | (version "2.4") | |
1093 | (source | |
1094 | (origin | |
1095 | (method url-fetch) | |
1096 | (uri (pypi-uri "django_compressor" version)) | |
1097 | (sha256 | |
1098 | (base32 | |
1099 | "0kx7bclfa0sxlsz6ka70zr9ra00lks0hmv1kc99wbanx6xhirvfj")))) | |
1100 | (build-system python-build-system) | |
1101 | (arguments | |
1102 | '(#:phases | |
1103 | (modify-phases %standard-phases | |
1104 | (replace 'check | |
1105 | (lambda* (#:key tests? #:allow-other-keys) | |
1106 | (if tests? | |
1107 | (begin | |
1108 | (setenv "DJANGO_SETTINGS_MODULE" "compressor.test_settings") | |
1109 | (invoke "django-admin" "test" | |
1110 | "--pythonpath=.")) | |
1111 | #t)))) | |
1112 | ;; Tests fail with beautifulsoup 4.9+ | |
1113 | ;; https://github.com/django-compressor/django-compressor/issues/998 | |
1114 | #:tests? #f)) | |
1115 | (propagated-inputs | |
1116 | `(("python-django-appconf" ,python-django-appconf) | |
1117 | ("python-rcssmin" ,python-rcssmin) | |
1118 | ("python-rjsmin" ,python-rjsmin))) | |
1119 | (native-inputs | |
1120 | `(("python-beautifulsoup4" ,python-beautifulsoup4) | |
1121 | ("python-brotli" ,python-brotli) | |
1122 | ("python-csscompressor" ,python-csscompressor) | |
1123 | ("python-django-sekizai" ,python-django-sekizai) | |
1124 | ("python-mock" ,python-mock))) | |
1125 | (home-page "https://django-compressor.readthedocs.io/en/latest/") | |
1126 | (synopsis | |
1127 | "Compress linked and inline JavaScript or CSS into single cached files") | |
1128 | (description | |
1129 | "Django Compressor combines and compresses linked and inline Javascript or | |
1130 | CSS in a Django templates into cacheable static files by using the compress | |
1131 | template tag.") | |
1132 | (license license:expat))) | |
1133 | ||
8b209bb6 VV |
1134 | (define-public python-django-override-storage |
1135 | (package | |
1136 | (name "python-django-override-storage") | |
e06e250d MB |
1137 | (version "0.3.0") |
1138 | (home-page "https://github.com/danifus/django-override-storage") | |
8b209bb6 VV |
1139 | (source |
1140 | (origin | |
e06e250d MB |
1141 | (method git-fetch) |
1142 | (uri (git-reference | |
1143 | (url home-page) | |
1144 | (commit (string-append "v" version)))) | |
1145 | (file-name (git-file-name name version)) | |
8b209bb6 | 1146 | (sha256 |
e06e250d | 1147 | (base32 "081kzfk7mmybhihvc92d3hsdg0r2k20ydq88fs1fgd348sq1ax51")))) |
8b209bb6 | 1148 | (build-system python-build-system) |
e06e250d MB |
1149 | (arguments |
1150 | '(#:phases (modify-phases %standard-phases | |
1151 | (replace 'check | |
1152 | (lambda _ | |
1153 | (invoke "python" "runtests.py")))))) | |
1154 | (native-inputs | |
d7922f48 MB |
1155 | `(("python-django" ,python-django) |
1156 | ("python-mock" ,python-mock))) | |
8b209bb6 VV |
1157 | (synopsis "Django test helpers to manage file storage side effects") |
1158 | (description | |
1159 | "This project provides tools to help reduce the side effects of using | |
1160 | FileFields during tests.") | |
1161 | (license license:expat))) | |
44272f2d MB |
1162 | |
1163 | (define-public python-django-auth-ldap | |
1164 | (package | |
1165 | (name "python-django-auth-ldap") | |
1166 | (version "2.2.0") | |
1167 | (source (origin | |
1168 | (method url-fetch) | |
1169 | (uri (pypi-uri "django-auth-ldap" version)) | |
1170 | (sha256 | |
1171 | (base32 | |
1172 | "1gq49l5lv6ar6yf73c8pix8n7md4109yq31s5jfk64w6n1rigbqi")))) | |
1173 | (build-system python-build-system) | |
1174 | (arguments | |
1175 | '(#:phases (modify-phases %standard-phases | |
1176 | (replace 'check | |
1177 | (lambda* (#:key inputs #:allow-other-keys) | |
1178 | (let ((openldap (assoc-ref inputs "openldap"))) | |
1179 | ;; The tests need 'slapd' which is installed to the | |
1180 | ;; libexec directory of OpenLDAP. | |
1181 | (setenv "SLAPD" (string-append openldap "/libexec/slapd")) | |
1182 | (setenv "SCHEMA" | |
1183 | (string-append openldap "/etc/openldap/schema")) | |
1184 | (invoke "python" "-m" "django" "test" | |
1185 | "--settings" "tests.settings"))))))) | |
1186 | (native-inputs | |
1187 | `(("openldap" ,openldap) | |
d7922f48 | 1188 | ("python-django" ,python-django) |
44272f2d MB |
1189 | ("python-mock" ,python-mock))) |
1190 | (propagated-inputs | |
d7922f48 | 1191 | `(("python-ldap" ,python-ldap))) |
44272f2d MB |
1192 | (home-page "https://github.com/django-auth-ldap/django-auth-ldap") |
1193 | (synopsis "Django LDAP authentication backend") | |
1194 | (description | |
330f5d66 | 1195 | "This package provides an LDAP authentication backend for Django.") |
44272f2d | 1196 | (license license:bsd-2))) |
c96bc57a MB |
1197 | |
1198 | (define-public python-django-logging-json | |
1199 | (package | |
1200 | (name "python-django-logging-json") | |
1201 | (version "1.15") | |
1202 | (source (origin | |
1203 | (method url-fetch) | |
1204 | (uri (pypi-uri "django-logging-json" version)) | |
1205 | (sha256 | |
1206 | (base32 | |
1207 | "06041a8icazzp73kg93c7k1ska12wvkq7fpcad0l0sm1qnxx5yx7")))) | |
1208 | (build-system python-build-system) | |
1209 | (arguments '(#:tests? #f)) ;no tests | |
d7922f48 MB |
1210 | (native-inputs |
1211 | `(("python-django" ,python-django))) | |
c96bc57a MB |
1212 | (propagated-inputs |
1213 | `(("python-certifi" ,python-certifi) | |
c96bc57a MB |
1214 | ("python-elasticsearch" ,python-elasticsearch) |
1215 | ("python-six" ,python-six))) | |
1216 | (home-page "https://github.com/cipriantarta/django-logging") | |
1217 | (synopsis "Log requests/responses in various formats") | |
1218 | (description | |
1219 | "This package provides a Django library that logs request, response, | |
1220 | and exception details in a JSON document. It can also send logs directly | |
1221 | to ElasticSearch.") | |
1222 | (license license:bsd-2))) | |
cc62ab59 MB |
1223 | |
1224 | (define-public python-django-netfields | |
1225 | (package | |
1226 | (name "python-django-netfields") | |
1227 | (version "1.2.2") | |
1228 | (source (origin | |
1229 | (method url-fetch) | |
1230 | (uri (pypi-uri "django-netfields" version)) | |
1231 | (sha256 | |
1232 | (base32 | |
1233 | "1c47azr5am0q8g45x0fbn0cay7vyrack6n7k6siliw1j2p0gzi7s")))) | |
1234 | (build-system python-build-system) | |
1235 | (arguments '(#:tests? #f)) ;XXX: Requires a running PostgreSQL server | |
d7922f48 MB |
1236 | (native-inputs |
1237 | `(("python-django" ,python-django))) | |
cc62ab59 | 1238 | (propagated-inputs |
d7922f48 | 1239 | `(("python-ipaddress" ,python-ipaddress) |
cc62ab59 MB |
1240 | ("python-netaddr" ,python-netaddr) |
1241 | ("python-six" ,python-six))) | |
1242 | (home-page "https://github.com/jimfunk/django-postgresql-netfields") | |
1243 | (synopsis "PostgreSQL netfields implementation for Django") | |
1244 | (description | |
1245 | "This package provides mappings for the PostgreSQL @code{INET} and | |
1246 | @code{CIDR} fields for use in Django projects.") | |
1247 | (license license:bsd-3))) | |
4f1b9191 MB |
1248 | |
1249 | (define-public python-django-url-filter | |
1250 | (package | |
1251 | (name "python-django-url-filter") | |
1252 | (version "0.3.15") | |
1253 | (home-page "https://github.com/miki725/django-url-filter") | |
1254 | (source (origin | |
1255 | (method git-fetch) | |
1256 | (uri (git-reference (url home-page) (commit version))) | |
1257 | (file-name (git-file-name name version)) | |
1258 | (sha256 | |
1259 | (base32 | |
1260 | "0r4zhqhs8y6cnplwyvcb0zpijizw1ifnszs38n4w8138657f9026")))) | |
1261 | (build-system python-build-system) | |
1262 | (arguments | |
1263 | '(#:tests? #f ;FIXME: Django raises "Apps aren't loaded yet"!? | |
1264 | #:phases (modify-phases %standard-phases | |
1265 | (add-before 'check 'loosen-requirements | |
1266 | (lambda _ | |
1267 | ;; Do not depend on compatibility package for old | |
1268 | ;; Python versions. | |
1269 | (substitute* "requirements.txt" | |
1270 | (("enum-compat") "")) | |
1271 | #t)) | |
1272 | (replace 'check | |
1273 | (lambda* (#:key tests? #:allow-other-keys) | |
1274 | (if tests? | |
1275 | (begin | |
1276 | (setenv "PYTHONPATH" | |
1277 | (string-append "./build/lib:.:" | |
1278 | (getenv "PYTHONPATH"))) | |
1279 | (setenv "DJANGO_SETTINGS_MODULE" | |
1280 | "test_project.settings") | |
1281 | (invoke "pytest" "-vv" "--doctest-modules" | |
1282 | "tests/" "url_filter/")) | |
1283 | (format #t "test suite not run~%"))))))) | |
d7922f48 MB |
1284 | (native-inputs |
1285 | `(("python-django" ,python-django))) | |
4f1b9191 MB |
1286 | (propagated-inputs |
1287 | `(("python-cached-property" ,python-cached-property) | |
4f1b9191 MB |
1288 | ("python-six" ,python-six))) |
1289 | (synopsis "Filter data via human-friendly URLs") | |
1290 | (description | |
1291 | "The main goal of Django URL Filter is to provide an easy URL interface | |
1292 | for filtering data. It allows the user to safely filter by model attributes | |
b808f74a | 1293 | and also specify the lookup type for each filter (very much like |
4f1b9191 MB |
1294 | Django's filtering system in ORM).") |
1295 | (license license:expat))) |