Skip to main content

Icons for Django

Project description

django-icons

Icons for Django

https://travis-ci.org/zostera/django-icons.svg?branch=develop https://coveralls.io/repos/github/zostera/django-icons/badge.svg?branch=develop Latest PyPI version

Warning

While version < 1 (0.x.y), this project will not be fit for production use, and not adhere to semver. From 1.0.0 on, django-icons will be deemed product ready and semantic versioning will be respected.

Features

Use simple template tags to generate icons in your web application. Supports Font Awesome out of the box, easily adaptable for other icon libraries.

The basic usage is

{% load icons %}
{% icon 'edit' %}

Requirements

Django >= 1.11 and a matching Python version. Using Python 3 is strongly recommended.

Running the tests

The test suite uses tox. Run the complete test suite like this:

tox

Run the tests only for the current environment like this:

python manage.py test

Origin

Our plans at Zostera for an icon tool originate in https://github.com/dyve/django-bootstrap3. We isolated this into a Font Awesome tool in https://github.com/zostera/django-fa. When using our own product, we felt that the icon tool provided little improvement over plain HTML. Also, Font Awesome’s icon names did not match the the intended function of the icon. This is how we came to think of a library that

  • Took a limited number of arguments

  • Converted those arguments into an icon

  • Was able to support multiple icon libraries

  • And could easily be extended by users

This is how we came to write and use django-icons.

Changelog

0.1.0 - in progress

0.0.5 - 2017-12-21

  • Fix typo’s

  • Adjust tox matrix to currently supported Django versions

  • Fixed names of tests

  • Add tests for BaseRenderer

0.0.4 - 2017-06-22

  • Autogenerate docs for icon template tag

  • Fix typo in README

0.0.3 - 2017-06-22

  • Bug fixes

  • More tests

  • More documentation

0.0.2 - 2017-06-19

  • Updated docs and tests

  • Demo of custom SVG renderer included

  • FontAwesome and Bootstrap3 renderers included

  • New structure for settings dict

  • First documentation, linked to ReadTheDocs

  • First tests

  • Introducing the icon template tag

0.0.1 - 2017-06-15

  • First publication on GitHub and PyPI

  • Non-functional, just names and tests

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-icons-0.1.0.tar.gz (1.6 MB view details)

Uploaded Source

File details

Details for the file django-icons-0.1.0.tar.gz.

File metadata

  • Download URL: django-icons-0.1.0.tar.gz
  • Upload date:
  • Size: 1.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for django-icons-0.1.0.tar.gz
Algorithm Hash digest
SHA256 bff9e18cdccc7311ffc6bf2e2fc6bbbd4a5abc77f368bc9e8adbe3819c54aef7
MD5 36b7d971490e416ea58c1267f70e4053
BLAKE2b-256 83aa337110bc5c7933c6c7e3ea3bdf00339dd0f0336c25f32100cfef22dc4729

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page