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
@never_cache
+@login_required
def editor(request, slug, chunk=None, template_name='wiki/bootstrap.html'):
try:
chunk = Chunk.get(slug, chunk)
},
'tags': list(save_form.fields['stage_completed'].choices),
'can_pubmark': request.user.has_perm('catalogue.can_pubmark'),
+ 'slug': chunk.book.slug
})