All Projects → zostera → Django Icons

zostera / Django Icons

Licence: bsd-3-clause
Icons for Django

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Django Icons

Grocerystore With Server
Grocery Store with server integration
Stars: ✭ 51 (-7.27%)
Mutual labels:  django
Django Rest Framework Tricks
Collection of various tricks for Django REST framework.
Stars: ✭ 52 (-5.45%)
Mutual labels:  django
Django Airports
✈️ It's like django-cities, but django-airports
Stars: ✭ 54 (-1.82%)
Mutual labels:  django
Django Money
Money fields for Django forms and models.
Stars: ✭ 1,064 (+1834.55%)
Mutual labels:  django
Django Custom User Model
django custom user model
Stars: ✭ 52 (-5.45%)
Mutual labels:  django
Antu Icons
A smooth theme designed for Plasma Desktop
Stars: ✭ 53 (-3.64%)
Mutual labels:  icons
Yesterday I Learned
Brainfarts are caused by the rupturing of the cerebral sphincter.
Stars: ✭ 50 (-9.09%)
Mutual labels:  django
Django Extra Views
Django's class-based generic views are awesome, let's have more of them.
Stars: ✭ 1,078 (+1860%)
Mutual labels:  django
Evolvere Icons
Stars: ✭ 52 (-5.45%)
Mutual labels:  icons
Kala App
Kala Document Management System
Stars: ✭ 53 (-3.64%)
Mutual labels:  django
Django Preferences
Django app allowing users to set app specific preferences through the admin interface.
Stars: ✭ 51 (-7.27%)
Mutual labels:  django
Django Channels React Multiplayer
turn based strategy game using django channels, redux, and react hooks
Stars: ✭ 52 (-5.45%)
Mutual labels:  django
Mdi Vue
Material design icons for vue.js
Stars: ✭ 53 (-3.64%)
Mutual labels:  icons
Django Campaign
Newsletter management app for Django
Stars: ✭ 50 (-9.09%)
Mutual labels:  django
River Admin
🚀 A shiny admin interface for django-river built with DRF, Vue & Vuetify
Stars: ✭ 55 (+0%)
Mutual labels:  django
Disposableemailchecker
Python class for use with Django to detect Disposable Emails
Stars: ✭ 50 (-9.09%)
Mutual labels:  django
Channelstream
Channelstream is a websocket communication server for web applications
Stars: ✭ 52 (-5.45%)
Mutual labels:  django
Dj Paypal
Paypal integration for Django - Inspired by Dj-Stripe
Stars: ✭ 55 (+0%)
Mutual labels:  django
Opentaps seas
opentaps Smart Energy Applications Suite
Stars: ✭ 55 (+0%)
Mutual labels:  django
Urljects
Deprecated! (Django routing without urls.py files, inspired by Flask.)
Stars: ✭ 53 (-3.64%)
Mutual labels:  django

django-icons

Icons for Django

CI Coverage Status Latest PyPI version Any color you like

Why should I use this?

  • Define your icons in your settings, with defaults for name, title and other attributes.
  • Generate icons using template tags.
  • Supports Font Awesome, Material, Bootstrap 3 and images out of the box.
  • Add other (custom) icon sets by subclassing a renderer.

How do I use this?

Define an icon in your settings.py, for example like this:

DJANGO_ICONS = {
    "ICONS": {
        "edit": {"name": "far fa-pencil"},
    },
}

The basic usage in a Django template:

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

This will generate the FontAwesome 5 pencil icon in regular style:

<i class="far fa-pencil"></i>

Add extra classes and attributes to your predefined icon like this:

{% load icons %}
{% icon 'edit' extra_classes='fa-fw my-own-icon' title='Update' %}

This will generate:

<i class="far fa-pencil fa-fw my-own-icon" title="Update"></i>

Requirements

This package requires a Python 3.6 or newer and Django 2.2 or newer.

The combination must be supported by the Django Project. See "Supported Versions" on https://www.djangoproject.com/download/.

Local installation

django-icons adopts Poetry to manage its dependencies. This is the recommended way to do a local installation for development or to run the demo.

Assuming Python>=3.6 is available on your system, the development dependencies are installed with Poetry as follows:

$ git clone git://github.com/zostera/django-icons.git
$ cd colour
$ poetry install

Running the demo

You can run the small demo app that is part of the test suite:

poetry run python manage.py runserver

Running the tests

The test suite requires tox to be installed. Run the complete test suite like this:

tox

Test for the current (virtual) environment can be run with the Django manage.py command. If you need to do this, you will need to have an understanding of Python virtual environments. Explaining those is beyong the scope of this README.

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].