daily pastebin goal
4%
SHARE
TWEET

Untitled

a guest Dec 10th, 2018 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class Trade:
  2.     name = models.CharField(
  3.         default='',
  4.         max_length=50,
  5.         blank=True,
  6.         null=True
  7.     )
  8.     date = models.DateField(
  9.         default=None,
  10.         blank=True,
  11.         null=True
  12.     )
  13.  
  14.  
  15.  
  16. class TradeLeg(models.Model):
  17.     trade = models.ForeignKey(
  18.         Trade,
  19.         on_delete=models.CASCADE
  20.     )
  21.     quantity = models.IntegerField(
  22.         default=0
  23.     )
  24.    
  25. trade = Trade.objects.filter(tradeleg__quantity = 0)
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