Inject a SVG file into your Django template.
The full documentation is at https://django-svg-templatetag.readthedocs.org.
Install Django SVG templatetag:
pip install django-svg-templatetag
Then use it in a project:
{% load svg %} {% svg path [as varname] %}
Examples:
{% svg "myapp/icons/icon.svg" %} {% svg variable_with_path %} {% svg "myapp/icons/icon.svg" as icon_svg_content %} {% svg variable_with_path as varname %}
- TODO
Does the code actually work?
source <YOURVIRTUALENV>/bin/activate (myenv) $ pip install -r requirements_test.txt (myenv) $ python runtests.py
Tools used in rendering this package: