qs1 = User.objects.filter(first__iexact=token).order_by('last')
qs2 = User.objects.filter(first__istartswith=token).exclude(qs1).order_by(
    'last')
result = itertools.chain(qs1, qs2)
Return exact matches at top of Django Queryset