django get first object based on search code example Example: django queryset first element queryset.first()