TemplateMixin should copy initial context to prevent accidental context sharing

This commit is contained in:
Sebastian 2016-11-15 12:14:39 +01:00
parent 8a9b74e1d3
commit 83869739e6
1 changed files with 2 additions and 1 deletions

View File

@ -2,6 +2,7 @@
import os import os
import codecs import codecs
import copy
from dateutil import parser from dateutil import parser
@ -11,7 +12,7 @@ class TemplateMixin(object):
context = {} context = {}
def get_context(self): def get_context(self):
return self.context return copy.copy(self.context)
def render(self, output_directory, jinja_env): def render(self, output_directory, jinja_env):
context = self.get_context() context = self.get_context()