def get_form_kwargs(self, form_class_name):
        kwargs = super(UserUpdateView, self).get_form_kwargs(form_class_name)
        if form_class_name == 'user_form':
            kwargs['instance'] = self.object
        elif form_class_name == 'image_form':
            kwargs['instance'] = self.object.image
        return kwargs
Get kwargs for the forms.
dataset/ETHPy150Open ofa/connect/open_connect/accounts/views.py/UserUpdateView.get_form_kwargs