fnp
/
wolnelektury.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d04b366
)
chunk edit fix
author
Radek Czajka
<rczajka@rczajka.pl>
Mon, 26 Sep 2022 10:47:14 +0000
(12:47 +0200)
committer
Radek Czajka
<rczajka@rczajka.pl>
Mon, 26 Sep 2022 10:47:14 +0000
(12:47 +0200)
src/chunks/templatetags/chunks.py
patch
|
blob
|
history
diff --git
a/src/chunks/templatetags/chunks.py
b/src/chunks/templatetags/chunks.py
index
7c431c1
..
b8e9f4f
100644
(file)
--- a/
src/chunks/templatetags/chunks.py
+++ b/
src/chunks/templatetags/chunks.py
@@
-25,7
+25,7
@@
def chunk(context, key, cache_time=0):
n.save()
content = ''
n.save()
content = ''
- if context['request'].user.is_staff:
+ if
'request' in context and
context['request'].user.is_staff:
content = f'<span data-edit="chunks/chunk/{key}"></span>' + content
return mark_safe(content)
content = f'<span data-edit="chunks/chunk/{key}"></span>' + content
return mark_safe(content)