wip/72777-publik-django-templatetags (#72777) #17
|
@ -26,6 +26,7 @@ Depends: python3-cmislib,
|
|||
python3-lxml,
|
||||
python3-pdfrw,
|
||||
python3-pil,
|
||||
python3-publik-django-templatetags,
|
||||
python3-pycryptodome,
|
||||
python3-pyexcel-io,
|
||||
python3-pyexcel-ods,
|
||||
|
|
|
@ -286,17 +286,6 @@ def render_body_schemas(body_schemas):
|
|||
return mark_safe(s)
|
||||
|
||||
|
||||
@register.filter(name='get')
|
||||
def get(obj, key):
|
||||
try:
|
||||
return obj.get(key)
|
||||
except AttributeError:
|
||||
try:
|
||||
return obj[key]
|
||||
except (IndexError, KeyError, TypeError):
|
||||
return None
|
||||
|
||||
|
||||
@register.filter
|
||||
def json_dumps(d):
|
||||
return json.dumps(d, indent=2)
|
||||
|
|
|
@ -102,6 +102,9 @@ TEMPLATES = [
|
|||
'django.contrib.messages.context_processors.messages',
|
||||
'django.template.context_processors.request',
|
||||
],
|
||||
'builtins': [
|
||||
'publik_django_templatetags.publik.templatetags.publik',
|
||||
],
|
||||
},
|
||||
},
|
||||
]
|
||||
|
|
2
tox.ini
2
tox.ini
|
@ -49,6 +49,7 @@ deps =
|
|||
codestyle: pre-commit
|
||||
ldaptools
|
||||
python-ldap<=3.2 # align with Debian <= 11 (buster, bullseye)
|
||||
git+https://git.entrouvert.org/publik-django-templatetags.git
|
||||
commands =
|
||||
./get_wcs.sh
|
||||
py.test {posargs: --numprocesses {env:NUMPROCESSES:1} --dist loadfile {env:FAST:} {env:COVERAGE:} {env:JUNIT:} tests/}
|
||||
|
@ -85,5 +86,6 @@ deps =
|
|||
responses
|
||||
mohawk
|
||||
ldaptools
|
||||
git+https://git.entrouvert.org/publik-django-templatetags.git
|
||||
commands =
|
||||
./pylint.sh passerelle/ tests/
|
||||
|
|
Loading…
Reference in New Issue