fnp
/
redakcja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Connecting WL + publishing author.
[redakcja.git]
/
src
/
wiki
/
views.py
diff --git
a/src/wiki/views.py
b/src/wiki/views.py
index
0b9cbc1
..
29c389a
100644
(file)
--- a/
src/wiki/views.py
+++ b/
src/wiki/views.py
@@
-293,8
+293,15
@@
def history(request, chunk_id):
if not doc.book.accessible(request):
return HttpResponseForbidden("Not authorized.")
if not doc.book.accessible(request):
return HttpResponseForbidden("Not authorized.")
+ history = doc.history()
+ try:
+ before = int(request.GET.get('before'))
+ except:
+ pass
+ else:
+ history = history.filter(revision__lt=before)
changes = []
changes = []
- for change in
doc.history().reverse()
:
+ for change in
history.reverse()[:20]
:
changes.append({
"version": change.revision,
"description": change.description,
changes.append({
"version": change.revision,
"description": change.description,