2 model form with foreign key

11 views
Skip to first unread message

Onur

unread,
Jun 9, 2014, 8:00:13 AM6/9/14
to django...@googlegroups.com
below is the my 2 models 

Class Profile(models.MODEL):
       
      first_name = models.Charfield()
      last_name = models.Charfield()
      adress = ..... 

Class Reservation(models.MODEL):
       
       profile = models.ForeignKey(Profile)
       price = models.IntegerField()
       room = models.Charfield()


and I have 2 model form with both models, and my user interface includes all of above those fields,

so What kind of structure do I have to use,  multiple inheritence or just model form(Reservation),

Thank you :)

Reply all
Reply to author
Forward
0 new messages