# Django tabler icons
Use [the tabler](https://github.com/tabler/tabler-icons) icon set in your Django project.
## Installation
Install the package from PyPI:
```bash
python -m pip install django-tabler-icons
```
Add `tabler_icons` to your `INSTALLED_APPS`:
```python
INSTALLED_APPS = [
...
'tabler_icons',
...
]
```
Download the icon set:
```bash
python manage.py download_icons
```
Icons will be downloaded to `<user_home_directory>/.config/django-tabler-icons`. You can override this by setting the `TABLER_ICONS_DIR` setting, in project settings.
### Alternative download method
Calling the management command `python manage.py download_icons` requires to load Django. To avoid this, the icons can be downloaded using
```bash
django_tabler_icons download
```
which will download the icon set to `<user_home_directory>/.config/django-tabler-icons`. This requires user confirmation to proceed. By passing `--yes` or `-y` as an argument, the confirmation is skipped.
## Usage
To add an icon to your template, use the `tabler_icon` template tag:
```django
{% load tabler_icons %}
{% tabler_icon '<icon_name>' %}
```
If you need to add classes to the icon, use the second argument:
```django
{% tabler_icon '<icon_name>' '<class_name_1> <class_name_2>' %}
```
The icons come with some default classes which you can remove by passing `no` to the third argument (`keep_default_classes`)
```django
{% tabler_icon '<icon_name>' '<class_name_1> <class_name_2>' 'no' %}
```
> The default is to keep the default classes so you can omit the third argument if you want to keep them.
## Relevant projects
[Heroicons](https://github.com/adamchainz/heroicons) is a package for using [heroicons](https://heroicons.com) in Django projects, which is also the inspiration for this package.
Raw data
{
"_id": null,
"home_page": "https://github.com/demestav/django_tabler_icons",
"name": "django-tabler-icons",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "",
"keywords": "",
"author": "Demetris Stavrou",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/df/ff/ac9b14b07d060320df60a8555609d39895f6198a638a18c6e60fc9a516f4/django_tabler_icons-0.4.0.tar.gz",
"platform": null,
"description": "# Django tabler icons\nUse [the tabler](https://github.com/tabler/tabler-icons) icon set in your Django project.\n\n## Installation\nInstall the package from PyPI:\n```bash\npython -m pip install django-tabler-icons\n```\n\nAdd `tabler_icons` to your `INSTALLED_APPS`:\n```python\nINSTALLED_APPS = [\n ...\n 'tabler_icons',\n ...\n]\n```\n\nDownload the icon set:\n```bash\npython manage.py download_icons\n```\n\nIcons will be downloaded to `<user_home_directory>/.config/django-tabler-icons`. You can override this by setting the `TABLER_ICONS_DIR` setting, in project settings.\n\n### Alternative download method\nCalling the management command `python manage.py download_icons` requires to load Django. To avoid this, the icons can be downloaded using\n```bash\ndjango_tabler_icons download\n```\nwhich will download the icon set to `<user_home_directory>/.config/django-tabler-icons`. This requires user confirmation to proceed. By passing `--yes` or `-y` as an argument, the confirmation is skipped.\n\n## Usage\n\nTo add an icon to your template, use the `tabler_icon` template tag:\n```django\n{% load tabler_icons %}\n\n{% tabler_icon '<icon_name>' %}\n```\n\nIf you need to add classes to the icon, use the second argument:\n```django\n{% tabler_icon '<icon_name>' '<class_name_1> <class_name_2>' %}\n```\n\nThe icons come with some default classes which you can remove by passing `no` to the third argument (`keep_default_classes`)\n```django\n{% tabler_icon '<icon_name>' '<class_name_1> <class_name_2>' 'no' %}\n```\n\n> The default is to keep the default classes so you can omit the third argument if you want to keep them.\n\n## Relevant projects\n\n[Heroicons](https://github.com/adamchainz/heroicons) is a package for using [heroicons](https://heroicons.com) in Django projects, which is also the inspiration for this package.\n",
"bugtrack_url": null,
"license": "",
"summary": "Use tabler icons with django templates",
"version": "0.4.0",
"project_urls": {
"Homepage": "https://github.com/demestav/django_tabler_icons"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "828dee719d35d9d121190db7bd696e410e60ace77f531116e7b29c75b26b8414",
"md5": "d4f4f1543e0e48f8de750c7f2e0427c8",
"sha256": "92c81ba34213391ab4841bec4c3ac99caabd110f49148b2778030e44781db9b6"
},
"downloads": -1,
"filename": "django_tabler_icons-0.4.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "d4f4f1543e0e48f8de750c7f2e0427c8",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 5533,
"upload_time": "2024-02-29T13:26:04",
"upload_time_iso_8601": "2024-02-29T13:26:04.784851Z",
"url": "https://files.pythonhosted.org/packages/82/8d/ee719d35d9d121190db7bd696e410e60ace77f531116e7b29c75b26b8414/django_tabler_icons-0.4.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "dfffac9b14b07d060320df60a8555609d39895f6198a638a18c6e60fc9a516f4",
"md5": "cc390feeeb99c4e7a8e716b5ea89aab8",
"sha256": "780c4365bd3f9d78de0893306413905b0319696a53158da87c491a3c57360136"
},
"downloads": -1,
"filename": "django_tabler_icons-0.4.0.tar.gz",
"has_sig": false,
"md5_digest": "cc390feeeb99c4e7a8e716b5ea89aab8",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 4080,
"upload_time": "2024-02-29T13:26:06",
"upload_time_iso_8601": "2024-02-29T13:26:06.533373Z",
"url": "https://files.pythonhosted.org/packages/df/ff/ac9b14b07d060320df60a8555609d39895f6198a638a18c6e60fc9a516f4/django_tabler_icons-0.4.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-02-29 13:26:06",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "demestav",
"github_project": "django_tabler_icons",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "django-tabler-icons"
}