def lookups(self, request, model_admin):
    from django.utils.encoding import force_text
    User = get_user_model()
    options = []
    qs = model_admin.get_queryset(request)
    authors = qs.values_list('version__created_by', flat=True).distinct()
    users = User.objects.filter(pk__in=authors)
    for user in users:
        options.append((force_text(user.pk), (user.get_full_name() or user.get_username())))
    return options
def lookups(self, request, model_admin):
    from django.utils.encoding import force_text
    User = get_user_model()
    options = []
    qs = model_admin.get_queryset(request)
    authors = qs.values_list('version__created_by', flat=True).distinct()
    users = User.objects.filter(pk__in=authors)
    for user in users:
        options.append((force_text(user.pk), (user.get_full_name() or user.get_username())))
    return options