Есть мои модели
class BNumberGroup(SoftDeleteModel, TimeStampedModel):
uuid = models.UUIDField(db_index=True, default=uuid_lib.uuid4, editable=False)
name = models.CharField(max_length=128, default="")
user = models.ForeignKey(User, on_delete=models.CASCADE)
operator = models.ForeignKey(Operator, on_delete=models.CASCADE)
redirect = models.ForeignKey(Redirects, on_delete=models.CASCADE, null=True, blank=True)
TIMEZONES = tuple(zip(pytz.all_timezones, pytz.all_timezones))
timezone = models.CharField(max_length=32, choices=TIMEZONES, default='UTC')
def __str__(self):
return "-".join([self.name, str(self.operator.name), str(self.user.first_name)])
class BNumber(SoftDeleteModel):
uuid = models.UUIDField(db_index=True, default=uuid_lib.uuid4, editable=False)
number = models.CharField(max_length=123)
b_number_groups = models.ForeignKey(BNumberGroup, on_delete=models.SET_NULL, null=True)
def __str__(self):
return str(self.number)
, когда я пишу BNumber.objects.filter(b_numbers_groups__)
PyCharm не показывает другие параметры, такие как:
BNumber.objects.filter(b_numbers_groups__)
b_numbers_groups__uuid
b_numbers_groups__name
b_numbers_groups__user
b_numbers_groups__operator__id
введите описание изображения здесь
queryset = BNumber.objects.filter(b_numbers_groups__uuid=uuid)