Django RemixIcon

A simple Django package for integrating RemixIcon with Django admin and templates.

Django RemixIcon provides seamless integration of the popular RemixIcon library into Django projects, with special focus on Django admin functionality. It includes a custom model field, admin widget with autocomplete, and template tags for easy icon rendering.

Key Features

  • IconField: Custom Django model field for storing RemixIcon names

  • Admin Integration: Autocomplete widget with icon preview in Django admin

  • Template Tags: Simple template tags for rendering icons in templates

  • Inline Support: Works seamlessly with Django admin inline models

  • Performance: Efficient autocomplete with search functionality

  • Simple: Minimal configuration required

Quick Example

# models.py
from django.db import models
from django_remix_icon.fields import IconField

class MenuItem(models.Model):
    name = models.CharField(max_length=100)
    icon = IconField()
<!-- template.html -->
{% load remix_icon_tags %}

{% remix_icon_css %}

<div class="menu-item">
    {% remix_icon menu_item.icon %}
    {{ menu_item.name }}
</div>

Installation

Install the package via pip:

pip install django-remix-icon

Add to your Django settings:

INSTALLED_APPS = [
    # ... your other apps
    'django_remix_icon',
]

Include the package URLs in your project’s URL configuration:

# urls.py
from django.urls import path, include

urlpatterns = [
    # ... your other URLs
    path('remix-icon/', include('django_remix_icon.urls')),
]

Contents

Indices and tables