Hi, I want to add a button like admin panel to the M2M or Foreign key fields. With a popup (or something else) to add a new model (like in the admin panel).
Ex. #Models class Vendor(models.Model): name = models.CharField(max_length=255,blank=False,unique=True) class Product(models.Model): name = models.CharField(max_length=255,blank=False) vendor = models.ForeignKey(Vendor) #Forms class VendorForm(ModelForm): class Meta: model = Vendor class ProductForm(ModelForm): class Meta: model = Product But I want a "add" button to the ProductForm to add a new Vendor (using VendorForm) and when the new vendor is created it must be selected at the ProductForm. Thank's a lot. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/s2HLMQtMuMYJ. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.