A simple Django app to conduct Web-based polls.
Project description
=====
Django Postgresql RGB ColorField
=====
This is a ColorField based on django's `from django.contrib.postgres.ArrayField`. Though it shows Hex in admin and let you pick color, it is saving its value as rgb array. Which is perticularly useful if you want to do query and calculation over it. e.g. Getting colors close to another.
Quick start
-----------
1. Add "polls" to your INSTALLED_APPS setting like this::
INSTALLED_APPS = [
...
'colorfield',
]
2. Import and Use `ColorField`::
from django.db import models
from .fields import ColorField
# Create your models here.
class ColorPallate(models.Model):
color1 = ColorField(null=True, blank=True)
color2 = ColorField(null=True, blank=True)
color3 = ColorField(null=True, blank=True)
def __str__(self):
return f"Pallate {self.id}"
Django Postgresql RGB ColorField
=====
This is a ColorField based on django's `from django.contrib.postgres.ArrayField`. Though it shows Hex in admin and let you pick color, it is saving its value as rgb array. Which is perticularly useful if you want to do query and calculation over it. e.g. Getting colors close to another.
Quick start
-----------
1. Add "polls" to your INSTALLED_APPS setting like this::
INSTALLED_APPS = [
...
'colorfield',
]
2. Import and Use `ColorField`::
from django.db import models
from .fields import ColorField
# Create your models here.
class ColorPallate(models.Model):
color1 = ColorField(null=True, blank=True)
color2 = ColorField(null=True, blank=True)
color3 = ColorField(null=True, blank=True)
def __str__(self):
return f"Pallate {self.id}"
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for django-postgresql-rgb-colorfield-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 947d8c432a4e12c3573a85cbba87a35c0a18fb53cfed19080343e894e67c3193 |
|
MD5 | 789cd33175d593375459b31dec70923a |
|
BLAKE2b-256 | 47d5eba6ee478770f8e8b47075e1fa06b9171c97cb51b5fbe48579652af31788 |