django - How do I make this model query work? -


I'm trying to find a solution that will return the object with a specific ID.

I have these models:

  Class ModelB (models.Model): customid = models.CharField (max_length = 32) & lt; - Data - & gt; Class model A (models.Model): b = Model. Araginki (ModelB, blank = True, null = true, related_name = "bs")  

And in my code this code is:

a = Model A.Obages FILTER (ModelB__customid = bobject_id)

I want to be able to find all the objects with a BB object.

Any thoughts?

code_bjects = ModelA.objects.filter


Comments