View gist:25962a9194ec1c6c3c590bf8977fd0ff
from reportlab.graphics import renderSVG | |
from svglib.svglib import svg2rlg | |
""" | |
The input file circle.svg contains this content: | |
<svg viewBox="0 0 300 300"> | |
<circle r="100" fill="red" transform="translate(150,150)"></circle> | |
<rect x="-25" y="-25" width="50" height="50" fill="green" transform="translate(150,150)"></rect> | |
</svg> | |
""" |
View finders.py
# -*- coding: utf-8 -*- | |
from __future__ import unicode_literals | |
import os | |
from django.conf import settings | |
from django.contrib.staticfiles.finders import FileSystemFinder | |
class ServeUnminimizedFinder(FileSystemFinder): | |
""" | |
In debug mode, serve /static/any/asset.min.ext as /static/any/asset.ext |