I have these two models:

```
class A(models.Model):
   name=models.CharField(max_length=10)

class D(models.Model):
   code=models.IntegerField()

```

the code field can have a number that exists in model A but it cant be related due to other factors. But what I want know is to list items from A whose value is the same with code

```
items=D.objects.values('code__name')

```

would work but since they are not related nor can be related, how can I handle that?