kopia lustrzana https://github.com/wagtail/wagtail
Renamed smartcropping to feature detection
rodzic
3de4bc3a24
commit
88f1b24fcc
|
@ -182,8 +182,8 @@ class Image(AbstractImage):
|
|||
|
||||
# Do smartcropping calculations when user saves an image without a focal point
|
||||
@receiver(pre_save, sender=Image)
|
||||
def image_smartcrop(sender, instance, **kwargs):
|
||||
if getattr(settings, 'WAGTAIL_SMARTCROP_ENABLED', False):
|
||||
def image_feature_detection(sender, instance, **kwargs):
|
||||
if getattr(settings, 'WAGTAIL_FEATURE_DETECTION_ENABLED', False):
|
||||
if not opencv_available:
|
||||
raise ImproperlyConfigured("pyOpenCV could not be found.")
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue