Skip to main content

Django Pick material Icon Widget

Install

pip install django-npick

Usage

add templates path admin/change_form.html extra the default admin template to use js css

# project/settings.py
from django-npick import TEMPLATE_PATH   # 1

TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [TEMPLATE_PATH],  # add templates path # 2
        'APP_DIRS': True,
        'OPTIONS': {)
    },
]

start an app

python manage.py startapp app

define your model

from django.db import models


class Icon(models.Model):
    name = models.CharField(max_length=30)

Add IconWidget to form then add form to Admin.

# app/admin.py
django.contrib import admin
from django import forms
from django_npick import IconWidget  # 3

from .models import Bingo


class BingoForm(forms.ModelForm):
    name = forms.CharField(widget=IconWidget)  # 4


class BingoAdmin(admin.ModelAdmin):
    form = BingoForm
    fields = ['name']

admin.site.register(Bingo, BingoAdmin)

runserver

python manage.py migrate
python manage.py createsuperuser
python manage.py runserver

Metadata

Release files for django-npick 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-npick 0.0.1
File Size Uploaded Provenance Actions
django-npick-0.0.1.tar.gz 14.9 kB Without provenance Details for django-npick-0.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-npick 0.0.1
File Interpreter ABI Platform Actions
django_npick-0.0.1-py3.6.egg Legacy Egg format - - Details for django_npick-0.0.1-py3.6.egg

Total release size: 36.6 kB

Release files / django-npick-0.0.1.tar.gz

Download URL django-npick-0.0.1.tar.gz
Size 14.9 kB
Tags Source
SHA-256 checksum
How to use checksums
dc3009ca21b1232dd16ebd9c0de4a6dd286f29e9d490ad2128eaa898410d58b9
BLAKE2b-256 checksum
How to use checksums
17b896c0b9f047f08a514476f6724b2f9391fe80bf905f7903bddf464a9237b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.8

Release files / django_npick-0.0.1-py3.6.egg

Download URL django_npick-0.0.1-py3.6.egg
Size 21.6 kB
Tags Egg
SHA-256 checksum
How to use checksums
d691357ff92c1eb4ab42926abd2b47ec5aa4820b8e2da4031e2cb5a8f4fc52cd
BLAKE2b-256 checksum
How to use checksums
16aaf2f49065d9a49f0c154cc7ee157a594321f3f711ad4b12e427d7bbbb1c65
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.8

Security for django-npick 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page