Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
django-pipeline
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
django-pipeline
Commits
e29bc05f
Commit
e29bc05f
authored
Dec 19, 2015
by
Timothée Peignier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't mix django templates and jinja2
parent
e6d90046
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
7 deletions
+11
-7
docs/usage.rst
+1
-1
pipeline/jinja2/__init__.py
+1
-1
tests/settings.py
+8
-4
tests/tests/test_template.py
+1
-1
No files found.
docs/usage.rst
View file @
e29bc05f
...
...
@@ -96,7 +96,7 @@ You just need to pass ``pipeline.templatetags.ext.PipelineExtension`` to your Ji
'APP_DIRS': True,
'OPTIONS': {
'environment': 'myproject.jinja2.environment',
'extensions': ['pipeline.
templatetags.ext
.PipelineExtension']
'extensions': ['pipeline.
jinja2
.PipelineExtension']
}
}
...
...
pipeline/
templatetags/ext
.py
→
pipeline/
jinja2/__init__
.py
View file @
e29bc05f
...
...
@@ -7,7 +7,7 @@ from django.contrib.staticfiles.storage import staticfiles_storage
from
..packager
import
PackageNotFound
from
..utils
import
guess_type
from
.pipeline
import
PipelineMixin
from
.
.templatetags.
pipeline
import
PipelineMixin
class
PipelineExtension
(
PipelineMixin
,
Extension
):
...
...
tests/settings.py
View file @
e29bc05f
...
...
@@ -56,10 +56,6 @@ STATICFILES_FINDERS = (
SECRET_KEY
=
"django-pipeline"
TEMPLATE_DIRS
=
(
local_path
(
'templates'
),
)
PIPELINE
=
{
'STYLESHEETS'
:
{
'screen'
:
{
...
...
@@ -122,6 +118,11 @@ PIPELINE = {
}
TEMPLATE_DIRS
=
(
local_path
(
'templates'
),
)
TEMPLATES
=
[
{
'BACKEND'
:
'django.template.backends.django.DjangoTemplates'
,
...
...
@@ -132,5 +133,8 @@ TEMPLATES = [
'BACKEND'
:
'django.template.backends.jinja2.Jinja2'
,
'APP_DIRS'
:
True
,
'DIRS'
:
TEMPLATE_DIRS
,
'OPTIONS'
:
{
'extensions'
:
[
'pipeline.jinja2.PipelineExtension'
]
}
}
]
tests/tests/test_template.py
View file @
e29bc05f
...
...
@@ -6,7 +6,7 @@ from jinja2 import Environment, PackageLoader
from
django.template
import
Template
,
Context
from
django.test
import
TestCase
from
pipeline.
templatetags.ext
import
PipelineExtension
from
pipeline.
jinja2
import
PipelineExtension
from
tests.utils
import
pipeline_settings
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment