views.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:websauna 作者: websauna 项目源码 文件源码
def build_object(self, form, appstruct: dict) -> object:
        """Builds a new object.

        The default behavior is to call :py:meth:`create_object` to construct a new object, then populate it with :py:meth:`initialize_object` and finally include the created object in the transaction lifecycle with :py:meth:`add_object`.
        """
        obj = self.create_object()
        self.initialize_object(form, appstruct, obj)
        # We do not need to explicitly call save() or commit() as we are using Zope transaction manager
        self.add_object(obj)
        return obj
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号