fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
minimal allauth support
[wolnelektury.git]
/
apps
/
chunks
/
templatetags
/
chunks.py
diff --git
a/apps/chunks/templatetags/chunks.py
b/apps/chunks/templatetags/chunks.py
index
595482f
..
083c48a
100644
(file)
--- a/
apps/chunks/templatetags/chunks.py
+++ b/
apps/chunks/templatetags/chunks.py
@@
-30,7
+30,7
@@
class ChunkNode(template.Node):
def __init__(self, key, cache_time=0):
self.key = key
self.cache_time = cache_time
def __init__(self, key, cache_time=0):
self.key = key
self.cache_time = cache_time
-
+
def render(self, context):
try:
cache_key = 'chunk_' + self.key
def render(self, context):
try:
cache_key = 'chunk_' + self.key
@@
-44,7
+44,7
@@
class ChunkNode(template.Node):
n.save()
return ''
return content
n.save()
return ''
return content
-
+
register.tag('chunk', do_get_chunk)
register.tag('chunk', do_get_chunk)
@@
-58,6
+58,6
@@
def attachment(key, cache_time=0):
return c.attachment.url
except Attachment.DoesNotExist:
return ''
return c.attachment.url
except Attachment.DoesNotExist:
return ''
-
+
register.simple_tag(attachment)
register.simple_tag(attachment)