我们从Python开源项目中,提取了以下2个代码示例,用于说明如何使用django.views.generic.edit.ProcessFormView()。
def handle_common(self, handler, request, *args, **kwargs): handler = super(ProcessFormView, self).handle_common( handler, request, *args, **kwargs) self.object = None if self.add else self.get_object() self.form = self.get_form() return handler
def get(self, request, *args, **kwargs): self.inline_formsets = self.get_inline_formsets( self.object, change=not self.add ) return super(ProcessFormView, self).get(request, *args, **kwargs)