django model all().first() code example
Example 1: how to get only first record in django
MyModel.objects.filter(blah=blah).first()
Example 2: django order by
class Meta:
ordering = ('date',)
MyModel.objects.filter(blah=blah).first()
class Meta:
ordering = ('date',)