daily pastebin goal
81%
SHARE
TWEET

Untitled

a guest Jul 12th, 2018 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class A(models.Model)
  2.   title = models.CharField(max_length=255,blank=True)
  3.  
  4. class B(models.Model)
  5.    a =  models.ForeignKey('A')
  6.  
  7. class C(models.Model)
  8.    b = models.ForeignKey('B')
  9.    
  10. C.objects.filter(b__a__title="Cricket")
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top