Hi guys, there is something that i would like do.
i have 4 class:
class delivery(models.Model):
name= models.CharField(max_length=100)
date_join= models.DateField()
....
class Town(models.Model):
delivery_guy = models.ForeignKey(delivery)
name = models.CharField(max_length=100)
....
class message(models.Model):
title= models.CharField(max_length=100)
notes = models.CharField(max_length=200)
date= models.DateField()
....
class childs_of_message(models.Model):
message =models.ForeignKey(message)
delivery_guy = models.ForeignKey(delivery)
direction = models.ForeignKey(delivery)
people_name= models.CharField(max_length=100)
date= models.DateField()
....
I dont know how ill say this, my English is poor, the Town have a delivery_guy, the Message have a Town and the Childs_of_message have a Message and have a Delivery.
In Inlines mode im showing Message like "parent" and Childs_of_message like "child - inlines-", in my childs_of_message, i would like in the select of delivery_guys show the default delivery guy from the Town (if the town have a delivery ill show this delivery selected in the SELECT form in childs_of_message inline mode)
or
how ill make and ModelChoiceField(queryset....) in my inline form admin?
Thanks :)