Initial commit
This commit is contained in:
16
env/lib/python3.10/site-packages/wagtail/images/edit_handlers.py
vendored
Normal file
16
env/lib/python3.10/site-packages/wagtail/images/edit_handlers.py
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
from django.template.loader import render_to_string
|
||||
|
||||
from wagtail.admin.compare import ForeignObjectComparison
|
||||
|
||||
|
||||
class ImageFieldComparison(ForeignObjectComparison):
|
||||
def htmldiff(self):
|
||||
image_a, image_b = self.get_objects()
|
||||
|
||||
return render_to_string(
|
||||
"wagtailimages/widgets/compare.html",
|
||||
{
|
||||
"image_a": image_a,
|
||||
"image_b": image_b,
|
||||
},
|
||||
)
|
||||
Reference in New Issue
Block a user