X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/1f74e9a6dc7dd2303f3271ccf4c7a3eb59e3e27e..a778b5b2bd97b5e26d90b668320fad23b6fc8b1a:/apps/api/handlers.py?ds=inline diff --git a/apps/api/handlers.py b/apps/api/handlers.py index 799b60827..40121d6af 100644 --- a/apps/api/handlers.py +++ b/apps/api/handlers.py @@ -16,14 +16,14 @@ staff_required = user_passes_test(lambda user: user.is_staff) class BookHandler(BaseHandler): model = Book fields = ('slug', 'title') - + @staff_required def read(self, request, slug=None): if slug: return get_object_or_404(Book, slug=slug) else: return Book.objects.all() - + @staff_required def create(self, request): form = BookImportForm(request.POST, request.FILES)