A simple SVG template tag for Django
Project description
A simple plugin that adds an svg template tag to inline your SVGs in your Django templates
Installation
Install it from pypi.
$ pip install django-inline-svg
Add svg to your INSTALLED_APPS.
INSTALLED_APPS = ( ... 'svg', ... )
Usage
Store your SVGs in folder named svg folder at the root of any of your static file directories.
my_app |-- static | |-- svg | |-- logo.svg | |-- check.svg | |-- cross.svg
Use the svg template tag.
{% load svg %} <h1 class="logo">{% svg 'logo' %}</h1>
Support
The tests are run against Django 1.8, 1.9, and Python 2.7, 3.3, 3.4, 3.5.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file django-inline-svg-0.1.0.tar.gz
.
File metadata
- Download URL: django-inline-svg-0.1.0.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cfd9d6d9ee96e3353f9a55a9dee5ea0571d2d35528fd48d07651f5a71d243af5 |
|
MD5 | 796c23beb2b0038c16a499b9b59fd88e |
|
BLAKE2b-256 | ecb6b380ae81e154a0666e1d757baca08dd396ccfc4563acfb2e080d905a2d17 |