blob: 20f88ca5ac2c92178d05a8901f6e86596cfd0b2e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
{
lib,
buildPythonPackage,
fetchFromGitHub,
# build-system
setuptools,
# dependencies
django,
jinja2,
# tests
pytest-django,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "django-jinja";
version = "2.11.0";
pyproject = true;
src = fetchFromGitHub {
owner = "niwinz";
repo = "django-jinja";
tag = version;
hash = "sha256-0gkv9xinHux8TRiNBLl/JgcimXU3CzysxzGR2jn7OZ4=";
};
build-system = [ setuptools ];
dependencies = [
django
jinja2
];
nativeCheckInputs = [
pytestCheckHook
pytest-django
];
preCheck = ''
pushd testing
export DJANGO_SETTINGS_MODULE=settings
'';
pytestFlagsArray = [
"testapp/tests.py"
];
disabledTests = lib.optionals (lib.versionAtLeast django.version "5.2") [
# https://github.com/niwinz/django-jinja/issues/317
"test_autoscape_with_form_errors"
];
postCheck = ''
popd
'';
meta = {
description = "Simple and nonobstructive jinja2 integration with Django";
homepage = "https://github.com/niwinz/django-jinja";
changelog = "https://github.com/niwinz/django-jinja/blob/${src.rev}/CHANGES.adoc";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ dotlambda ];
};
}
|