settings.py 文件源码

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

项目:Tktr 作者: Intuity 项目源码 文件源码
def document_view(self):
        # Get the document
        document = self.request.root.properties[self.request.matchdict["doc_code"]]
        if type(document) is not Document:
            self.request.session.flash("Document does not exist!", "error")
            return HTTPFound(location=self.request.route_path("admin_settings"))
        if "submit" in self.request.POST:
            document.main_body = self.request.POST["body"]
            to_remove = []
            for point in document.headline_points:
                to_remove.append(point)
            for point in to_remove:
                document.headline_points.remove(point)
            for highpoint in self.request.params.getall("highpoint"):
                document.headline_points.append(highpoint)
        return {
            "document": document,
        }
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号