Instantiate a Template instance when rendering custom webhook content.
Review Request #8702 — Created Jan. 31, 2017 and submitted — Latest diff uploaded
We use Django's template language for allowing people to render custom webhook
content, but we deliberately limit the tags and filters that people are allowed
to use. Previously we just instantiated theParser
and told the resulting
nodelist to render, but in Django 1.8 there's some code that relies on having a
Template
object for state. This change creates aTemplate
and then replaces
its nodelist with our parsed version.
Ran unit tests with Django 1.6 and 1.8.