TemplateMixin should copy initial context to prevent accidental context sharing
This commit is contained in:
parent
8a9b74e1d3
commit
83869739e6
|
@ -2,6 +2,7 @@
|
|||
|
||||
import os
|
||||
import codecs
|
||||
import copy
|
||||
|
||||
from dateutil import parser
|
||||
|
||||
|
@ -11,7 +12,7 @@ class TemplateMixin(object):
|
|||
context = {}
|
||||
|
||||
def get_context(self):
|
||||
return self.context
|
||||
return copy.copy(self.context)
|
||||
|
||||
def render(self, output_directory, jinja_env):
|
||||
context = self.get_context()
|
||||
|
|
Loading…
Reference in New Issue