Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.recipe.template
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
slapos.recipe.template
Commits
6f236c2b
Commit
6f236c2b
authored
Aug 07, 2013
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix file import with Jinja2 >= 2.7
parent
90772890
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
5 deletions
+9
-5
CHANGES.txt
CHANGES.txt
+5
-0
setup.py
setup.py
+2
-2
slapos/recipe/template/jinja2_template.py
slapos/recipe/template/jinja2_template.py
+2
-3
No files found.
CHANGES.txt
View file @
6f236c2b
2.5 (2013-08-07)
======================
* Fix file import with Jinja2 >= 2.7
2.4.3 (2013-08-02)
======================
...
...
setup.py
View file @
6f236c2b
from
setuptools
import
setup
,
find_packages
import
os
version
=
'2.
4.3
'
version
=
'2.
5
'
name
=
'slapos.recipe.template'
long_description
=
open
(
"README.txt"
).
read
()
+
"
\
n
"
+
\
open
(
os
.
path
.
join
(
'slapos'
,
'recipe'
,
...
...
@@ -26,7 +26,7 @@ setup(name=name,
install_requires
=
[
'setuptools'
,
# namespaces
'zc.buildout'
,
# plays with buildout
'jinja2'
,
'jinja2
>= 2.7
'
,
],
zip_safe
=
True
,
entry_points
=
{
...
...
slapos/recipe/template/jinja2_template.py
View file @
6f236c2b
...
...
@@ -71,11 +71,10 @@ class RelaxedPrefixLoader(PrefixLoader):
"""
Same as PrefixLoader, but accepts imports lacking separator.
"""
def
get_
source
(
self
,
environment
,
template
):
def
get_
loader
(
self
,
template
):
if
self
.
delimiter
not
in
template
:
template
+=
self
.
delimiter
return
super
(
RelaxedPrefixLoader
,
self
).
get_source
(
environment
,
template
)
return
super
(
RelaxedPrefixLoader
,
self
).
get_loader
(
template
)
class
RecipeBaseLoader
(
BaseLoader
):
"""
...
...
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