Fix server side AJAX template rendering
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
This commit is contained in:
@@ -305,10 +305,10 @@ class Template(object):
|
||||
context=context,
|
||||
).render()
|
||||
|
||||
content = result.rendered_content.replace('\n', '')
|
||||
|
||||
self.html = content
|
||||
self.hex_hash = hashlib.sha256(content).hexdigest()
|
||||
# Calculate the hash of the bytes version but return the unicode
|
||||
# version
|
||||
self.html = result.rendered_content.replace('\n', '')
|
||||
self.hex_hash = hashlib.sha256(result.content).hexdigest()
|
||||
return self
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user