I want to list all active users in dropdown list. But all users are listed in the dropdown
How can I do it?

**template**

```
<form method="post">
   {% csrf_token %}
   {{ form|crispy }}
   <input type="hidden" name="customer_id" value="{{ customer.id }}">
   <button type="submit" class="btn btn-primary btn-sm">Assign</button>
</form>

```

**forms**

```
class AssignForm(forms.ModelForm):
    class Meta:
        model = Customer
        fields = ('user',)

```

**views**

```
form = AssignForm(request.POST or None)
    if request.POST:
        customer_id = request.POST.get('customer_id', None)
        customer = Customer.objects.get(id=customer_id)
        user = UserProfile.objects.get(id=request.POST.get('user', None))
        customer.user = user
        customer.save()
        # form.save()
        return redirect('user:customer_list')

```

**models**

```
class UserProfile(AbstractUser, UserMixin):
    company = models.ForeignKey(CompanyProfile, on_delete=models.CASCADE, null=True, unique=False)
    username = models.CharField(max_length=500, unique=True)
    first_name = models.CharField(max_length=200)
...

```