%global _empty_manifest_terminate_build 0 Name: python-django-icons Version: 23.2 Release: 1 Summary: Icons for Django License: BSD-3-Clause URL: https://github.com/zostera/django-icons Source0: https://mirrors.nju.edu.cn/pypi/web/packages/c3/dd/dbd8dfba92b6e6e8d9267865013480e41dcd66296cfed76c672c671ec4af/django-icons-23.2.tar.gz BuildArch: noarch Requires: python3-Django Requires: python3-beautifulsoup4 %description # django-icons [![CI](https://github.com/zostera/django-icons/workflows/CI/badge.svg?branch=main)](https://github.com/zostera/django-icons/actions?workflow=CI) [![Coverage Status](https://coveralls.io/repos/github/zostera/django-icons/badge.svg?branch=main)](https://coveralls.io/github/zostera/django-icons?branch=main) [![Latest PyPI version](https://img.shields.io/pypi/v/django-icons.svg)](https://pypi.python.org/pypi/django-icons) [![Any color you like](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black) ### Icons for Django - Define your icons in your settings, with defaults for name, title and other attributes. - Generate icons using template tags. - Supports Font Awesome, Material, Bootstrap 3 and images. - Add other libraries and custom icon sets by subclassing IconRenderer. ### More information - [PyPI (django-icons)](https://pypi.python.org/pypi/django-icons) - [Documentation](https://django-icons.readthedocs.io/en/latest/) - [Bug tracker](http://github.com/zostera/django-icons/issues) ## Installation Install using pip. ```shell pip install django-icons ``` In your `settings.py`, add `django_icons` to `INSTALLED_APPS` and define an icon. ```python INSTALLED_APPS = ( # ... "django_icons", # ... ) DJANGO_ICONS = { "ICONS": { "edit": {"name": "far fa-pencil"}, }, } ``` Render an icon in a Django template. ```djangotemplate {% load icons %} {% icon 'edit' %} ``` This will generate the FontAwesome 5 pencil icon in regular style. ```html ``` Add extra classes and attributes to your predefined icon. ```djangotemplate {% load icons %} {% icon 'edit' extra_classes='fa-fw my-own-icon' title='Update' %} ``` These will be added to the HTML output. ```html ``` ## Requirements This package requires a combination of Python and Django that is currently supported. See "Supported Versions" on . ## Local installation **This section assumes you know about local Python versions and virtual environments.** To clone the repository and install the requirements for local development: ```shell $ git clone git://github.com/zostera/django-icons.git $ cd django-icons $ pip install -e . $ pip install -U pip -r requirements-dev.txt ``` ### Running the demo You can run the example app: ```shell cd example && run python manage.py runserver ``` ### Running the tests The test suite requires [tox](https://tox.readthedocs.io/) to be installed. Run the complete test suite like this: ```shell tox ``` Test for the current environment can be run with the Django `manage.py` command. ```shell python manage.py test ``` ## Origin Our plans at Zostera for an icon tool originate in . We isolated this into a Font Awesome tool in . When using our own product, we felt that the icon tool provided little improvement over plain HTML. Also, Font Awesome's icon names did not match the intended function of the icon. This is how we came to think of a library that: - Took a limited number of arguments - Converted those arguments into an icon - Was able to support multiple icon libraries - Could bind an icon definition to a preset name for easy reuse - Could easily be extended by users This is how we came to write and use `django-icons`. %package -n python3-django-icons Summary: Icons for Django Provides: python-django-icons BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-django-icons # django-icons [![CI](https://github.com/zostera/django-icons/workflows/CI/badge.svg?branch=main)](https://github.com/zostera/django-icons/actions?workflow=CI) [![Coverage Status](https://coveralls.io/repos/github/zostera/django-icons/badge.svg?branch=main)](https://coveralls.io/github/zostera/django-icons?branch=main) [![Latest PyPI version](https://img.shields.io/pypi/v/django-icons.svg)](https://pypi.python.org/pypi/django-icons) [![Any color you like](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black) ### Icons for Django - Define your icons in your settings, with defaults for name, title and other attributes. - Generate icons using template tags. - Supports Font Awesome, Material, Bootstrap 3 and images. - Add other libraries and custom icon sets by subclassing IconRenderer. ### More information - [PyPI (django-icons)](https://pypi.python.org/pypi/django-icons) - [Documentation](https://django-icons.readthedocs.io/en/latest/) - [Bug tracker](http://github.com/zostera/django-icons/issues) ## Installation Install using pip. ```shell pip install django-icons ``` In your `settings.py`, add `django_icons` to `INSTALLED_APPS` and define an icon. ```python INSTALLED_APPS = ( # ... "django_icons", # ... ) DJANGO_ICONS = { "ICONS": { "edit": {"name": "far fa-pencil"}, }, } ``` Render an icon in a Django template. ```djangotemplate {% load icons %} {% icon 'edit' %} ``` This will generate the FontAwesome 5 pencil icon in regular style. ```html ``` Add extra classes and attributes to your predefined icon. ```djangotemplate {% load icons %} {% icon 'edit' extra_classes='fa-fw my-own-icon' title='Update' %} ``` These will be added to the HTML output. ```html ``` ## Requirements This package requires a combination of Python and Django that is currently supported. See "Supported Versions" on . ## Local installation **This section assumes you know about local Python versions and virtual environments.** To clone the repository and install the requirements for local development: ```shell $ git clone git://github.com/zostera/django-icons.git $ cd django-icons $ pip install -e . $ pip install -U pip -r requirements-dev.txt ``` ### Running the demo You can run the example app: ```shell cd example && run python manage.py runserver ``` ### Running the tests The test suite requires [tox](https://tox.readthedocs.io/) to be installed. Run the complete test suite like this: ```shell tox ``` Test for the current environment can be run with the Django `manage.py` command. ```shell python manage.py test ``` ## Origin Our plans at Zostera for an icon tool originate in . We isolated this into a Font Awesome tool in . When using our own product, we felt that the icon tool provided little improvement over plain HTML. Also, Font Awesome's icon names did not match the intended function of the icon. This is how we came to think of a library that: - Took a limited number of arguments - Converted those arguments into an icon - Was able to support multiple icon libraries - Could bind an icon definition to a preset name for easy reuse - Could easily be extended by users This is how we came to write and use `django-icons`. %package help Summary: Development documents and examples for django-icons Provides: python3-django-icons-doc %description help # django-icons [![CI](https://github.com/zostera/django-icons/workflows/CI/badge.svg?branch=main)](https://github.com/zostera/django-icons/actions?workflow=CI) [![Coverage Status](https://coveralls.io/repos/github/zostera/django-icons/badge.svg?branch=main)](https://coveralls.io/github/zostera/django-icons?branch=main) [![Latest PyPI version](https://img.shields.io/pypi/v/django-icons.svg)](https://pypi.python.org/pypi/django-icons) [![Any color you like](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black) ### Icons for Django - Define your icons in your settings, with defaults for name, title and other attributes. - Generate icons using template tags. - Supports Font Awesome, Material, Bootstrap 3 and images. - Add other libraries and custom icon sets by subclassing IconRenderer. ### More information - [PyPI (django-icons)](https://pypi.python.org/pypi/django-icons) - [Documentation](https://django-icons.readthedocs.io/en/latest/) - [Bug tracker](http://github.com/zostera/django-icons/issues) ## Installation Install using pip. ```shell pip install django-icons ``` In your `settings.py`, add `django_icons` to `INSTALLED_APPS` and define an icon. ```python INSTALLED_APPS = ( # ... "django_icons", # ... ) DJANGO_ICONS = { "ICONS": { "edit": {"name": "far fa-pencil"}, }, } ``` Render an icon in a Django template. ```djangotemplate {% load icons %} {% icon 'edit' %} ``` This will generate the FontAwesome 5 pencil icon in regular style. ```html ``` Add extra classes and attributes to your predefined icon. ```djangotemplate {% load icons %} {% icon 'edit' extra_classes='fa-fw my-own-icon' title='Update' %} ``` These will be added to the HTML output. ```html ``` ## Requirements This package requires a combination of Python and Django that is currently supported. See "Supported Versions" on . ## Local installation **This section assumes you know about local Python versions and virtual environments.** To clone the repository and install the requirements for local development: ```shell $ git clone git://github.com/zostera/django-icons.git $ cd django-icons $ pip install -e . $ pip install -U pip -r requirements-dev.txt ``` ### Running the demo You can run the example app: ```shell cd example && run python manage.py runserver ``` ### Running the tests The test suite requires [tox](https://tox.readthedocs.io/) to be installed. Run the complete test suite like this: ```shell tox ``` Test for the current environment can be run with the Django `manage.py` command. ```shell python manage.py test ``` ## Origin Our plans at Zostera for an icon tool originate in . We isolated this into a Font Awesome tool in . When using our own product, we felt that the icon tool provided little improvement over plain HTML. Also, Font Awesome's icon names did not match the intended function of the icon. This is how we came to think of a library that: - Took a limited number of arguments - Converted those arguments into an icon - Was able to support multiple icon libraries - Could bind an icon definition to a preset name for easy reuse - Could easily be extended by users This is how we came to write and use `django-icons`. %prep %autosetup -n django-icons-23.2 %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-icons -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Wed May 10 2023 Python_Bot - 23.2-1 - Package Spec generated