Skip to content

justmars/django-fragments

Repository files navigation

django-fragments

Github CI

Purpose

Used for partial template rendering of: <input>, <svg> tags. Originally for a Django boilerplate, refactored out into an independent library.

Setup

After installation, e.g. pip install django-fragments

INSTALLED_APPS = [
    "django_fragments", # add this
]
...
FRAGMENTS = {
    "icons_prefix": "heroicons", # prefix to use for icons
    "icons_path": BASE_DIR / "templates" / "xxx" # type: Path, location where svg icons will be stored
}

See documentation.