X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/9c5b169cbb83c816ae1a211a9539ba174d99f992..40cb5e964bdacbd6873ea2d970c1e8974922e344:/apps/wiki/views.py diff --git a/apps/wiki/views.py b/apps/wiki/views.py index c75bf3a6..d7763025 100644 --- a/apps/wiki/views.py +++ b/apps/wiki/views.py @@ -15,6 +15,7 @@ from django.utils.translation import ugettext as _ from django.views.decorators.http import require_POST, require_GET from django.shortcuts import get_object_or_404, render from django.utils import simplejson +from django.contrib.auth.decorators import login_required from catalogue.models import Book, Chunk, Template import nice_diff @@ -51,6 +52,7 @@ def get_history(chunk): @never_cache +@login_required def editor(request, slug, chunk=None, template_name='wiki/bootstrap.html'): try: chunk = Chunk.get(slug, chunk) @@ -100,6 +102,7 @@ def editor(request, slug, chunk=None, template_name='wiki/bootstrap.html'): }, 'tags': list(save_form.fields['stage_completed'].choices), 'can_pubmark': request.user.has_perm('catalogue.can_pubmark'), + 'slug': chunk.book.slug })