fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix
[wolnelektury.git]
/
src
/
picture
/
templatetags
/
picture_tags.py
diff --git
a/src/picture/templatetags/picture_tags.py
b/src/picture/templatetags/picture_tags.py
index
0542fa3
..
43f2775
100644
(file)
--- a/
src/picture/templatetags/picture_tags.py
+++ b/
src/picture/templatetags/picture_tags.py
@@
-46,7
+46,7
@@
def area_thumbnail_url(area, geometry):
# what to do about this?
_engine = sorl.thumbnail.default.engine
sorl.thumbnail.default.engine = cropper
# what to do about this?
_engine = sorl.thumbnail.default.engine
sorl.thumbnail.default.engine = cropper
- coords = to_square(area.
area
)
+ coords = to_square(area.
get_area_json()
)
try:
th = sorl.thumbnail.default.backend.get_thumbnail(
try:
th = sorl.thumbnail.default.backend.get_thumbnail(
@@
-65,9
+65,7
@@
def area_thumbnail_url(area, geometry):
@register.simple_tag
@register.simple_tag
-def picture_random_picture(exclude_ids, unless=None):
- if unless:
- return None
+def picture_random_picture(exclude_ids):
queryset = Picture.objects.exclude(pk__in=exclude_ids).exclude(image_file='')
count = queryset.count()
if count:
queryset = Picture.objects.exclude(pk__in=exclude_ids).exclude(image_file='')
count = queryset.count()
if count: