DK 2024-05-02 09:36:01 +00:00 zatwierdzone przez GitHub
commit f4753be16e
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
1 zmienionych plików z 14 dodań i 0 usunięć

Wyświetl plik

@ -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",
)
...
```