@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 read(self, request, slug=None):
if slug:
return get_object_or_404(Book, slug=slug)
else:
return Book.objects.all()