added temporary potential bug (change auto_crop_images dict names for News)
This commit is contained in:
parent
62c4ab8d74
commit
0d2f961ad5
|
|
@ -268,7 +268,7 @@ class News(GalleryModelMixin, BaseAttributes, TranslatedFieldsMixin):
|
||||||
}
|
}
|
||||||
for crop in crop_parameters:
|
for crop in crop_parameters:
|
||||||
d['auto_crop_images'].update(
|
d['auto_crop_images'].update(
|
||||||
{crop[len(f'{model_name}_'):]: image.get_image_url(crop)})
|
{f'{crop[len(f"{model_name}_"):]}_url': image.get_image_url(crop)})
|
||||||
gallery.append(d)
|
gallery.append(d)
|
||||||
return gallery
|
return gallery
|
||||||
|
|
||||||
|
|
@ -288,7 +288,7 @@ class News(GalleryModelMixin, BaseAttributes, TranslatedFieldsMixin):
|
||||||
if p.startswith(self._meta.model_name.lower())]
|
if p.startswith(self._meta.model_name.lower())]
|
||||||
for crop in crop_parameters:
|
for crop in crop_parameters:
|
||||||
image_property['auto_crop_images'].update(
|
image_property['auto_crop_images'].update(
|
||||||
{crop[len(f'{model_name}_'):]: image.get_image_url(crop)})
|
{f'{crop[len(f"{model_name}_"):]}_url': image.get_image_url(crop)})
|
||||||
return image_property
|
return image_property
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user