How to filter model property in views?

I updated my question. “on_sale” is a dictionary key