Hello i have a question
I have two models
class Names(models.Model):
name= models.CharField(("Name"), max_length=50)
status= models.CharField(("Person Status"), max_length=50)
class GeneralForm(models.Model):
user= models.ForeignKey(Names, verbose_name=("User"), on_delete=models.CASCADE)
... other fields
and have modelForm for GeneralForm in form.py:
class GeneralModelForm(forms.ModelForm):
class Meta:
model = GeneralForm
fields = "__all__"
When i use GeneralModelForm it prints out everything as expected, i see Names model’s name field as select option in template but i also want to see Names model’s status field as select option in template. How can i do that?