from picture.models import Picture, PictureArea
from ssify import ssi_included, ssi_expect, SsiVariable as Var
from catalogue import constants
from catalogue import forms
from catalogue.helpers import get_top_level_related_tags
from catalogue.models import Book, Collection, Tag, Fragment
from picture.models import Picture, PictureArea
from ssify import ssi_included, ssi_expect, SsiVariable as Var
from catalogue import constants
from catalogue import forms
from catalogue.helpers import get_top_level_related_tags
from catalogue.models import Book, Collection, Tag, Fragment
-
- # last_published = Book.objects.exclude(cover_thumb='').filter(parent=None).order_by('-created_at')[:20]
- # most_popular = Book.objects.exclude(cover_thumb='')\
- # .order_by('-popularity__count', 'sort_key_author', 'sort_key')[:20]
'book_children': book.children.all().order_by('parent_number', 'sort_key'),
'active_menu_item': 'books',
}, context_instance=RequestContext(request))
'book_children': book.children.all().order_by('parent_number', 'sort_key'),
'active_menu_item': 'books',
}, context_instance=RequestContext(request))
def book_text(request, slug):
book = get_object_or_404(Book, slug=slug)
def book_text(request, slug):
book = get_object_or_404(Book, slug=slug)
return HttpResponseRedirect(book.get_absolute_url())
return HttpResponse(media_file, content_type=constants.EBOOK_CONTENT_TYPES[format_])
return HttpResponseRedirect(book.get_absolute_url())
return HttpResponse(media_file, content_type=constants.EBOOK_CONTENT_TYPES[format_])
return HttpResponseRedirect(book.get_absolute_url())
return super(CustomPDFFormView, self).validate_object(obj, request)
return HttpResponseRedirect(book.get_absolute_url())
return super(CustomPDFFormView, self).validate_object(obj, request)