In add form for any app in django admin, for foreign key fields of that model.. comes a dropdown list with add button(which opens in a pop-up). Can we have a form where we can add the foreign key model fields in the same form.
For e.g
class UserProfile(models.Model):
user = models.ForeignKey(User, unique=True)
contact = models.ForeignKey(Contact, blank=True, null=True)
For user and contact fields a dropdown with add button is present in admin add form.Can we have all fields of user and contact in same page??
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…