Skip to content

Commit 261a456

Browse files
committed
Move the jinja2 extension and templates.
1 parent f292098 commit 261a456

File tree

7 files changed

+10
-5
lines changed

7 files changed

+10
-5
lines changed

docs/usage.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ Jinja
8787
=====
8888

8989
Pipeline also includes Jinja2 support and is used almost identically to the Django Template tags implementation.
90-
You just need to pass ``pipeline.jinja2.ext.PipelineExtension`` to your Jinja2 environment.
90+
You just need to pass ``pipeline.templatetags.ext.PipelineExtension`` to your Jinja2 environment.
9191

9292
Templates
9393
---------

pipeline/jinja2/__init__.py

Whitespace-only changes.

pipeline/jinja2/pipeline/css.jinja

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<link href="{{ url }}" rel="stylesheet" type="{{ type }}"{% if media %} media="{{ media }}"{% endif %}{% if charset %} charset="{{ charset }}"{% endif %} />
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<script{% if async %} async{% endif %}{% if defer %} defer{% endif %} type="text/javascript">
2+
{{ source|safe }}
3+
</script>

pipeline/jinja2/pipeline/js.jinja

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<script{% if async %} async{% endif %}{% if defer %} defer{% endif %} type="{{ type }}" src="{{ url }}" charset="utf-8"></script>

pipeline/jinja2/ext.py renamed to pipeline/templatetags/ext.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55

66
from django.contrib.staticfiles.storage import staticfiles_storage
77

8-
from pipeline.packager import PackageNotFound
9-
from pipeline.utils import guess_type
10-
from pipeline.templatetags.pipeline import PipelineMixin
8+
from ..packager import PackageNotFound
9+
from ..utils import guess_type
10+
from .pipeline import PipelineMixin
1111

1212

1313
class PipelineExtension(PipelineMixin, Extension):

tests/tests/test_template.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from django.template import Template, Context
77
from django.test import TestCase
88

9-
from pipeline.jinja2.ext import PipelineExtension
9+
from pipeline.templatetags.ext import PipelineExtension
1010

1111
from tests.utils import pipeline_settings
1212

0 commit comments

Comments
 (0)