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
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
2 matches
Mail list logo