Re: Initial value in inline form depending on foreign key value

2012-03-15 Thread FraMazz
Well, I got it. In a very UGLY way, but it does its job. I modified the inline class so that it gets access to the request object by overriding the get_formset function class CheckupInLineAdmin(admin.StackedInline): model = Checkup * form =CheckupAdminForm* extra = 1 *def get_form

Initial value in inline form depending on foreign key value

2012-03-12 Thread FraMazz
Hi all! I' m quite new to django. I googled a bit around but was not able to find an anser to my problem. I have two models: class Patient(models.Model): ... many fields ... class Checkup(models.Model): ... many fields ... patient = models.ForeignKey(Patient, related_name='checkups') al