django-colorinput 0.1
pip install django-colorinput==0.1
Released:
Color fields for Django models and forms using HTML5 native color type input elements
Navigation
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: GNU General Public License v3 (GPLv3)
- Author: Gabriel Niebler
- Requires: Python >=3.6
Classifiers
- Framework
- License
- Operating System
- Programming Language
Project description
Color fields for forms and models using HTML5’s native input element of type color.
Quickstart
Install django-colorinput and add it to your INSTALLED_APPS:
INSTALLED_APPS = (
…
'colorinput.apps.ColorInputConfig',
…
)
Now you can use ColorField in your models:
from django.db import models
from colorinput.models import ColorField
class MyModel(models.Model):
…
color = ColorField(default="d0d0d0")
…
In forms, the color field will be displayed using HTML5’s native color type input element. In your own templates, you could use the value stored in the field like this:
<span style="color: #{{ object.color }}">
… or however you want, really. Just keep in mind that the value is stored as RGB in triple HEX format without the leading “#” (hash symbol).
Project details
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: GNU General Public License v3 (GPLv3)
- Author: Gabriel Niebler
- Requires: Python >=3.6
Classifiers
- Framework
- License
- Operating System
- Programming Language
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file django-colorinput-0.1.tar.gz
.
File metadata
- Download URL: django-colorinput-0.1.tar.gz
- Upload date:
- Size: 13.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
2c567edcb55e2fa2ff209510fc2f9ee03a3f7b13321897deb254807711666353
|
|
MD5 |
2cf3709a6560b6dde1ada853e30efada
|
|
BLAKE2b-256 |
613fd3f42bf444f84f8451dd205c7cdf8d142d54854dc8a1880134f983752c74
|
File details
Details for the file django_colorinput-0.1-py3-none-any.whl
.
File metadata
- Download URL: django_colorinput-0.1-py3-none-any.whl
- Upload date:
- Size: 15.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
66b3474c209b1233a6783294e6a15964123a09ee03369881c33a8a638764fb5b
|
|
MD5 |
396dd697d9e8d9ddfa7fc67320d65a9b
|
|
BLAKE2b-256 |
99d59ccb2065143d61d4981fcf32c58d6bea92592c415cc4c77bafcc88d63f51
|