Implement default omit filter

This commit is contained in:
Victor Lin 2014-07-28 18:21:31 -07:00 committed by James Cammarata
commit 0b4d7f1574
3 changed files with 34 additions and 10 deletions

View file

@ -61,6 +61,7 @@ LOOKUP_REGEX = re.compile(r'lookup\s*\(')
PRINT_CODE_REGEX = re.compile(r'(?:{[{%]|[%}]})')
CODE_REGEX = re.compile(r'(?:{%|%})')
try:
import json
except ImportError:
@ -110,6 +111,11 @@ try:
except ImportError:
pass
OMIT_PLACE_HOLDER = (
'__omit_place_holder__%s' % _md5(os.urandom(64)).hexdigest()
)
###############################################################
# Abstractions around keyczar
###############################################################