X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/af0693ddb5e4f6240d273c8a66fd1e6ef2a52872..f20c260cfc805924834ea7e545ac2a84a4042b28:/apps/wiki/views.py?ds=inline diff --git a/apps/wiki/views.py b/apps/wiki/views.py index 378701c2..b3035422 100644 --- a/apps/wiki/views.py +++ b/apps/wiki/views.py @@ -206,7 +206,7 @@ def upload(request): @decorator_from_middleware(GZipMiddleware) def text(request, slug, chunk=None): try: - doc = Chunk.get(slug, chunk).doc + doc = Chunk.get(slug, chunk) except (Chunk.MultipleObjectsReturned, Chunk.DoesNotExist): raise Http404 @@ -290,7 +290,7 @@ def revert(request, slug, chunk=None): form = DocumentTextRevertForm(request.POST, prefix="textrevert") if form.is_valid(): try: - doc = Chunk.get(slug, chunk).doc + doc = Chunk.get(slug, chunk) except (Chunk.MultipleObjectsReturned, Chunk.DoesNotExist): raise Http404 @@ -356,7 +356,7 @@ def diff(request, slug, chunk=None): revB = None try: - doc = Chunk.get(slug, chunk).doc + doc = Chunk.get(slug, chunk) except (Chunk.MultipleObjectsReturned, Chunk.DoesNotExist): raise Http404 docA = doc.at_revision(revA).materialize() @@ -369,7 +369,7 @@ def diff(request, slug, chunk=None): @never_cache def revision(request, slug, chunk=None): try: - doc = Chunk.get(slug, chunk).doc + doc = Chunk.get(slug, chunk) except (Chunk.MultipleObjectsReturned, Chunk.DoesNotExist): raise Http404 return http.HttpResponse(str(doc.revision())) @@ -379,7 +379,7 @@ def revision(request, slug, chunk=None): def history(request, slug, chunk=None): # TODO: pagination try: - doc = Chunk.get(slug, chunk).doc + doc = Chunk.get(slug, chunk) except (Chunk.MultipleObjectsReturned, Chunk.DoesNotExist): raise Http404