I have this model:
class PetAttribute(models.Model):
species = models.ForeignKey(PetSpecies, related_name = "pets")
pet_category = models.ForeignKey(PetCategory, related_name = "pets", blank=True, null=True)
pet_type = models.ForeignKey(PetType, related_name = "pets", blank=True, null=True)
additional_fields= models.ManyToManyField( AdditionalField, null= True, blank=True )
Now i want to add an additional option in select (pet_category, pet_type), which is
("0","Other")
in queryset of these. I have tried but form give me an error
Error: Select a valid choice. That choice is not one of the available choices.
here is a one solution of it, but i want to do this by ModelChoiceField
Any suggestion?
Thanks :)