From ac24bf18df9b0035e4c40ea7c0d94f8839b35d15 Mon Sep 17 00:00:00 2001 From: Marcin Koziej Date: Mon, 4 Feb 2013 15:28:32 +0100 Subject: [PATCH] pulling dictionary --- apps/catalogue/ebook_utils.py | 5 ++--- lib/librarian | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/apps/catalogue/ebook_utils.py b/apps/catalogue/ebook_utils.py index d9c99227..c16b2958 100644 --- a/apps/catalogue/ebook_utils.py +++ b/apps/catalogue/ebook_utils.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- -from StringIO import StringIO from catalogue.models import Book -from librarian import DocProvider +from librarian import DocProvider, IOFile from django.http import HttpResponse @@ -12,7 +11,7 @@ class RedakcjaDocProvider(DocProvider): self.publishable = publishable def by_slug(self, slug): - return StringIO(Book.objects.get(dc_slug=slug + return IOFile.from_string(Book.objects.get(dc_slug=slug ).materialize(publishable=self.publishable ).encode('utf-8')) diff --git a/lib/librarian b/lib/librarian index cdde48a1..11d86305 160000 --- a/lib/librarian +++ b/lib/librarian @@ -1 +1 @@ -Subproject commit cdde48a1896f8ff4c49221fba175d9b1108b8d21 +Subproject commit 11d863057b43462248572daed7c8fc698d573b3d -- 2.20.1