I want to order my users with their full_name from profile model. How can I do it here ?
views
CustomUser.objects.filter(is_active=True).order_by('profile.full_name')
models
class Profile(models.Model):
user = models.OneToOneField(CustomUser, on_delete=models.CASCADE)
full_name = models.CharField(max_length=255)