This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Django Smart Spaceless is a Django template tag 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 project to be used as a template tag.

Install

$ pip install django-smartspaceless

Add to settings.py.

INSTALLED_APPS = [
    # ...
    'smartspaceless',
]

Usage

{% load smartspaceless_tags %}

{% smartspaceless %}
<p><a href="#">Link 1</a></p>
<p><a href="#">Link 2</a> <a href="#">Link 3</a></p>
{% endsmartspaceless %}

Result:

<p><a href="#">Link 1</a></p><p><a href="#">Link 2</a> <a href="#">Link 3</a></p>

Note that the space between <a href="#">Link 2</a> and <a href="#">Link 2</a> is preserved. Removing that space would be bad.

Note

Please note that django-htmlmin by default uses the html5lib 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, the HTML parser in Python’s standard library, which does not alter HTML fragments.

Release History

Release History

0.1

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django-smartspaceless-0.1.tar.gz (857.4 kB) Copy SHA256 Checksum SHA256 Source Aug 24, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting