-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
76 changed files
with
742 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from jinja2.ext import Extension | ||
import os | ||
from pyjade.utils import process | ||
from pyjade.runtime import attrs | ||
class PyJadeExtension(Extension): | ||
|
||
def __init__(self, environment): | ||
super(PyJadeExtension, self).__init__(environment) | ||
|
||
environment.extend( | ||
jade_file_extensions=('.jade',), | ||
# jade_env=JinjaEnvironment(), | ||
) | ||
environment.globals['__pyjade_attrs'] = attrs | ||
|
||
def preprocess(self, source, name, filename=None): | ||
if name and not os.path.splitext(name)[1] in self.environment.jade_file_extensions: | ||
return source | ||
procesed= process(source,name) | ||
# print procesed | ||
return procesed |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<a href="/contact">contact</a><a href="/save" class="button">save</a><a foo="foo" bar="bar" baz="baz"></a><a foo="foo, bar, baz" bar="1"></a><a foo="((foo))" bar="1"></a> | ||
<select> | ||
<option value="foo" selected="selected">Foo | ||
</option> | ||
<option selected="selected" value="bar">Bar | ||
</option> | ||
</select> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
a(href='/contact') contact | ||
a(href='/save').button save | ||
a(foo, bar, baz) | ||
a(foo='foo, bar, baz', bar=1) | ||
a(foo='((foo))', bar= (1 if 1 else 0 )) | ||
select | ||
option(value='foo', selected) Foo | ||
option(selected, value='bar') Bar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<a href="/user/5" class="button"></a><a href="/user/5" class="button"></a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
id = "5" | ||
a(href='/user/' + id, class='button') | ||
a(href = '/user/' + id, class = 'button') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
html | ||
head | ||
title My Application | ||
block head | ||
body | ||
block content |
Oops, something went wrong.