tags:

views:

380

answers:

0

Hi,

I'm using inlineformset_factory passing the form to be used in the form argument (form=ProjectMembershipWorkPlaceDayRateForm):

PMWPDRFormSet = inlineformset_factory(ProjectMembership, PMSWorkPlaceDayRate, form=ProjectMembershipWorkPlaceDayRateForm, max_num=10, extra=2, can_delete = False)

I'm wondering whether there is a way to pass some arguments to the init constructor of the ProjectMembershipWorkPlaceDayRateForm . I tried it like this:

PMWPDRFormSet = inlineformset_factory(ProjectMembership, PMSWorkPlaceDayRate, form=ProjectMembershipWorkPlaceDayRateForm(project), max_num=10, extra=2, can_delete = False)

But I'm getting the following error:

issubclass() arg 1 must be a class

Anybody an idea how this could work?