Re: Inlined hierarchy models in django admin site.

2021-06-01 Thread DJANGO DEVELOPER
I think this the only way to lin different models with eachother. and I would like to hear more about linking the models with each other if there is anyone who can describe it to both of us. On Wed, Jun 2, 2021 at 10:38 AM Ayush Bisht wrote: > thanks, .. it works for me.. but is there any other

Re: Inlined hierarchy models in django admin site.

2021-06-01 Thread Ayush Bisht
thanks, .. it works for me.. but is there any other way to do these ??. as PatientVaccineStatus already connected to Patient model, and Vaccine connected to PatientVaccineStatus model. Can't we merged all the tables of descendants to their parent model in this hierarchy fashion without linking

Re: Inlined hierarchy models in django admin site.

2021-06-01 Thread DJANGO DEVELOPER
btw have you applied in your models what I told you to do? On Wed, Jun 2, 2021 at 10:31 AM Ayush Bisht wrote: > yes, its true, but here it works as candidate key. so that we can identify > the patient based in ICMR id's. > > On Tuesday, June 1, 2021 at 1:34:24 AM UTC-7 abubak...@gmail.com

Re: Inlined hierarchy models in django admin site.

2021-06-01 Thread Ayush Bisht
yes, its true, but here it works as candidate key. so that we can identify the patient based in ICMR id's. On Tuesday, June 1, 2021 at 1:34:24 AM UTC-7 abubak...@gmail.com wrote: > class Patient(models.Model): > patient_id = models.CharField(max_length=60) # no need for adding > patient

Re: Inlined hierarchy models in django admin site.

2021-06-01 Thread DJANGO DEVELOPER
class Patient(models.Model): patient_id = models.CharField(max_length=60) # no need for adding patient id because django automatically creates ids patient_vaccine = models.ForeignKey(PatientVaccine, related_name="patient_vaccine") vaccine = models.ForeignKey(Vaccinet,

Re: Inlined hierarchy models in django admin site.

2021-06-01 Thread DJANGO DEVELOPER
class Vaccine(models.Model) vaccine = models.ForeignKey(PatientVaccineStatus, related_name="vaccine_status") patient = models.ForeignKey(Patient, related_name="patient") # new line apply this line and your patient model will be linked with Vaccine model On Tue, Jun 1, 2021 at 11:06 AM