summaryrefslogtreecommitdiff
path: root/planet
diff options
context:
space:
mode:
authorSam Ruby <rubys@intertwingly.net>2010-12-31 10:20:58 -0500
committerSam Ruby <rubys@intertwingly.net>2010-12-31 10:20:58 -0500
commit3ba5c4200be0b465e34108ed5d4dcba7a1e77d3d (patch)
tree7a6f718686163e1dd0ef51a931d95688e3a24df7 /planet
parentf12cd71c0e3a2730ab0c320e71296a5a04a4b9e0 (diff)
downloadplanetpixels-3ba5c4200be0b465e34108ed5d4dcba7a1e77d3d.tar.gz
planetpixels-3ba5c4200be0b465e34108ed5d4dcba7a1e77d3d.tar.bz2
Make autoescape an option:
http://lists.planetplanet.org/archives/devel/2010-December/002189.html
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)