Comment obtenir uniquement le premier enregistrement dans Django
MyModel.objects.filter(blah=blah).first()
sandy_codes_py
MyModel.objects.filter(blah=blah).first()
queryset.first()
Model.objects.filter(blah=blah).first()
# Returns first object that matches filter
MyModel.objects.filter(blah=blah).first()