Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Meta:
- ordering = ('title',)
- def __str__(self):
- return self.title
- class Manufactures(models.Model):
- headline = models.CharField(max_length=100)
- publications = models.ManyToManyField(Car)
- class Meta:
- ordering = ('headline',)
- Car.objects.filter(manufactures__headline__startswith="Title").values('title')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement