Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: Eksmo/django_compressor
base: d542745274
...
head fork: Eksmo/django_compressor
compare: c5e6de7c49
  • 3 commits
  • 2 files changed
  • 0 commit comments
  • 2 contributors
Showing with 8 additions and 6 deletions.
  1. +2 −1  .gitignore
  2. +6 −5 compressor/contrib/jinja2ext.py
View
3  .gitignore
@@ -9,4 +9,5 @@ MANIFEST
*.egg
docs/_build/
.sass-cache
-.coverage
+.coverage
+/htmlcov/
View
11 compressor/contrib/jinja2ext.py
@@ -3,9 +3,10 @@
from jinja2.exceptions import TemplateSyntaxError
from compressor.exceptions import OfflineGenerationError
from compressor.templatetags.compress import OUTPUT_FILE, CompressorMixin
-from compressor.cache import (get_offline_hexdigest,
+from compressor.cache import (get_offline_hexdigest,
get_offline_manifest)
+
class CompressorExtension(CompressorMixin, Extension):
tags = set(['compress'])
@@ -31,7 +32,7 @@ def parse(self, parser):
args.append(nodes.Const('file'))
args.append(nodes.ContextReference())
body = parser.parse_statements(['name:endcompress'], drop_needle=True)
- return nodes.CallBlock(self.call_method('_compress', args), [], [],
+ return nodes.CallBlock(self.call_method('_compress', args), [], [],
body).set_lineno(lineno)
def _compress(self, kind, mode, context, caller):
@@ -40,13 +41,13 @@ def _compress(self, kind, mode, context, caller):
mode = mode or OUTPUT_FILE
original_content = caller()
- context = {
+ context = {
'original_content': original_content
- }
+ }
return self.render_compressed(context, kind, mode, forced=forced)
def render_offline(self, context, forced):
- """
+ """
If enabled and in offline mode, and not forced check the offline cache
and return the result if given
"""

No commit comments for this range

Something went wrong with that request. Please try again.