I have a user model that has a ManytoMany () field to another object:
class PrivateWallet(models.Model):
name = ...
class Usuario(AbstractUser):
private_wallets = models.ManyToManyField(PrivateWallet, blank=True)
and I want to create a form in which the user can delete that PrivateWallet:
class DeletePrivateWalletForm(forms.Form):
wallets = ModelMultipleChoiceField(queryset=¿?.objects.all(),to_field_name="name",required=True)
I would like to know what I have to put in place of ¿? of the form so that the user is shown only the privateWallets created by him.