Advertisement
Guest User

Untitled

a guest
Jun 27th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. class Meta:
  2. ordering = ('title',)
  3.  
  4. def __str__(self):
  5. return self.title
  6.  
  7. class Manufactures(models.Model):
  8. headline = models.CharField(max_length=100)
  9. publications = models.ManyToManyField(Car)
  10.  
  11. class Meta:
  12. ordering = ('headline',)
  13.  
  14. Car.objects.filter(manufactures__headline__startswith="Title").values('title')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement