Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pystache_custom
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
pystache_custom
Commits
5cd2886c
Commit
5cd2886c
authored
Aug 23, 2011
by
Kenneth Reitz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
additional docstrings
parent
e501ec27
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
pystache/core.py
+10
-0
pystache/template.py
+8
-0
No files found.
pystache/core.py
View file @
5cd2886c
# -*- coding: utf-8 -*-
"""
pystache.core
~~~~~~~~~~~~~
This module provides the main entrance point to Pystache.
"""
from
.template
import
Template
from
.view
import
View
from
.loader
import
Loader
__all__
=
[
'Template'
,
'View'
,
'Loader'
,
'render'
]
def
render
(
template
,
context
=
None
,
**
kwargs
):
"""Renders a template string against the given context."""
context
=
context
and
context
.
copy
()
or
{}
context
.
update
(
kwargs
)
...
...
pystache/template.py
View file @
5cd2886c
# -*- coding: utf-8 -*-
"""
pystache.template
~~~~~~~~~~~~~~~~~
This module provides Pystache's Template class.
"""
import
re
import
cgi
import
collections
...
...
@@ -15,6 +22,7 @@ except ImportError:
literal
=
unicode
class
Modifiers
(
dict
):
"""Dictionary with a decorator for assigning functions to keys."""
...
...
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