1Difference between Django's filter() and get() methods
2
3Basically use get() when you want to get a single unique object,
4and filter() when you want to get all objects that match your lookup parameters
5which means filter() is slightly expensive operation if the model class has a large number of objects, whereas get() is direct approach.
1>>> Entry.objects.filter(
2... headline__startswith='What'
3... ).exclude(
4... pub_date__gte=datetime.date.today()
5... ).filter(
6... pub_date__gte=datetime.date(2005, 1, 30)
7... )
8