fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix for toc events
[wolnelektury.git]
/
src
/
infopages
/
views.py
diff --git
a/src/infopages/views.py
b/src/infopages/views.py
index
a321310
..
3d1749f
100644
(file)
--- a/
src/infopages/views.py
+++ b/
src/infopages/views.py
@@
-8,7
+8,10
@@
from infopages.models import InfoPage
def infopage(request, slug):
def infopage(request, slug):
- page = get_object_or_404(InfoPage, slug=slug)
+ if request.user.is_staff:
+ page = get_object_or_404(InfoPage, slug=slug)
+ else:
+ page = get_object_or_404(InfoPage, slug=slug, published=True)
rc = RequestContext(request)
try:
rc = RequestContext(request)
try: