Re: How do django Field type hints work?

2022-09-23 Thread Justin Black
django-models/amp/ > > On Sat, Sep 24, 2022, 5:09 AM Justin Black > wrote: > >> Hello there, >> >> If I have a model: >> >> class Money(models.Model): >> price = models.DecimalField() >> >> m = Money(...) >> pycharm knows that m.pr

How do django Field type hints work?

2022-09-23 Thread Justin Black
Hello there, If I have a model: class Money(models.Model): price = models.DecimalField() m = Money(...) pycharm knows that m.price is of type Decimal but when I read through the django code base, I don't see DecimalField or Field subclassing decimal.Decimal And I don't see any registration