From 2f28bc0bc1344ebce95a7f4f416c07cfd4a166cf Mon Sep 17 00:00:00 2001 From: =?utf8?q?Aleksander=20=C5=81ukasz?= Date: Thu, 29 May 2014 15:28:26 +0200 Subject: [PATCH 1/1] Require being logged in to edit a lesson --- apps/wiki/views.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/wiki/views.py b/apps/wiki/views.py index 827a4838..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) -- 2.20.1