fnp
/
prawokultury.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dfcd58d
)
Chunks safe.
author
Radek Czajka
<rczajka@rczajka.pl>
Tue, 1 Oct 2019 12:22:55 +0000
(14:22 +0200)
committer
Radek Czajka
<rczajka@rczajka.pl>
Tue, 1 Oct 2019 12:22:55 +0000
(14:22 +0200)
chunks/templatetags/chunks.py
patch
|
blob
|
history
diff --git
a/chunks/templatetags/chunks.py
b/chunks/templatetags/chunks.py
index
6231e4f
..
65399cb
100644
(file)
--- a/
chunks/templatetags/chunks.py
+++ b/
chunks/templatetags/chunks.py
@@
-1,6
+1,7
@@
from django import template
from django.db import models
from django.core.cache import cache
+from django.utils.safestring import mark_safe
from ..models import Chunk, Attachment
@@
-20,7
+21,7
@@
def chunk(key, cache_time=0, raw=False):
n = Chunk(key=key)
n.save()
return ''
- return
content.raw if raw else content
+ return
mark_safe(unicode(content.raw if raw else content))
@register.simple_tag