Django template minifier
Project description
Django Minifier
Minify Django Template.
Install:
pip install django_minifier
Add template loader
# settings.py
TEMPLATES = [
{
"BACKEND": "django.template.backends.django.DjangoTemplates",
"DIRS": [
BASE_DIR / "example" / "templates"
],
# "APP_DIRS": True,
"OPTIONS": {
"context_processors": [
...
],
"loaders": [
(
"django.template.loaders.cached.Loader",
[
"django_minifier.app_directories.Loader",
"django_minifier.filesystem.Loader",
"django_minifier.themes.Loader",
],
)
],
},
},
]
TEMPLATE_MINIFIER = not DEBUG
TEMPLATE_MINIFIER_EXCLUDED_DIRS = ("admin/", "wagtailadmin/")
TEMPLATE_MINIFIER_FILENAME_EXTENSIONS = (".html", ".htm")
TEMPLATE_MINIFIER_STRIP_FUNCTION = False
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
django_minifier-0.0.1.tar.gz
(4.8 kB
view hashes)
Built Distribution
Close
Hashes for django_minifier-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5db2bc0ad81eff641181dfddc7b4aeb68dee8f602fa9b857e02a582d179a4d12 |
|
MD5 | d8664fba250e4d97d2776a0ba17231ff |
|
BLAKE2b-256 | f2c5c3eb50adf5bebea8b076b31a1b93d9f822cb54e0b3de6ec48709bd9fde23 |