Skip to main content
Join the official 2020 Python Developers SurveyStart the survey!

Icon Picker for admin panel In Django

Project description

Django Material Icon Picker Widget

How to start:

pip install django-material-icons

Include it in the settings (Installed apps):

    'icon_picker_widget', #<---- 

Add static path files of widget to

    ('icon_picker_widget',os.path.join(BASE_DIR, 'icon_picker_widget/static'))

Example of Usage:

from django.db import models

class BlogPost(models.Model):
    name = models.TextField()
    icon = models.TextField()

from django import forms
from django.contrib import admin
from icon_picker_widget.widgets import IconPickerWidget
from .models import BlogPost

class BlogPostAdminForm(forms.ModelForm):
    def __init__(self, *args, **kwargs):
        super(BlogPostAdminForm, self).__init__(*args, **kwargs)
        self.fields['icon'].widget = IconPickerWidget()

class BlogPostAdmin(admin.ModelAdmin):
    form = BlogPostAdminForm, BlogPostAdmin)


This widget wraps npick, a no-frills, no-fuss javascript icon picker.

Project details

Download files

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

Files for django-material-icon-widget, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size django_material_icon_widget-0.1.1-py3.6.egg (10.2 kB) File type Egg Python version 3.6 Upload date Hashes View
Filename, size django_material_icon_widget-0.1.1-py3-none-any.whl (9.7 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size django-material-icon-widget-0.1.1.tar.gz (8.8 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page