summaryrefslogtreecommitdiff
path: root/pystache/parser.py
diff options
context:
space:
mode:
authorBen Leslie <benno@benno.id.au>2012-09-18 21:53:53 +1000
committerBen Leslie <benno@benno.id.au>2012-09-18 21:53:53 +1000
commit353da3daf5a918c9862fe58b6b403d20d99ed2ff (patch)
tree2df43ebc0e7e8c48cab6ba66264b44738a8a874e /pystache/parser.py
parent5db89b1df20ecaebf332b7ece3cc5bcddd945652 (diff)
downloadpystache-353da3daf5a918c9862fe58b6b403d20d99ed2ff.tar.gz
Enable defaults.DELIMITERS to be monkey-patched by module users.
This updates the way in which default.DELIMITERS is used to enable simple monkey-patching should a user desire. Monkey-patching isn't the preferred approach however, it can at times be useful and it simple to support. Additionally, test cases are added to ensure certain defaults can be monkey-patched at run-time.
Diffstat (limited to 'pystache/parser.py')
-rw-r--r--pystache/parser.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pystache/parser.py b/pystache/parser.py
index 4c37ec3..8b82776 100644
--- a/pystache/parser.py
+++ b/pystache/parser.py
@@ -7,7 +7,7 @@ Exposes a parse() function to parse template strings.
import re
-from pystache.defaults import DELIMITERS
+from pystache import defaults
from pystache.parsed import ParsedTemplate
@@ -228,7 +228,7 @@ class _Parser(object):
def __init__(self, delimiters=None):
if delimiters is None:
- delimiters = DELIMITERS
+ delimiters = defaults.DELIMITERS
self._delimiters = delimiters