I have "user" Model
username email phonenumberI want to access all "user" model emails in other model "B" and make user to select more than one email and store it has commaseperatedvalues
"B" colums are
organization Designation share_knowledge_with
abc manager (here all emails which user selected
to be stored with commaseperated) I tried like this but not working:
MODEL
class B(models.Model):
organization=models.CharField(max_length=200,blank=False,null=True)
emails_for_help = models.TextField(null=True,help_text="select with whom
you want to share knowledge") form
class Bform(ModelForm):
emails_for_help=forms.ModelMultipleChoiceField(queryset=User.objects.all(),
widget=forms.CheckboxSelectMultiple)
class Meta:
model=B
fields=["organization","emails_for_help"]I tried like this but it is taking null value in "emails_for_help"