I have a user model in django with a field:
wallets = models.ManyToManyField(Wallet)
and a Wallet object with other fields. I currently store the names of the Wallets objects assigned to the user in the user's wallets field. How can I store the id and that the name is still shown in the following form?
wallets = forms.ModelMultipleChoiceField(queryset=Wallet.objects.all(),to_field_name="name",required=False)