Skip to content

Commit

Permalink
Django-Pipeline 2.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBuky authored and TheBuky committed May 23, 2020
1 parent 44eeb9d commit b340b77
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 12 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,4 @@ or just made Pipeline more awesome.
* Wismill
* Zachary Kazanski <[email protected]>
* Zenobius Jiricek <[email protected]>
* Zeus Kronion
9 changes: 9 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@
History
=======

2.0.2
=====

* Fix Middleware to properly decode HTML. Thank to @gatsinski
* Keep mimetypes as str. Thank to @benspaulding
* Based on #642 add 'NonPackagingPipelineManifestStorage' and update
the documentation: **storages.rst**. Thank to @kronion
* Remove futures from pipeline **setup.py** requirements.

2.0.1
=====

Expand Down
4 changes: 2 additions & 2 deletions docs/storages.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ to use it configure ``STATICFILES_STORAGE`` like so ::

And if you want versioning use ::

STATICFILES_STORAGE = 'pipeline.storage.PipelineCachedStorage'
STATICFILES_STORAGE = 'pipeline.storage.PipelineManifestStorage'

There is also non-packing storage available, that allows you to run ``collectstatic`` command
without packaging your assets. Useful for production when you don't want to run compressor or compilers ::
Expand All @@ -24,7 +24,7 @@ without packaging your assets. Useful for production when you don't want to run

Also available if you want versioning ::

STATICFILES_STORAGE = 'pipeline.storage.NonPackagingPipelineCachedStorage'
STATICFILES_STORAGE = 'pipeline.storage.NonPackagingPipelineManifestStorage'

If you use staticfiles with ``DEBUG = False`` (i.e. for integration tests
with `Selenium <http://docs.seleniumhq.org/>`_) you should install the finder
Expand Down
10 changes: 5 additions & 5 deletions pipeline/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@
'LESS_ARGUMENTS': '',

'MIMETYPES': (
(str('text/coffeescript'), str('.coffee')),
(str('text/less'), str('.less')),
(str('text/javascript'), str('.js')),
(str('text/x-sass'), str('.sass')),
(str('text/x-scss'), str('.scss'))
(('text/coffeescript'), ('.coffee')),
(('text/less'), ('.less')),
(('text/javascript'), ('.js')),
(('text/x-sass'), ('.sass')),
(('text/x-scss'), ('.scss'))
),

'EMBED_MAX_IMAGE_SIZE': 32700,
Expand Down
2 changes: 1 addition & 1 deletion pipeline/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def __init__(self, *args, **kwargs):
def process_response(self, request, response):
if response.has_header('Content-Type') and 'text/html' in response['Content-Type']:
try:
response.content = minify_html(response.content.decode().strip())
response.content = minify_html(response.content.decode('utf-8').strip())
response['Content-Length'] = str(len(response.content))
except DjangoUnicodeDecodeError:
pass
Expand Down
8 changes: 7 additions & 1 deletion pipeline/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,18 @@ class NonPackagingPipelineStorage(NonPackagingMixin, PipelineStorage):


class PipelineCachedStorage(PipelineMixin, CachedStaticFilesStorage):
# Deprecated since Django 2.2
pass


class NonPackagingPipelineCachedStorage(NonPackagingMixin, PipelineCachedStorage):
# Deprecated since Django 2.2
pass


class PipelineManifestStorage(PipelineMixin, ManifestStaticFilesStorage):
pass


class NonPackagingPipelineCachedStorage(NonPackagingMixin, PipelineCachedStorage):
class NonPackagingPipelineManifestStorage(NonPackagingMixin, ManifestStaticFilesStorage):
pass
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

setup(
name='django-pipeline',
version='2.0.1',
version='2.0.2',
description='Pipeline is an asset packaging library for Django.',
long_description=io.open('README.rst', encoding='utf-8').read() + '\n\n' +
io.open('HISTORY.rst', encoding='utf-8').read(),
Expand All @@ -16,7 +16,7 @@
license='MIT',
packages=find_packages(exclude=['tests', 'tests.tests']),
zip_safe=False,
install_requires=['futures >= 2.1.3;python_version<"3.6"'],
install_requires=['python_version<"3.6"'],
include_package_data=True,
keywords=('django pipeline asset compiling concatenation compression'
' packaging'),
Expand Down
1 change: 0 additions & 1 deletion tests/tests/test_utils.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

import mimetypes

Expand Down

0 comments on commit b340b77

Please sign in to comment.