jinja2 partial match? #15604
-
The filters work fine for me via the standard API but the config renderer/jinja2 doesn't seem to work with the filtering. Is there a known method instead for partial match on lookups? Query: {%- for int in device.interfaces.filter(enabled="True",mode="tagged",type="10gbase-x-sfpp",description__ic="test:") %} Response: <class 'django.core.exceptions.FieldError'> Unsupported lookup 'ic' for CharField or join on the field not permitted. Python version: 3.8.12 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The API filters are different from the underlying queryset field lookups. E.g. case-insensitive "contains" is |
Beta Was this translation helpful? Give feedback.
The API filters are different from the underlying queryset field lookups. E.g. case-insensitive "contains" is
icontains
. Reference the Django documentation for the complete list.