Use .filter() in Config Templates to query objects during lookups and conditional logic. This exposes the Django ORM QuerySet filter directly in your templates.
Here's an example:
{% for iface in device.interfaces.filter(enabled=True, name__startswith="ge-") %}
interface {{ iface.name }}
{% endfor %}
