%global _empty_manifest_terminate_build 0 Name: python-django-fontawesome-5 Version: 1.0.18 Release: 1 Summary: A utility for using icons in models, forms, and templates. License: BSD License URL: https://github.com/BenjjinF/django-fontawesome-5 Source0: https://mirrors.nju.edu.cn/pypi/web/packages/dc/4b/5f89bb9bbde06838707598401fdc73dbe39b61526b63c09755c3be16827a/django-fontawesome-5-1.0.18.tar.gz BuildArch: noarch Requires: python3-Django %description # django-fontawesome-5 A utility for using icons in models, forms, and templates. Does support Django 3.0, which *django-fontawesome* will not. ![Clip of dropdown](https://github.com/BenjjinF/django-fontawesome/blob/master/docs/images/django-fontawesome-5.gif) ## Migration guide from django-fontawesome 1. Remove all occurences of {% fontawesome_stylesheet %} 1. Replace {% load fontawesome %} with {% load fontawesome_5 %} 1. Replace '{% fontawesome_icon' with '{% fa5_icon' 1. Replace iconnames, for example "bell" needs to be replaced with "bell fas" and "linedin-square" with "linkedin fab" ## Installation / Usage pipenv install django-fontawesome-5 Add 'fontawesome_5' to your installed `INSTALLED_APPS`: INSTALLED_APPS = ( ... 'fontawesome_5', ) Import and use `IconField`: from fontawesome_5.fields import IconField class Category(models.Model): ... icon = IconField() Include Static Files {% load fontawesome_5 %} {% fontawesome_5_static %} ... ## Settings You can configure django-fontawesome to use another release/source/cdn by specifying:: FONTAWESOME_5_CSS = URL or None default: 'fontawesome_5/css/django-fontawesome.css' FONTAWESOME_5_CSS_ADMIN = URL or path default: None FONTAWESOME_5_ICON_CLASS = 'default' or 'semantic_ui' default: 'default' FONTAWESOME_5_PREFIX = 'custom_prefix' default: 'fa' ## Rendering You can do a simple render in your template like this: {% for category in categories.all %} {% if category.icon %} {{ category.icon.as_html }} {% endif %} {% endfor %} ### Default Renderer Or you can use the `{% fa5_icon %}` template tag. {% fa5_icon 'github' 'fab' %} Positional arguments: `icon` (required), `style_prefix` (default: 'fas') #### Key word arguments: - class `extra custom classes` - color `CSS Color Names` - border `boolean` - fixed_width `boolean` - flip - `horizontal` - `vertical` - li `boolean` - pull - `left` - `right` - pulse `boolean` - rotate `integer` - size - `fa-xs` - `fa-sm` - `fa-lg` - `fa-2x` - `fa-3x` - `fa-5x` - `fa-7x` - `fa-10x` - spin `boolean` - title `string` ### Semantic UI Renderer Or you can use the `{% fa5_icon %}` template tag. {% fa5_icon 'check' %} Required positional arguments: `icon` #### Key word arguments: - class `extra custom classes` - bordered `boolean` - circular `boolean` - colored `Semantic UI Colors` - disabled `boolean` - fitted `boolean` - flipped - `horizontal` - `vertical` - inverted `boolean` - link `boolean` - loading `boolean` - rotated - `clockwise` - `counterclockwise` - pulse `boolean` - rotate `integer` - size - `fa-xs` - `fa-sm` - `fa-lg` - `fa-2x` - `fa-3x` - `fa-5x` - `fa-7x` - `fa-10x` - title `string` ## Credit Credit to https://github.com/redouane for the original ~ ## Changes - Updated for use with Font Awesome 5 - Removed PyYAML, Select2, and jQuery as dependencies - Static files tag includes static dependencies for use outside admin - Moved rendering logic to renderers %package -n python3-django-fontawesome-5 Summary: A utility for using icons in models, forms, and templates. Provides: python-django-fontawesome-5 BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-django-fontawesome-5 # django-fontawesome-5 A utility for using icons in models, forms, and templates. Does support Django 3.0, which *django-fontawesome* will not. ![Clip of dropdown](https://github.com/BenjjinF/django-fontawesome/blob/master/docs/images/django-fontawesome-5.gif) ## Migration guide from django-fontawesome 1. Remove all occurences of {% fontawesome_stylesheet %} 1. Replace {% load fontawesome %} with {% load fontawesome_5 %} 1. Replace '{% fontawesome_icon' with '{% fa5_icon' 1. Replace iconnames, for example "bell" needs to be replaced with "bell fas" and "linedin-square" with "linkedin fab" ## Installation / Usage pipenv install django-fontawesome-5 Add 'fontawesome_5' to your installed `INSTALLED_APPS`: INSTALLED_APPS = ( ... 'fontawesome_5', ) Import and use `IconField`: from fontawesome_5.fields import IconField class Category(models.Model): ... icon = IconField() Include Static Files {% load fontawesome_5 %} {% fontawesome_5_static %} ... ## Settings You can configure django-fontawesome to use another release/source/cdn by specifying:: FONTAWESOME_5_CSS = URL or None default: 'fontawesome_5/css/django-fontawesome.css' FONTAWESOME_5_CSS_ADMIN = URL or path default: None FONTAWESOME_5_ICON_CLASS = 'default' or 'semantic_ui' default: 'default' FONTAWESOME_5_PREFIX = 'custom_prefix' default: 'fa' ## Rendering You can do a simple render in your template like this: {% for category in categories.all %} {% if category.icon %} {{ category.icon.as_html }} {% endif %} {% endfor %} ### Default Renderer Or you can use the `{% fa5_icon %}` template tag. {% fa5_icon 'github' 'fab' %} Positional arguments: `icon` (required), `style_prefix` (default: 'fas') #### Key word arguments: - class `extra custom classes` - color `CSS Color Names` - border `boolean` - fixed_width `boolean` - flip - `horizontal` - `vertical` - li `boolean` - pull - `left` - `right` - pulse `boolean` - rotate `integer` - size - `fa-xs` - `fa-sm` - `fa-lg` - `fa-2x` - `fa-3x` - `fa-5x` - `fa-7x` - `fa-10x` - spin `boolean` - title `string` ### Semantic UI Renderer Or you can use the `{% fa5_icon %}` template tag. {% fa5_icon 'check' %} Required positional arguments: `icon` #### Key word arguments: - class `extra custom classes` - bordered `boolean` - circular `boolean` - colored `Semantic UI Colors` - disabled `boolean` - fitted `boolean` - flipped - `horizontal` - `vertical` - inverted `boolean` - link `boolean` - loading `boolean` - rotated - `clockwise` - `counterclockwise` - pulse `boolean` - rotate `integer` - size - `fa-xs` - `fa-sm` - `fa-lg` - `fa-2x` - `fa-3x` - `fa-5x` - `fa-7x` - `fa-10x` - title `string` ## Credit Credit to https://github.com/redouane for the original ~ ## Changes - Updated for use with Font Awesome 5 - Removed PyYAML, Select2, and jQuery as dependencies - Static files tag includes static dependencies for use outside admin - Moved rendering logic to renderers %package help Summary: Development documents and examples for django-fontawesome-5 Provides: python3-django-fontawesome-5-doc %description help # django-fontawesome-5 A utility for using icons in models, forms, and templates. Does support Django 3.0, which *django-fontawesome* will not. ![Clip of dropdown](https://github.com/BenjjinF/django-fontawesome/blob/master/docs/images/django-fontawesome-5.gif) ## Migration guide from django-fontawesome 1. Remove all occurences of {% fontawesome_stylesheet %} 1. Replace {% load fontawesome %} with {% load fontawesome_5 %} 1. Replace '{% fontawesome_icon' with '{% fa5_icon' 1. Replace iconnames, for example "bell" needs to be replaced with "bell fas" and "linedin-square" with "linkedin fab" ## Installation / Usage pipenv install django-fontawesome-5 Add 'fontawesome_5' to your installed `INSTALLED_APPS`: INSTALLED_APPS = ( ... 'fontawesome_5', ) Import and use `IconField`: from fontawesome_5.fields import IconField class Category(models.Model): ... icon = IconField() Include Static Files {% load fontawesome_5 %} {% fontawesome_5_static %} ... ## Settings You can configure django-fontawesome to use another release/source/cdn by specifying:: FONTAWESOME_5_CSS = URL or None default: 'fontawesome_5/css/django-fontawesome.css' FONTAWESOME_5_CSS_ADMIN = URL or path default: None FONTAWESOME_5_ICON_CLASS = 'default' or 'semantic_ui' default: 'default' FONTAWESOME_5_PREFIX = 'custom_prefix' default: 'fa' ## Rendering You can do a simple render in your template like this: {% for category in categories.all %} {% if category.icon %} {{ category.icon.as_html }} {% endif %} {% endfor %} ### Default Renderer Or you can use the `{% fa5_icon %}` template tag. {% fa5_icon 'github' 'fab' %} Positional arguments: `icon` (required), `style_prefix` (default: 'fas') #### Key word arguments: - class `extra custom classes` - color `CSS Color Names` - border `boolean` - fixed_width `boolean` - flip - `horizontal` - `vertical` - li `boolean` - pull - `left` - `right` - pulse `boolean` - rotate `integer` - size - `fa-xs` - `fa-sm` - `fa-lg` - `fa-2x` - `fa-3x` - `fa-5x` - `fa-7x` - `fa-10x` - spin `boolean` - title `string` ### Semantic UI Renderer Or you can use the `{% fa5_icon %}` template tag. {% fa5_icon 'check' %} Required positional arguments: `icon` #### Key word arguments: - class `extra custom classes` - bordered `boolean` - circular `boolean` - colored `Semantic UI Colors` - disabled `boolean` - fitted `boolean` - flipped - `horizontal` - `vertical` - inverted `boolean` - link `boolean` - loading `boolean` - rotated - `clockwise` - `counterclockwise` - pulse `boolean` - rotate `integer` - size - `fa-xs` - `fa-sm` - `fa-lg` - `fa-2x` - `fa-3x` - `fa-5x` - `fa-7x` - `fa-10x` - title `string` ## Credit Credit to https://github.com/redouane for the original ~ ## Changes - Updated for use with Font Awesome 5 - Removed PyYAML, Select2, and jQuery as dependencies - Static files tag includes static dependencies for use outside admin - Moved rendering logic to renderers %prep %autosetup -n django-fontawesome-5-1.0.18 %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-fontawesome-5 -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Fri May 05 2023 Python_Bot - 1.0.18-1 - Package Spec generated