Created
September 27, 2016 21:29
-
-
Save chrisvoncsefalvay/ba01ac7ecf2cea9e9dcf5c7d2246fe8d to your computer and use it in GitHub Desktop.
Insert SVG as <object> in Django
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% load i18n static template_tags %} | |
<html> | |
<head> | |
<title>Hello, world!</title> | |
</head> | |
<body> | |
<h1>This is an SVG, inserted as an object.</h1> | |
{% svgobject 'images/svg/test.svg' 'test-class-one' 'test-class-two' %} | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Hello, world!</title> | |
</head> | |
<body> | |
<h1>This is an SVG, inserted as an object.</h1> | |
<object class="test-class-one test-class-two" type="image/svg+xml" data="http://www.example.com/static/images/svg/test.svg"></object> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment