fnp
/
redakcja.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
24bbddd
)
refactor imports
author
Jan Szejko
<janek37@gmail.com>
Thu, 22 Mar 2018 11:14:27 +0000
(12:14 +0100)
committer
Jan Szejko
<janek37@gmail.com>
Thu, 22 Mar 2018 11:14:27 +0000
(12:14 +0100)
apps/catalogue/views.py
patch
|
blob
|
history
diff --git
a/apps/catalogue/views.py
b/apps/catalogue/views.py
index
6496742
..
b272774
100644
(file)
--- a/
apps/catalogue/views.py
+++ b/
apps/catalogue/views.py
@@
-30,6
+30,11
@@
from catalogue.forms import TagMultipleForm, TagSingleForm
from catalogue.helpers import active_tab
from catalogue.models import Category
from librarian import BuildError
from catalogue.helpers import active_tab
from catalogue.models import Category
from librarian import BuildError
+from librarian.utils import Context
+from librarian.document import Document as SST
+from librarian.formats.html import HtmlFormat
+from librarian.formats.pdf import PdfFormat
+from librarian.formats.epub import EpubFormat
from redakcja.utlis import send_notify_email
from .constants import STAGES
from .models import Document, Plan
from redakcja.utlis import send_notify_email
from .constants import STAGES
from .models import Document, Plan
@@
-172,9
+177,6
@@
def create_missing(request):
@never_cache
def book_html(request, pk, rev_pk=None, preview=False):
@never_cache
def book_html(request, pk, rev_pk=None, preview=False):
- from librarian.document import Document as SST
- from librarian.formats.html import HtmlFormat
-
doc = get_object_or_404(Document, pk=pk, deleted=False)
try:
doc = get_object_or_404(Document, pk=pk, deleted=False)
try:
@@
-228,10
+230,6
@@
def book_html(request, pk, rev_pk=None, preview=False):
@never_cache
def book_pdf(request, pk, rev_pk):
@never_cache
def book_pdf(request, pk, rev_pk):
- from librarian.utils import Context
- from librarian.document import Document as SST
- from librarian.formats.pdf import PdfFormat
-
doc = get_object_or_404(Document, pk=pk)
rev = get_object_or_404(Revision, pk=rev_pk)
# Test
doc = get_object_or_404(Document, pk=pk)
rev = get_object_or_404(Revision, pk=rev_pk)
# Test
@@
-258,10
+256,6
@@
def book_pdf(request, pk, rev_pk):
@never_cache
def book_epub(request, pk, rev_pk):
@never_cache
def book_epub(request, pk, rev_pk):
- from librarian.utils import Context
- from librarian.document import Document as SST
- from librarian.formats.epub import EpubFormat
-
doc = get_object_or_404(Document, pk=pk)
rev = get_object_or_404(Revision, pk=rev_pk)
# Test
doc = get_object_or_404(Document, pk=pk)
rev = get_object_or_404(Revision, pk=rev_pk)
# Test
@@
-288,10
+282,6
@@
def book_epub(request, pk, rev_pk):
@never_cache
def book_mobi(request, pk, rev_pk):
@never_cache
def book_mobi(request, pk, rev_pk):
- from librarian.utils import Context
- from librarian.document import Document as SST
- from librarian.formats.epub import EpubFormat
-
doc = get_object_or_404(Document, pk=pk)
rev = get_object_or_404(Revision, pk=rev_pk)
doc = get_object_or_404(Document, pk=pk)
rev = get_object_or_404(Revision, pk=rev_pk)