summaryrefslogtreecommitdiff
path: root/planet
diff options
context:
space:
mode:
Diffstat (limited to 'planet')
-rw-r--r--planet/config.py1
-rw-r--r--planet/shell/dj.py2
2 files changed, 2 insertions, 1 deletions
diff --git a/planet/config.py b/planet/config.py
index 176ee9d..d36899f 100644
--- a/planet/config.py
+++ b/planet/config.py
@@ -116,6 +116,7 @@ def __init__():
define_planet_list('bill_of_materials')
define_planet_list('template_directories', '.')
define_planet_list('filter_directories')
+ define_planet('django_autoescape', 'on')
# template options
define_tmpl_int('days_per_page', 0)
diff --git a/planet/shell/dj.py b/planet/shell/dj.py
index 96bcd3b..d2199fc 100644
--- a/planet/shell/dj.py
+++ b/planet/shell/dj.py
@@ -32,7 +32,7 @@ def run(script, doc, output_file=None, options={}):
# set up the Django context by using the default htmltmpl
# datatype converters
- context = Context()
+ context = Context(autoescape=(config.django_autoescape()=='on'))
context.update(tmpl.template_info(doc))
context['Config'] = config.planet_options()
t = get_template(script)