Closed Stephen-ONeil closed 1 year ago
Coverage Report
File Stmts Miss Cover Missing phac_aspc/django excel.py 148 28 81% 17–18, 49, 71, 81, 85, 119–121, 125–129, 132–133, 162, 170, 187–188, 214, 217, 219, 221, 224, 230, 236, 255–256, 263–264 fields.py 79 16 80% 46, 67–80, 102–105, 120–125, 128–132 phac_aspc/django/admin/decorators admin_decorators.py 18 2 89% 37–38 phac_aspc/django/helpers jinja_dtl_interop_utils.py 7 1 86% 21 phac_aspc/django/helpers/auth backend.py 28 28 0% 2–36 views.py 44 27 39% 22, 27–30, 35–43, 48–100 phac_aspc/django/helpers/locale code.py 8 3 62% 10, 13–14 phac_aspc/django/helpers/logging configure_logging.py 31 1 97% 124 json_post_handlers.py 27 3 89% 8–9, 61 utils.py 11 2 82% 43, 48 phac_aspc/django/helpers/templatetags phac_aspc_auth.py 7 1 86% 14 phac_aspc_localization.py 11 4 64% 11, 26–29 phac_aspc/django/helpers/views wet.py 10 6 40% 12–19 phac_aspc/django/localization hooks.py 6 6 0% 2–16 phac_aspc/django/localization/decorators __init__.py 2 2 0% 4–6 localization_decorators.py 11 11 0% 4–46 phac_aspc/django/settings logging.py 27 15 44% 29–37, 47–66 security.py 21 9 57% 34–45 phac_aspc/django/settings/utils configure_settings_for_tests.py 3 2 33% 15–19 TOTAL 728 167 77%
Tests | Skipped | Failures | Errors | Time |
---|---|---|---|---|
39 | 0 :zzz: | 0 :x: | 0 :fire: | 2.388s :stopwatch: |
Inlines the content of a svg from static files in to a template. There are cases where this is going to be preferred over an
<img src="...">
or<object...
. E.g. if the svg itself includes a11y markup (img
is opaque to that,object
is reportedly inconsistent depending on browser and screen reader).Jinja templates can use this too, via the standard pattern of adding templatetags to the jinja
env.globals
. I could extract it in to a util that could be used directly in jinja, and just wrap that for a templatetag, but ehh.