[Answered ]-Choice field initial data

2👍

You can try using ModelChoiceField

class ProfileForm(forms.Form):

   name = forms.CharField(label=_('Full Name'))
   about = forms.CharField(widget=forms.Textarea(), label=_('Tell something about you'))
   country = forms.ModelChoiceField(label=_('Country'), queryset=Country.objects.all(), required=False,initial=Country.objects.get(code="np").pk)  

Leave a comment