%global _empty_manifest_terminate_build 0 Name: python-django-colorful Version: 1.3 Release: 1 Summary: An extension to the Django web framework that provides database and form color fields License: MIT License URL: https://github.com/charettes/django-colorful Source0: https://mirrors.nju.edu.cn/pypi/web/packages/b7/9f/3e19b35b6d85ec5b6cffde8533b6a0fca5d435b278c6537428c32e1ab6b5/django-colorful-1.3.tar.gz BuildArch: noarch Requires: python3-Django %description ############### django-colorful ############### An extension to the Django web framework that provides a database and form field to accept and store colors in the RGB format. .. image:: https://travis-ci.org/charettes/django-colorful.svg?branch=master :target: https://travis-ci.org/charettes/django-colorful .. image:: https://coveralls.io/repos/charettes/django-colorful/badge.svg?branch=master&service=github :target: https://coveralls.io/github/charettes/django-colorful?branch=master ************ Installation ************ >>> pip install django-colorful Make sure ``'colorful'`` is in your `INSTALLED_APPS`: :: INSTALLED_APPS.append('colorful') ***** Usage ***** In order to use a color field you just have to add it to your model definition: :: from django.db import models from colorful.fields import RGBColorField class Tag(models.Model): color = RGBColorField() The ``RGBColorField`` class also accepts a ``color`` keyword argument which can be set to a list of colors that should be visible as preset color palette: :: color = RGBColorField(colors=['#FF0000', '#00FF00', '#0000FF']) The ``ColorFieldWidget`` should take care of providing a JavaScript based shim on browsers that don't support the HTML5 color input. .. note:: To enable HTML5 color input with `Django Grappelli`_ ensure that ``GRAPPELLI_CLEAN_INPUT_TYPES`` is set to ``False`` in your settings file. .. _Django Grappelli: https://github.com/sehmaschine/django-grappelli %package -n python3-django-colorful Summary: An extension to the Django web framework that provides database and form color fields Provides: python-django-colorful BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-django-colorful ############### django-colorful ############### An extension to the Django web framework that provides a database and form field to accept and store colors in the RGB format. .. image:: https://travis-ci.org/charettes/django-colorful.svg?branch=master :target: https://travis-ci.org/charettes/django-colorful .. image:: https://coveralls.io/repos/charettes/django-colorful/badge.svg?branch=master&service=github :target: https://coveralls.io/github/charettes/django-colorful?branch=master ************ Installation ************ >>> pip install django-colorful Make sure ``'colorful'`` is in your `INSTALLED_APPS`: :: INSTALLED_APPS.append('colorful') ***** Usage ***** In order to use a color field you just have to add it to your model definition: :: from django.db import models from colorful.fields import RGBColorField class Tag(models.Model): color = RGBColorField() The ``RGBColorField`` class also accepts a ``color`` keyword argument which can be set to a list of colors that should be visible as preset color palette: :: color = RGBColorField(colors=['#FF0000', '#00FF00', '#0000FF']) The ``ColorFieldWidget`` should take care of providing a JavaScript based shim on browsers that don't support the HTML5 color input. .. note:: To enable HTML5 color input with `Django Grappelli`_ ensure that ``GRAPPELLI_CLEAN_INPUT_TYPES`` is set to ``False`` in your settings file. .. _Django Grappelli: https://github.com/sehmaschine/django-grappelli %package help Summary: Development documents and examples for django-colorful Provides: python3-django-colorful-doc %description help ############### django-colorful ############### An extension to the Django web framework that provides a database and form field to accept and store colors in the RGB format. .. image:: https://travis-ci.org/charettes/django-colorful.svg?branch=master :target: https://travis-ci.org/charettes/django-colorful .. image:: https://coveralls.io/repos/charettes/django-colorful/badge.svg?branch=master&service=github :target: https://coveralls.io/github/charettes/django-colorful?branch=master ************ Installation ************ >>> pip install django-colorful Make sure ``'colorful'`` is in your `INSTALLED_APPS`: :: INSTALLED_APPS.append('colorful') ***** Usage ***** In order to use a color field you just have to add it to your model definition: :: from django.db import models from colorful.fields import RGBColorField class Tag(models.Model): color = RGBColorField() The ``RGBColorField`` class also accepts a ``color`` keyword argument which can be set to a list of colors that should be visible as preset color palette: :: color = RGBColorField(colors=['#FF0000', '#00FF00', '#0000FF']) The ``ColorFieldWidget`` should take care of providing a JavaScript based shim on browsers that don't support the HTML5 color input. .. note:: To enable HTML5 color input with `Django Grappelli`_ ensure that ``GRAPPELLI_CLEAN_INPUT_TYPES`` is set to ``False`` in your settings file. .. _Django Grappelli: https://github.com/sehmaschine/django-grappelli %prep %autosetup -n django-colorful-1.3 %build %py3_build %install %py3_install install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi pushd %{buildroot} if [ -d usr/lib ]; then find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/lib64 ]; then find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/bin ]; then find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/sbin ]; then find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst fi touch doclist.lst if [ -d usr/share/man ]; then find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst fi popd mv %{buildroot}/filelist.lst . mv %{buildroot}/doclist.lst . %files -n python3-django-colorful -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Sun Apr 23 2023 Python_Bot - 1.3-1 - Package Spec generated