Given a following model:
from django.db import models
class A(models.Model):
_number = models.IntegerField()
Is it all right to have a leading underscore in a field name? What about use in Querysets?
Specifically I am concerned about the situation when there is another model B:
class B(models.Model):
a = models.ForeignKey(A)
Then what would be the naming rule for queries?
B.objects.filter(a___number__in=(1,2,3)) or
B.objects.filter(a__number__in=(1,2,3))
models.Model? -- Also, FwIW, I'm assuming that the metaclass is here and I don't see anything to make me believe that an underscore prefix wouldn't work (but I did only look at it for about 1 min ;-).