When I use PyCharm for my Django projects, I often suffer from PyCharm being unable to link attributes of a related model to corresponding ForeignKey (etc.) field. This results in lots of inspection warnings (underlines). Is there a way to make PyCharm recognize related model attributes?
from django.db import models
some_field = models.BooleanField()
model_a = models.ForeignKey(ModelA)
return self.model_a.some_field # "some_field" is unresolved