How to represent "infinity" in Django model

Hi!
I want to have a field in the table that stores positive “infinity” by default, so that any is less comparison to that field would yield True.
My backend is PostgreSQL and it supports storing both positive and negative infinity.

How can I achieve this in Django?

I just tried this - using default='Infinity' in the float field definition works.

1 Like