kopia lustrzana https://github.com/wagtail/wagtail
Merge a149d1f854
into 196cb02d10
commit
f4753be16e
|
@ -36,3 +36,17 @@ Use the filter in a template, like so:
|
|||
|
||||
{% image page.photo width-400 blur-7 %}
|
||||
```
|
||||
|
||||
If your custom image filter depends on fields within the ``Image``, for instance those defining the focal point, add a ``vary_fields`` property listing those field names to the subclassed ``FilterOperation``. This is so that a new image rendition is created when any of these fields are changed:
|
||||
|
||||
```python
|
||||
class BlurOutsideFocusPointOperation(FilterOperation):
|
||||
vary_fields = (
|
||||
"focal_point_width",
|
||||
"focal_point_height",
|
||||
"focal_point_x",
|
||||
"focal_point_y",
|
||||
)
|
||||
|
||||
...
|
||||
```
|
||||
|
|
Ładowanie…
Reference in New Issue