apply suggested changes
This commit is contained in:
parent
45e82abda4
commit
489f97030e
|
@ -29,4 +29,4 @@
|
||||||
nginx/default.conf
|
nginx/default.conf
|
||||||
|
|
||||||
#macOS
|
#macOS
|
||||||
.DS_Store
|
**/.DS_Store
|
||||||
|
|
|
@ -54,7 +54,7 @@ def truncatepath(value, arg):
|
||||||
|
|
||||||
|
|
||||||
@register.simple_tag(takes_context=False)
|
@register.simple_tag(takes_context=False)
|
||||||
def get_book_cover_thumbnail(book, size, ext):
|
def get_book_cover_thumbnail(book, size="medium", ext="jpg"):
|
||||||
"""Returns a book thumbnail at the specified size and extension, with fallback if needed"""
|
"""Returns a book thumbnail at the specified size and extension, with fallback if needed"""
|
||||||
try:
|
try:
|
||||||
cover_thumbnail = getattr(book, "cover_bw_book_%s_%s" % (size, ext))
|
cover_thumbnail = getattr(book, "cover_bw_book_%s_%s" % (size, ext))
|
||||||
|
|
Loading…
Reference in New Issue