django.scm 35 KB

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