Merge branch 'develop' of github.com:jezdez/django_compressor into develop

Conflicts:
	compressor/test_settings.py
This commit is contained in:
Jannis Leidel
2012-05-19 13:27:57 +02:00
5 changed files with 11 additions and 5 deletions

View File

@@ -64,3 +64,4 @@ The `in-development version`_ of Django Compressor can be installed with
.. _django_compressor.readthedocs.org: http://django_compressor.readthedocs.org/
.. _github.com/jezdez/django_compressor: https://github.com/jezdez/django_compressor
.. _in-development version: http://github.com/jezdez/django_compressor/tarball/develop#egg=django_compressor-dev

View File

@@ -8,6 +8,7 @@ from django.core.files.storage import get_storage_class
from django.template import Context
from django.template.loader import render_to_string
from django.utils.encoding import smart_unicode
from django.utils.safestring import mark_safe
from compressor.cache import get_hexdigest, get_mtime
@@ -256,7 +257,7 @@ class Compressor(object):
new_filepath = self.get_filepath(content, basename=basename)
if not self.storage.exists(new_filepath) or forced:
self.storage.save(new_filepath, ContentFile(content))
url = self.storage.url(new_filepath)
url = mark_safe(self.storage.url(new_filepath))
return self.render_output(mode, {"url": url})
def output_inline(self, mode, content, forced=False, basename=None):

View File

@@ -229,7 +229,9 @@ class Command(NoArgsCommand):
if not compressor_nodes:
raise OfflineGenerationError(
"No 'compress' template tags found in templates.")
"No 'compress' template tags found in templates."
"Try running compress command with --follow-links and/or"
"--extension=EXTENSIONS")
if verbosity > 0:
log.write("Found 'compress' tags in:\n\t" +

View File

@@ -34,3 +34,5 @@ TEMPLATE_DIRS = (
)
TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
SECRET_KEY = "iufoj=mibkpdz*%bob952x(%49rqgv8gg45k36kjcg76&-y5=!"

View File

@@ -48,16 +48,16 @@ deps =
basepython = python2.5
deps =
{deps$base}
https://github.com/django/django/zipball/master
Django==1.4
[testenv:py26-1.4.X]
basepython = python2.6
deps =
{deps$base}
https://github.com/django/django/zipball/master
Django==1.4
[testenv:py27-1.4.X]
basepython = python2.7
deps =
{deps$base}
https://github.com/django/django/zipball/master
Django==1.4