def get(self, request, relation_id, app_obj, object_pk=None, *args, **kwargs):
        self.kwargs['pk'] = object_pk

        add_view = False
        
        if object_pk is not None:
            FormClass = self.get_form_class()
            self.object = self.get_object()
            form = self.get_new_form(instance=self.object, app_obj=app_obj)
        else:
            self.object = None
            form = self.get_new_form(app_obj=app_obj)
            add_view = True

        extra_context = {'form': form,
                         'add': add_view}

        return self.render_to_response(self.get_context_data(**extra_context))
Return a form for model object.
dataset/ETHPy150Open ionyse/ionyweb/ionyweb/administration/actions/views.py/ActionAdminDetailView.get