Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dantium/django-faicon
Django model field and admin icon picker for Font Awesome 5 Icons
https://github.com/dantium/django-faicon
django django-widget fontawesome5 python
Last synced: about 1 month ago
JSON representation
Django model field and admin icon picker for Font Awesome 5 Icons
- Host: GitHub
- URL: https://github.com/dantium/django-faicon
- Owner: dantium
- License: mit
- Created: 2018-09-22T13:31:06.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-10-20T06:52:36.000Z (about 1 year ago)
- Last Synced: 2024-09-27T16:40:57.063Z (about 2 months ago)
- Topics: django, django-widget, fontawesome5, python
- Language: JavaScript
- Homepage:
- Size: 2.54 MB
- Stars: 17
- Watchers: 1
- Forks: 15
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# django-faicon
Integrates a Font Awesome 5 icon picker in the Django admin interface. Picker interface includes dynamic search on the icon name & terms, filter by styles and can handle thousands of icons easily. Package uses the free version of Font Awesome but you can easily drop in the Pro version if you have license.![Admin Preview GIF](https://github.com/dantium/django-faicon/raw/master/admin_preview.gif "Admin Preview")
## Documentation
### Install
```python
pip install django-faicon
```
Add `faicon` to `INSTALLED_APPS` in `settings`Add `path('faicon/', include('faicon.urls')),` to `urlpatterns` in `urls.py`
Add the field to your model
```python
from faicon.fields import FAIconFieldclass MyModel(models.Model):
icon = FAIconField()
```### Setup
If you want to use Font Awesome Pro or a different version than the one included, download it and put it in your project static directory and name it `fontawesome`
To specify different locations for the icon files you can use these settings:
```python
FAICON_YAML_FILE = 'fontawesome/metadata/icons.yml'
FAICON_CSS_URL = 'fontawesome/css/all.css'
```