Last active
January 21, 2019 12:31
-
-
Save acatejr/3c932e60b471d4a450d5 to your computer and use it in GitHub Desktop.
Rendering svg static files while running Django development server
This file contains 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
# The django development server (1.9) does not seem to render svg files. In order to render them these lines | |
# can be added to the project's settings.py file. This may require restarting the django server and clearing the browser cache. | |
import mimetypes | |
mimetypes.add_type("image/svg+xml", ".svg", True) | |
mimetypes.add_type("image/svg+xml", ".svgz", True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment