![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
django-smartspaceless
Advanced tools
A Django template tag application for minifying block-level HTML elements only
Django Smart Spaceless
|PyPI version|_ |Build status|_
.. |PyPI version| image:: https://badge.fury.io/py/django-smartspaceless.svg .. _PyPI version: https://pypi.python.org/pypi/django-smartspaceless
.. |Build status| image:: https://travis-ci.org/richardcornish/django-smartspaceless.svg?branch=master .. _Build status: https://travis-ci.org/richardcornish/django-smartspaceless
Django Smart Spaceless is a Django <https://www.djangoproject.com/>
_ template tag <https://docs.djangoproject.com/en/1.11/howto/custom-template-tags/>
_ application for minifying block-level HTML elements only.
It's just like |spaceless|, but preserves white space between inline HTML elements. Useful for HTML where spaces directly between <a>
, <strong>
, and other inline elements is likely desired to be preserved. Packages the django-htmlmin <https://github.com/cobrateam/django-htmlmin>
project to be used as a template tag.
.. |spaceless| replace:: spaceless
.. _spaceless: https://docs.djangoproject.com/en/1.11/ref/templates/builtins/#spaceless
Package distribution <https://pypi.python.org/pypi/django-smartspaceless>
_Code repository <https://github.com/richardcornish/django-smartspaceless>
_Documentation <https://django-smartspaceless.readthedocs.io/>
_Tests <https://travis-ci.org/richardcornish/django-smartspaceless>
_.. code-block:: bash
$ pip install django-smartspaceless
Add to settings.py
.
.. code-block:: python
INSTALLED_APPS = [ # ... 'smartspaceless', ]
.. code-block:: django
{% load smartspaceless_tags %}
{% smartspaceless %}
{% endsmartspaceless %}Result:
.. code-block:: html
The space between <a href="#">Link 2</a>
and <a href="#">Link 3</a>
is preserved. Removing that space would be bad.
Please note that django-htmlmin <https://github.com/cobrateam/django-htmlmin>
_ by default uses the html5lib <https://github.com/html5lib/html5lib-python>
_ parser, which prepends possibly missing <html><head></head><body>
and appends possibly missing </body></html>
tags in an effort to create valid HTML. The template tag changes this default behavior to use html.parser <https://www.crummy.com/software/BeautifulSoup/bs4/doc/#installing-a-parser>
_, the HTML parser in Python's standard library, which does not alter HTML fragments.
FAQs
A Django template tag application for minifying block-level HTML elements only
We found that django-smartspaceless demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.