django-rgbfield
=====================
An extension to the Django web framework that provides database and form color fields to accept RGB encoded color
in HEX and store it as 4 bytes int.
Why use it?
-------
It saves up to 3 bytes for you!!! :)
The only loss is when you want to save color in packed form (i.e. you trying to save 'abc' (not '#abc'), which is 3 bytes but its int
representation is 4 bytes)
Installation
-------
Python package:
```
pip install django-rgbfield
```
No need to include 'rgbfield' to INSTALLED_APPS because it provides only fields and nothing more.
Usage
-------
```python
from django.db import models
from rgbfield.fields import RGBColorField
class ExampleModel(models.Model):
color = RGBColorField(default='#fff')
```
You can both generate form using ModelForm class or do it manually:
```python
from django import forms
from rgbfield.fields import RGBColorFormField
class ExampleForm(forms.Form):
color = RGBColorFormField(default='#fff')
```
=====================
An extension to the Django web framework that provides database and form color fields to accept RGB encoded color
in HEX and store it as 4 bytes int.
Why use it?
-------
It saves up to 3 bytes for you!!! :)
The only loss is when you want to save color in packed form (i.e. you trying to save 'abc' (not '#abc'), which is 3 bytes but its int
representation is 4 bytes)
Installation
-------
Python package:
```
pip install django-rgbfield
```
No need to include 'rgbfield' to INSTALLED_APPS because it provides only fields and nothing more.
Usage
-------
```python
from django.db import models
from rgbfield.fields import RGBColorField
class ExampleModel(models.Model):
color = RGBColorField(default='#fff')
```
You can both generate form using ModelForm class or do it manually:
```python
from django import forms
from rgbfield.fields import RGBColorFormField
class ExampleForm(forms.Form):
color = RGBColorFormField(default='#fff')
```
Metadata
Release files for django-rgbfield 1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django-rgbfield-1.0.tar.gz | 2.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_rgbfield-1.0-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 8.5 kB
Release files / django-rgbfield-1.0.tar.gz
| Download URL | django-rgbfield-1.0.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
597e9b538da764f18a281e4b7d0f37608655eaa6a87b928d69aea066e1ebbaa8
|
|
BLAKE2b-256 checksum How to use checksums |
bb22fc71a1e3fb1d8f2710f805329d4ae2e238943a0f17be9f35f4b2f496902b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / django_rgbfield-1.0-py2.py3-none-any.whl
| Download URL | django_rgbfield-1.0-py2.py3-none-any.whl |
|---|---|
| Size | 5.5 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
714f4d002d82941c685860e0875af4e39e043458374dfd1b9247948ba024b666
|
|
BLAKE2b-256 checksum How to use checksums |
06edf7a75d42998af87a76dd8063a13aa2f9f8594810240eadaf37174547ff07
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |