{
    "pdf_info": [
        {
            "para_blocks": [
                {
                    "bbox": [
                        89,
                        95,
                        175,
                        121
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                87,
                                90,
                                179,
                                127
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        90,
                                        179,
                                        127
                                    ],
                                    "type": "text",
                                    "content": "Django",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        136,
                        505,
                        179
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                137,
                                505,
                                147
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        137,
                                        262,
                                        147
                                    ],
                                    "type": "text",
                                    "content": "本身基于 MVC 模型（架构），即 Model（模型）",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        263,
                                        137,
                                        270,
                                        146
                                    ],
                                    "type": "inline_equation",
                                    "content": "^ +",
                                    "score": 0.73
                                },
                                {
                                    "bbox": [
                                        271,
                                        137,
                                        319,
                                        147
                                    ],
                                    "type": "text",
                                    "content": "View（视图）",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        319,
                                        138,
                                        327,
                                        146
                                    ],
                                    "type": "inline_equation",
                                    "content": "^ +",
                                    "score": 0.7
                                },
                                {
                                    "bbox": [
                                        327,
                                        137,
                                        505,
                                        147
                                    ],
                                    "type": "text",
                                    "content": "Controller（控制器）设计模式，MVC 模式使后续",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                152,
                                505,
                                163
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        152,
                                        505,
                                        163
                                    ],
                                    "type": "text",
                                    "content": "对程序的修改和扩展简化，并且使程序某一部分的重复利用成为可能。但在 Django 中更常被称为 MTV（Model-",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                168,
                                154,
                                179
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        168,
                                        154,
                                        179
                                    ],
                                    "type": "text",
                                    "content": "Template-View）。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        183,
                        503,
                        292
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 5,
                    "blocks": [
                        {
                            "bbox": [
                                95,
                                183,
                                500,
                                209
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 2,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        184,
                                        500,
                                        193
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                184,
                                                500,
                                                193
                                            ],
                                            "type": "text",
                                            "content": "模型（Model）：负责应用程序的数据和业务逻辑。通过将数据和逻辑从用户界面分离出来，使得模型可以独",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        116,
                                        200,
                                        224,
                                        209
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                116,
                                                200,
                                                224,
                                                209
                                            ],
                                            "type": "text",
                                            "content": "立于用户界面进行测试和修改。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                95,
                                225,
                                503,
                                250
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 3,
                            "lines": [
                                {
                                    "bbox": [
                                        98,
                                        226,
                                        503,
                                        235
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                98,
                                                228,
                                                101,
                                                232
                                            ],
                                            "type": "text",
                                            "content": "",
                                            "score": 0.0
                                        },
                                        {
                                            "bbox": [
                                                114,
                                                226,
                                                503,
                                                235
                                            ],
                                            "type": "text",
                                            "content": "视图（View）：负责显示用户界面，但通常没有直接访问应用程序的数据。这使得可以更容易地更改应用程序",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        116,
                                        241,
                                        207,
                                        250
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                116,
                                                241,
                                                207,
                                                250
                                            ],
                                            "type": "text",
                                            "content": "的外观而不影响数据处理。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                95,
                                266,
                                500,
                                292
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 4,
                            "lines": [
                                {
                                    "bbox": [
                                        113,
                                        266,
                                        500,
                                        277
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                113,
                                                266,
                                                500,
                                                277
                                            ],
                                            "type": "text",
                                            "content": "控制器（Controller）：处理用户输入、更新模型和调整视图。通过将用户输入和应用程序逻辑分离，可以更",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        116,
                                        283,
                                        320,
                                        292
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                116,
                                                283,
                                                320,
                                                292
                                            ],
                                            "type": "text",
                                            "content": "容易地更改用户界面的交互方式而不影响数据和业务逻辑。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        86,
                        308,
                        485,
                        319
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                308,
                                486,
                                319
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        308,
                                        486,
                                        319
                                    ],
                                    "type": "text",
                                    "content": "Django 提供了全栈开发所需的工具，包括数据库ORM、模板引擎、路由系统、用户认证等，大幅减少重复代码。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        334,
                        146,
                        345
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                333,
                                147,
                                345
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        333,
                                        147,
                                        345
                                    ],
                                    "type": "text",
                                    "content": "Django 的哲学:",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        104,
                        360,
                        506,
                        637
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 18,
                    "blocks": [
                        {
                            "bbox": [
                                105,
                                360,
                                432,
                                371
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 8,
                            "lines": [
                                {
                                    "bbox": [
                                        123,
                                        359,
                                        434,
                                        372
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                123,
                                                359,
                                                434,
                                                372
                                            ],
                                            "type": "text",
                                            "content": "DRY（Don't Repeat Yourself）: 避免重复代码，提倡复用（如模板继承、模型继承）。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                386,
                                400,
                                396
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 9,
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        386,
                                        401,
                                        397
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                390,
                                                111,
                                                393
                                            ],
                                            "type": "text",
                                            "content": "",
                                            "score": 0.0
                                        },
                                        {
                                            "bbox": [
                                                124,
                                                386,
                                                401,
                                                397
                                            ],
                                            "type": "text",
                                            "content": "约定优于配置: 默认提供合理配置（如自动生成Admin 界面），减少决策成本。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                104,
                                412,
                                500,
                                439
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 10,
                            "lines": [
                                {
                                    "bbox": [
                                        124,
                                        412,
                                        501,
                                        423
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                124,
                                                412,
                                                501,
                                                423
                                            ],
                                            "type": "text",
                                            "content": "快速开发：Django 提供了大量内置功能，如认证、管理后台、表单处理等，让开发者专注于业务逻辑，而",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        124,
                                        427,
                                        170,
                                        439
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                124,
                                                427,
                                                170,
                                                439
                                            ],
                                            "type": "text",
                                            "content": "非底层实现。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                454,
                                432,
                                464
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 11,
                            "lines": [
                                {
                                    "bbox": [
                                        108,
                                        454,
                                        434,
                                        465
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                108,
                                                458,
                                                111,
                                                460
                                            ],
                                            "type": "text",
                                            "content": "",
                                            "score": 0.0
                                        },
                                        {
                                            "bbox": [
                                                124,
                                                454,
                                                434,
                                                465
                                            ],
                                            "type": "text",
                                            "content": "自动化管理后台：只需简单的模型定义，即可生成强大的后台管理界面，支持增删改查。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                104,
                                480,
                                497,
                                506
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 12,
                            "lines": [
                                {
                                    "bbox": [
                                        108,
                                        479,
                                        498,
                                        492
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                108,
                                                483,
                                                111,
                                                486
                                            ],
                                            "type": "text",
                                            "content": "",
                                            "score": 0.0
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                479,
                                                498,
                                                492
                                            ],
                                            "type": "text",
                                            "content": "ORM 数据库映射：Django 内置 ORM (Object-Relational Mapping)，可以让开发者使用 Python 类与",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        124,
                                        495,
                                        227,
                                        508
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                124,
                                                495,
                                                227,
                                                508
                                            ],
                                            "type": "text",
                                            "content": "数据库交互，无需编写 SQL。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                522,
                                374,
                                532
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 13,
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        522,
                                        376,
                                        533
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                525,
                                                111,
                                                528
                                            ],
                                            "type": "text",
                                            "content": "",
                                            "score": 0.0
                                        },
                                        {
                                            "bbox": [
                                                124,
                                                522,
                                                376,
                                                533
                                            ],
                                            "type": "text",
                                            "content": "强大的 URL 路由：使用正则表达式灵活定义 URL，轻松实现页面路由。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                548,
                                419,
                                558
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 14,
                            "lines": [
                                {
                                    "bbox": [
                                        123,
                                        548,
                                        420,
                                        559
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                123,
                                                548,
                                                420,
                                                559
                                            ],
                                            "type": "text",
                                            "content": "模板引擎：内置强大的模板系统，支持逻辑判断、循环处理，方便渲染 HTML 页面。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                574,
                                351,
                                584
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 15,
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        575,
                                        352,
                                        585
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                577,
                                                111,
                                                580
                                            ],
                                            "type": "text",
                                            "content": "",
                                            "score": 0.0
                                        },
                                        {
                                            "bbox": [
                                                124,
                                                575,
                                                352,
                                                585
                                            ],
                                            "type": "text",
                                            "content": "国际化支持：Django 支持多语言国际化，非常适合全球化应用。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                600,
                                409,
                                610
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 16,
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        600,
                                        410,
                                        611
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                604,
                                                111,
                                                607
                                            ],
                                            "type": "text",
                                            "content": "",
                                            "score": 0.0
                                        },
                                        {
                                            "bbox": [
                                                124,
                                                600,
                                                410,
                                                611
                                            ],
                                            "type": "text",
                                            "content": "高安全性：内置多种安全保护措施，如防止 SQL 注入、XSS 攻击、CSRF 攻击等。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                104,
                                626,
                                506,
                                637
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 17,
                            "lines": [
                                {
                                    "bbox": [
                                        104,
                                        624,
                                        507,
                                        638
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                104,
                                                624,
                                                507,
                                                638
                                            ],
                                            "type": "text",
                                            "content": " 丰富的社区与扩展：大量开源的第三方库，如 Django REST framework、Django CMS 等，快速扩展功能。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "type": "image",
                    "bbox": [
                        89,
                        649,
                        254,
                        743
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                89,
                                649,
                                254,
                                743
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        89,
                                        649,
                                        254,
                                        743
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                649,
                                                254,
                                                743
                                            ],
                                            "type": "image",
                                            "image_path": "f4487cc28d0ed6be5aa3b6d12a641d265ce457c6192d9a6a0c73c17c74dfe081.jpg"
                                        }
                                    ]
                                }
                            ],
                            "index": 19,
                            "angle": 0,
                            "type": "image_body"
                        }
                    ],
                    "index": 19
                }
            ],
            "discarded_blocks": [],
            "page_size": [
                595,
                841
            ],
            "page_idx": 0
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        88,
                        110,
                        163,
                        130
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                109,
                                164,
                                132
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        109,
                                        164,
                                        132
                                    ],
                                    "type": "text",
                                    "content": "内置功能",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "table",
                    "bbox": [
                        88,
                        137,
                        594,
                        400
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                88,
                                137,
                                594,
                                400
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        137,
                                        594,
                                        400
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                137,
                                                594,
                                                400
                                            ],
                                            "type": "table",
                                            "html": "<table><tr><td>功能</td><td>说明</td></tr><tr><td>Admin后台</td><td>自动生成管理界面，无需手动编写CRUD逻辑。</td></tr><tr><td>ORM</td><td>用Python类操作数据库，无需写SQL。</td></tr><tr><td>表单处理</td><td>内置表单验证，防止CSRF攻击。</td></tr><tr><td>用户认证</td><td>提供登录、注册、权限管理（django.contrib.auth）。</td></tr><tr><td>路由系统</td><td>URL映射灵活，支持正则表达式。</td></tr><tr><td>缓存机制</td><td>支持Memcached、Redis等后端。</td></tr></table>",
                                            "image_path": "5d60b0537c37007c990ae2b61e846c3457cfbc1fa80f09239c115f6a3a8da393.jpg"
                                        }
                                    ]
                                }
                            ],
                            "index": 1,
                            "angle": 0,
                            "type": "table_body"
                        }
                    ],
                    "index": 1
                },
                {
                    "type": "image",
                    "bbox": [
                        88,
                        426,
                        426,
                        597
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                88,
                                426,
                                426,
                                597
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        426,
                                        426,
                                        597
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                426,
                                                426,
                                                597
                                            ],
                                            "type": "image",
                                            "image_path": "9e8b7b91d694be7a68319af4130f4b3e88f070e1faac0f9b9d52e5a8c0d292a6.jpg"
                                        }
                                    ]
                                }
                            ],
                            "index": 2,
                            "angle": 0,
                            "type": "image_body"
                        }
                    ],
                    "index": 2
                },
                {
                    "bbox": [
                        88,
                        614,
                        349,
                        635
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                87,
                                612,
                                351,
                                637
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        612,
                                        351,
                                        637
                                    ],
                                    "type": "text",
                                    "content": "MVC (Model-View-Controller)",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        104,
                        645,
                        453,
                        708
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 7,
                    "blocks": [
                        {
                            "bbox": [
                                104,
                                645,
                                359,
                                655
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 4,
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        645,
                                        361,
                                        655
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                648,
                                                111,
                                                651
                                            ],
                                            "type": "text",
                                            "content": "",
                                            "score": 0.0
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                645,
                                                361,
                                                655
                                            ],
                                            "type": "text",
                                            "content": "Model (模型)：处理与数据库的交互，定义数据的结构和业务逻辑。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                104,
                                671,
                                332,
                                681
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 5,
                            "lines": [
                                {
                                    "bbox": [
                                        123,
                                        670,
                                        333,
                                        682
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                123,
                                                670,
                                                333,
                                                682
                                            ],
                                            "type": "text",
                                            "content": "View (视图)：负责数据展示，生成用户看到的HTML 页面。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                104,
                                697,
                                453,
                                708
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 6,
                            "lines": [
                                {
                                    "bbox": [
                                        121,
                                        697,
                                        454,
                                        708
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                121,
                                                697,
                                                454,
                                                708
                                            ],
                                            "type": "text",
                                            "content": "Controller (控制器)：接收用户请求，调用Model 处理数据，并将结果传递给View 渲染页面。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        88,
                        723,
                        110,
                        733
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                721,
                                111,
                                735
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        721,
                                        111,
                                        735
                                    ],
                                    "type": "text",
                                    "content": "流程：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        105,
                        749,
                        221,
                        759
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                105,
                                748,
                                223,
                                761
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        105,
                                        748,
                                        223,
                                        761
                                    ],
                                    "type": "text",
                                    "content": "1. 用户发送请求到 Controller。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [],
            "page_size": [
                595,
                841
            ],
            "page_idx": 1
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        105,
                        79,
                        280,
                        142
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 3,
                    "blocks": [
                        {
                            "bbox": [
                                105,
                                79,
                                280,
                                90
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 0,
                            "lines": [
                                {
                                    "bbox": [
                                        105,
                                        79,
                                        281,
                                        92
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                105,
                                                79,
                                                281,
                                                92
                                            ],
                                            "type": "text",
                                            "content": "2. Controller 处理逻辑，调用 Model 获取数据。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                106,
                                233,
                                116
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 1,
                            "lines": [
                                {
                                    "bbox": [
                                        105,
                                        106,
                                        235,
                                        117
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                105,
                                                106,
                                                235,
                                                117
                                            ],
                                            "type": "text",
                                            "content": "3. Controller 将数据传递给 View。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                132,
                                254,
                                142
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 2,
                            "lines": [
                                {
                                    "bbox": [
                                        105,
                                        131,
                                        255,
                                        143
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                105,
                                                131,
                                                255,
                                                143
                                            ],
                                            "type": "text",
                                            "content": "4. View 渲染并返回 HTML 页面给用户。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        86,
                        161,
                        492,
                        213
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                85,
                                159,
                                494,
                                186
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        85,
                                        159,
                                        494,
                                        186
                                    ],
                                    "type": "text",
                                    "content": "MVT (Model-Template-View) —— Django 的实",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                85,
                                190,
                                148,
                                216
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        85,
                                        190,
                                        148,
                                        216
                                    ],
                                    "type": "text",
                                    "content": "现方式",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        222,
                        314,
                        234
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                222,
                                315,
                                234
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        222,
                                        315,
                                        234
                                    ],
                                    "type": "text",
                                    "content": "Django 中采用了MVT 设计模式，类似于MVC，但有一些区别：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        104,
                        249,
                        451,
                        312
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 9,
                    "blocks": [
                        {
                            "bbox": [
                                104,
                                249,
                                367,
                                259
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 6,
                            "lines": [
                                {
                                    "bbox": [
                                        108,
                                        249,
                                        368,
                                        260
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                108,
                                                253,
                                                111,
                                                255
                                            ],
                                            "type": "text",
                                            "content": "",
                                            "score": 0.0
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                249,
                                                368,
                                                260
                                            ],
                                            "type": "text",
                                            "content": "Model (模型)：与数据库交互，处理数据的创建、读取、更新、删除。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                104,
                                275,
                                333,
                                285
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 7,
                            "lines": [
                                {
                                    "bbox": [
                                        123,
                                        275,
                                        334,
                                        286
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                123,
                                                275,
                                                334,
                                                286
                                            ],
                                            "type": "text",
                                            "content": "Template (模板)：负责页面渲染，生成最终的HTML 内容。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                104,
                                301,
                                451,
                                312
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 8,
                            "lines": [
                                {
                                    "bbox": [
                                        108,
                                        301,
                                        452,
                                        312
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                108,
                                                305,
                                                111,
                                                307
                                            ],
                                            "type": "text",
                                            "content": "",
                                            "score": 0.0
                                        },
                                        {
                                            "bbox": [
                                                116,
                                                301,
                                                452,
                                                312
                                            ],
                                            "type": "text",
                                            "content": "View (视图)：Django 的View 更偏向于控制器的角色，接收请求并决定使用哪个模板和数据。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        87,
                        327,
                        110,
                        338
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                326,
                                111,
                                339
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        326,
                                        111,
                                        339
                                    ],
                                    "type": "text",
                                    "content": "流程：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        359,
                        470,
                        375
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                87,
                                357,
                                473,
                                377
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        357,
                                        473,
                                        377
                                    ],
                                    "type": "text",
                                    "content": "用户访问 URL，请求被 Django 的 urls.py 映射到相应的 View。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        123,
                        387,
                        445,
                        528
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                123,
                                387,
                                445,
                                528
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        123,
                                        387,
                                        445,
                                        528
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                123,
                                                387,
                                                445,
                                                528
                                            ],
                                            "type": "text",
                                            "content": "url.py下  \nurlpatterns "
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                387,
                                                445,
                                                528
                                            ],
                                            "type": "inline_equation",
                                            "content": "="
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                387,
                                                445,
                                                528
                                            ],
                                            "type": "text",
                                            "content": " [url(r'^search-form/\\$,search.search_form)，#映射到search.py中search_form视图url(r'^search/\\$,search.search)， #映射到search.py中search视图url(r'^search-post/\\$,search2.search_post),#映射到search2.py中search_post视图]"
                                        }
                                    ]
                                }
                            ],
                            "index": 12,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 12,
                    "sub_type": "algorithm"
                },
                {
                    "bbox": [
                        105,
                        543,
                        384,
                        579
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 15,
                    "blocks": [
                        {
                            "bbox": [
                                105,
                                543,
                                384,
                                554
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 13,
                            "lines": [
                                {
                                    "bbox": [
                                        108,
                                        543,
                                        384,
                                        555
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                108,
                                                546,
                                                111,
                                                550
                                            ],
                                            "type": "text",
                                            "content": ".",
                                            "score": 0.652
                                        },
                                        {
                                            "bbox": [
                                                124,
                                                543,
                                                384,
                                                555
                                            ],
                                            "type": "text",
                                            "content": "当访问 /search-form/ 时，Django 调用 search.search_form 视图函数",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                569,
                                334,
                                579
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 14,
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        569,
                                        334,
                                        580
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                573,
                                                110,
                                                576
                                            ],
                                            "type": "text",
                                            "content": "",
                                            "score": 0.0
                                        },
                                        {
                                            "bbox": [
                                                124,
                                                569,
                                                334,
                                                580
                                            ],
                                            "type": "text",
                                            "content": "当提交表单到 /search/ 时，调用 search.search 视图函数",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        86,
                        601,
                        351,
                        617
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                600,
                                352,
                                618
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        600,
                                        352,
                                        618
                                    ],
                                    "type": "text",
                                    "content": "View 处理业务逻辑，调用Model 获取数据。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        123,
                        629,
                        280,
                        640
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 17,
                    "lines": [
                        {
                            "bbox": [
                                124,
                                629,
                                280,
                                640
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        124,
                                        629,
                                        280,
                                        640
                                    ],
                                    "type": "text",
                                    "content": "(1) 渲染搜索表单（但是这里无Model交互）",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        123,
                        655,
                        343,
                        719
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                123,
                                655,
                                343,
                                719
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        123,
                                        655,
                                        343,
                                        719
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                123,
                                                655,
                                                343,
                                                719
                                            ],
                                            "type": "text",
                                            "content": "# search.py\ndef search_form(request):\n    return render(request, 'search_form.html')  # 直接渲染模板"
                                        }
                                    ]
                                }
                            ],
                            "index": 18,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 18,
                    "sub_type": "code",
                    "guess_lang": "python"
                },
                {
                    "bbox": [
                        105,
                        733,
                        145,
                        743
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                107,
                                732,
                                147,
                                745
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        107,
                                        736,
                                        111,
                                        740
                                    ],
                                    "type": "text",
                                    "content": "",
                                    "score": 0.0
                                },
                                {
                                    "bbox": [
                                        124,
                                        732,
                                        147,
                                        745
                                    ],
                                    "type": "text",
                                    "content": "流程：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        122,
                        749,
                        291,
                        759
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                124,
                                749,
                                292,
                                760
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        124,
                                        749,
                                        292,
                                        760
                                    ],
                                    "type": "text",
                                    "content": "View 只负责返回模板，未涉及Model 数据操作",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [],
            "page_size": [
                595,
                841
            ],
            "page_idx": 2
        },
        {
            "para_blocks": [
                {
                    "type": "code",
                    "bbox": [
                        123,
                        131,
                        352,
                        301
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                124,
                                105,
                                238,
                                117
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        124,
                                        105,
                                        238,
                                        116
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                124,
                                                105,
                                                238,
                                                116
                                            ],
                                            "type": "text",
                                            "content": "(2) 处理搜索请求（带参数校验）",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ],
                            "index": 0,
                            "angle": 0,
                            "type": "code_caption"
                        },
                        {
                            "bbox": [
                                123,
                                131,
                                352,
                                301
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        123,
                                        131,
                                        352,
                                        301
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                123,
                                                131,
                                                352,
                                                301
                                            ],
                                            "type": "text",
                                            "content": "def search(request): request_encoding "
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                131,
                                                352,
                                                301
                                            ],
                                            "type": "inline_equation",
                                            "content": "="
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                131,
                                                352,
                                                301
                                            ],
                                            "type": "text",
                                            "content": " 'utf-8' if "
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                131,
                                                352,
                                                301
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\mathrm{q}^{\\prime}"
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                131,
                                                352,
                                                301
                                            ],
                                            "type": "text",
                                            "content": " in request.GET and request.GET['q']: #业务逻辑判断 message "
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                131,
                                                352,
                                                301
                                            ],
                                            "type": "inline_equation",
                                            "content": "="
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                131,
                                                352,
                                                301
                                            ],
                                            "type": "text",
                                            "content": " '你搜索的内容为:' "
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                131,
                                                352,
                                                301
                                            ],
                                            "type": "inline_equation",
                                            "content": "^+"
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                131,
                                                352,
                                                301
                                            ],
                                            "type": "text",
                                            "content": " request.GET['q'] else: message "
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                131,
                                                352,
                                                301
                                            ],
                                            "type": "inline_equation",
                                            "content": "="
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                131,
                                                352,
                                                301
                                            ],
                                            "type": "text",
                                            "content": " '你提交了空表单' return HttpResponse(message)#直接返回响应（未用模板）"
                                        }
                                    ]
                                }
                            ],
                            "index": 1,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 1,
                    "sub_type": "algorithm"
                },
                {
                    "type": "code",
                    "bbox": [
                        123,
                        342,
                        271,
                        459
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                128,
                                316,
                                227,
                                327
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        130,
                                        317,
                                        226,
                                        327
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                130,
                                                317,
                                                226,
                                                327
                                            ],
                                            "type": "text",
                                            "content": "（3）# 接收POST请求数据",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ],
                            "index": 2,
                            "angle": 0,
                            "type": "code_caption"
                        },
                        {
                            "bbox": [
                                123,
                                342,
                                271,
                                459
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        123,
                                        342,
                                        271,
                                        459
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                123,
                                                342,
                                                271,
                                                459
                                            ],
                                            "type": "text",
                                            "content": "def search_post(request):   \nctx "
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                342,
                                                271,
                                                459
                                            ],
                                            "type": "inline_equation",
                                            "content": "= \\{\\}"
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                342,
                                                271,
                                                459
                                            ],
                                            "type": "text",
                                            "content": "   \nif request.POST:   \nctx['rlt'] "
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                342,
                                                271,
                                                459
                                            ],
                                            "type": "inline_equation",
                                            "content": "="
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                342,
                                                271,
                                                459
                                            ],
                                            "type": "text",
                                            "content": " request.POST['q']   \nreturn render(request, \"post.html\", ctx)"
                                        }
                                    ]
                                }
                            ],
                            "index": 3,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 3,
                    "sub_type": "algorithm"
                },
                {
                    "bbox": [
                        87,
                        504,
                        280,
                        522
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                86,
                                501,
                                282,
                                524
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        86,
                                        501,
                                        282,
                                        524
                                    ],
                                    "type": "text",
                                    "content": "View 将数据传递给 Template。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        123,
                        558,
                        274,
                        569
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                123,
                                558,
                                274,
                                569
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        123,
                                        558,
                                        274,
                                        569
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                123,
                                                558,
                                                274,
                                                569
                                            ],
                                            "type": "text",
                                            "content": "return render(request, 'search_form.html')"
                                        }
                                    ]
                                }
                            ],
                            "index": 5,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 5,
                    "sub_type": "code",
                    "guess_lang": "lua"
                },
                {
                    "bbox": [
                        123,
                        584,
                        409,
                        596
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                124,
                                584,
                                410,
                                596
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        124,
                                        584,
                                        410,
                                        596
                                    ],
                                    "type": "text",
                                    "content": "在这个例子中，search_form 只是用来展示HTML 表单页面，没有动态数据传入。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        123,
                        610,
                        389,
                        621
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                125,
                                611,
                                389,
                                621
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        125,
                                        611,
                                        389,
                                        621
                                    ],
                                    "type": "text",
                                    "content": "虽然这里没有传递变量，但你可以通过 render 的第三个参数传数据给模板：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        123,
                        636,
                        323,
                        647
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                123,
                                636,
                                323,
                                647
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        123,
                                        636,
                                        323,
                                        647
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                123,
                                                636,
                                                323,
                                                647
                                            ],
                                            "type": "text",
                                            "content": "return render(request, 'search_form.html', {'key': value})"
                                        }
                                    ]
                                }
                            ],
                            "index": 8,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 8,
                    "sub_type": "code",
                    "guess_lang": "lua"
                },
                {
                    "bbox": [
                        124,
                        664,
                        279,
                        676
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                124,
                                663,
                                279,
                                676
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        124,
                                        663,
                                        279,
                                        676
                                    ],
                                    "type": "text",
                                    "content": "第二个没有传输数据因为根本没有template",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        124,
                        692,
                        166,
                        703
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                124,
                                692,
                                167,
                                703
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        124,
                                        692,
                                        167,
                                        703
                                    ],
                                    "type": "text",
                                    "content": "第三个例子",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        123,
                        719,
                        261,
                        729
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                123,
                                719,
                                261,
                                729
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        123,
                                        719,
                                        261,
                                        729
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                123,
                                                719,
                                                261,
                                                729
                                            ],
                                            "type": "text",
                                            "content": "return render(request, \"post.html\", ctx)"
                                        }
                                    ]
                                }
                            ],
                            "index": 11,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 11,
                    "sub_type": "code",
                    "guess_lang": "lua"
                }
            ],
            "discarded_blocks": [],
            "page_size": [
                595,
                841
            ],
            "page_idx": 3
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        105,
                        80,
                        268,
                        116
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 2,
                    "blocks": [
                        {
                            "bbox": [
                                105,
                                80,
                                268,
                                90
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 0,
                            "lines": [
                                {
                                    "bbox": [
                                        105,
                                        79,
                                        268,
                                        90
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                105,
                                                79,
                                                268,
                                                90
                                            ],
                                            "type": "text",
                                            "content": "1. Template 渲染 HTML，最终返回给用户。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                106,
                                229,
                                116
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 1,
                            "lines": [
                                {
                                    "bbox": [
                                        108,
                                        106,
                                        230,
                                        116
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                108,
                                                110,
                                                111,
                                                112
                                            ],
                                            "type": "text",
                                            "content": "",
                                            "score": 0.0
                                        },
                                        {
                                            "bbox": [
                                                124,
                                                106,
                                                230,
                                                116
                                            ],
                                            "type": "text",
                                            "content": "模板文件: search_form.html",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "type": "code",
                    "bbox": [
                        105,
                        211,
                        135,
                        220
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                105,
                                211,
                                135,
                                220
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        105,
                                        211,
                                        135,
                                        220
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                105,
                                                211,
                                                135,
                                                220
                                            ],
                                            "type": "text",
                                            "content": "</form>"
                                        }
                                    ]
                                }
                            ],
                            "index": 3,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 3,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "bbox": [
                        87,
                        245,
                        298,
                        262
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                86,
                                243,
                                301,
                                263
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        86,
                                        243,
                                        301,
                                        263
                                    ],
                                    "type": "text",
                                    "content": "Tip：HTML <form> action 属性",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        105,
                        296,
                        246,
                        306
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                105,
                                296,
                                246,
                                306
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        105,
                                        296,
                                        246,
                                        306
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                105,
                                                296,
                                                246,
                                                306
                                            ],
                                            "type": "text",
                                            "content": "<form action=\"/search/\" method=\"get\">"
                                        }
                                    ]
                                }
                            ],
                            "index": 5,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 5,
                    "sub_type": "code",
                    "guess_lang": "twig"
                },
                {
                    "type": "code",
                    "bbox": [
                        110,
                        323,
                        216,
                        333
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                110,
                                323,
                                216,
                                333
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        110,
                                        323,
                                        216,
                                        333
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                110,
                                                323,
                                                216,
                                                333
                                            ],
                                            "type": "text",
                                            "content": "<input type=\"text\" name=\"q\">"
                                        }
                                    ]
                                }
                            ],
                            "index": 6,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 6,
                    "sub_type": "code",
                    "guess_lang": "twig"
                },
                {
                    "type": "code",
                    "bbox": [
                        110,
                        349,
                        238,
                        359
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                110,
                                349,
                                238,
                                359
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        110,
                                        349,
                                        238,
                                        359
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                110,
                                                349,
                                                238,
                                                359
                                            ],
                                            "type": "text",
                                            "content": "<input type=\"submit\" value=\"搜索\">"
                                        }
                                    ]
                                }
                            ],
                            "index": 7,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 7,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "type": "code",
                    "bbox": [
                        105,
                        375,
                        135,
                        384
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                105,
                                375,
                                135,
                                384
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        105,
                                        375,
                                        135,
                                        384
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                105,
                                                375,
                                                135,
                                                384
                                            ],
                                            "type": "text",
                                            "content": "</form>"
                                        }
                                    ]
                                }
                            ],
                            "index": 8,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 8,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "bbox": [
                        105,
                        401,
                        166,
                        412
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                105,
                                401,
                                167,
                                412
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        105,
                                        401,
                                        167,
                                        412
                                    ],
                                    "type": "text",
                                    "content": "(1) <form> 标签",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        105,
                        428,
                        192,
                        436
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                107,
                                428,
                                193,
                                437
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        107,
                                        430,
                                        111,
                                        433
                                    ],
                                    "type": "text",
                                    "content": "",
                                    "score": 0.0
                                },
                                {
                                    "bbox": [
                                        124,
                                        428,
                                        193,
                                        437
                                    ],
                                    "type": "text",
                                    "content": "action=\"/search/\"",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        141,
                        454,
                        443,
                        515
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 14,
                    "blocks": [
                        {
                            "bbox": [
                                141,
                                454,
                                254,
                                463
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 11,
                            "lines": [
                                {
                                    "bbox": [
                                        142,
                                        453,
                                        254,
                                        464
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                142,
                                                453,
                                                254,
                                                464
                                            ],
                                            "type": "text",
                                            "content": "o 表单提交的目标URL地址",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                141,
                                479,
                                443,
                                490
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 12,
                            "lines": [
                                {
                                    "bbox": [
                                        142,
                                        479,
                                        443,
                                        490
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                142,
                                                479,
                                                443,
                                                490
                                            ],
                                            "type": "text",
                                            "content": "o /search/ 表示提交到当前网站的搜索端点（例如 https://example.com/search/）",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                141,
                                505,
                                356,
                                515
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 13,
                            "lines": [
                                {
                                    "bbox": [
                                        141,
                                        505,
                                        356,
                                        516
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                141,
                                                505,
                                                356,
                                                516
                                            ],
                                            "type": "text",
                                            "content": "o 尾部斜杠/ 表示这是一个目录路径（符合RESTful风格）",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        105,
                        532,
                        179,
                        541
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                107,
                                531,
                                180,
                                542
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        107,
                                        534,
                                        111,
                                        538
                                    ],
                                    "type": "text",
                                    "content": ".",
                                    "score": 0.658
                                },
                                {
                                    "bbox": [
                                        124,
                                        531,
                                        180,
                                        542
                                    ],
                                    "type": "text",
                                    "content": "method=\"get\"",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        141,
                        558,
                        343,
                        619
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 19,
                    "blocks": [
                        {
                            "bbox": [
                                141,
                                558,
                                268,
                                567
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 16,
                            "lines": [
                                {
                                    "bbox": [
                                        142,
                                        557,
                                        269,
                                        568
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                142,
                                                557,
                                                269,
                                                568
                                            ],
                                            "type": "text",
                                            "content": "o 使用 HTTP GET 方法提交数据",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                141,
                                583,
                                343,
                                593
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 17,
                            "lines": [
                                {
                                    "bbox": [
                                        141,
                                        582,
                                        343,
                                        595
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                141,
                                                582,
                                                343,
                                                595
                                            ],
                                            "type": "text",
                                            "content": "o 表单数据会附加在URL后（如 /search/?q=关键词）",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                141,
                                609,
                                317,
                                619
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 18,
                            "lines": [
                                {
                                    "bbox": [
                                        141,
                                        609,
                                        317,
                                        620
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                141,
                                                609,
                                                317,
                                                620
                                            ],
                                            "type": "text",
                                            "content": "o 适合不修改服务器状态的查询操作（如搜索）",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        87,
                        635,
                        147,
                        645
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                635,
                                147,
                                646
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        635,
                                        147,
                                        646
                                    ],
                                    "type": "text",
                                    "content": "2. 实际工作流程",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        105,
                        662,
                        158,
                        672
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 21,
                    "lines": [
                        {
                            "bbox": [
                                105,
                                661,
                                159,
                                673
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        105,
                                        661,
                                        159,
                                        673
                                    ],
                                    "type": "text",
                                    "content": "1. 用户交互",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        141,
                        687,
                        282,
                        724
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 24,
                    "blocks": [
                        {
                            "bbox": [
                                141,
                                687,
                                282,
                                698
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 22,
                            "lines": [
                                {
                                    "bbox": [
                                        142,
                                        687,
                                        283,
                                        698
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                142,
                                                687,
                                                283,
                                                698
                                            ],
                                            "type": "text",
                                            "content": "o 在文本框中输入内容（如\"无人机\"）",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                141,
                                714,
                                215,
                                724
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 23,
                            "lines": [
                                {
                                    "bbox": [
                                        141,
                                        713,
                                        217,
                                        724
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                141,
                                                713,
                                                217,
                                                724
                                            ],
                                            "type": "text",
                                            "content": "o 点击\"搜索\"按钮",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        105,
                        740,
                        166,
                        750
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 25,
                    "lines": [
                        {
                            "bbox": [
                                105,
                                740,
                                167,
                                751
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        105,
                                        740,
                                        167,
                                        751
                                    ],
                                    "type": "text",
                                    "content": "2. 浏览器行为",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [],
            "page_size": [
                595,
                841
            ],
            "page_idx": 4
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        141,
                        79,
                        289,
                        116
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 2,
                    "blocks": [
                        {
                            "bbox": [
                                141,
                                79,
                                289,
                                89
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 0,
                            "lines": [
                                {
                                    "bbox": [
                                        142,
                                        79,
                                        289,
                                        90
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                142,
                                                79,
                                                289,
                                                90
                                            ],
                                            "type": "text",
                                            "content": "o 自动组装 URL：/search/?q=无人机",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                141,
                                105,
                                287,
                                116
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 1,
                            "lines": [
                                {
                                    "bbox": [
                                        141,
                                        105,
                                        289,
                                        116
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                141,
                                                105,
                                                289,
                                                116
                                            ],
                                            "type": "text",
                                            "content": "o 发起GET请求（HTTP头部示例）：",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        87,
                        132,
                        211,
                        142
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                132,
                                211,
                                143
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        132,
                                        211,
                                        143
                                    ],
                                    "type": "text",
                                    "content": "GET /search/?q=无人机 HTTP/1.1",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        158,
                        158,
                        168
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                158,
                                160,
                                169
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        158,
                                        160,
                                        169
                                    ],
                                    "type": "text",
                                    "content": "Host: example.com",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        105,
                        184,
                        166,
                        194
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                105,
                                184,
                                167,
                                195
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        105,
                                        184,
                                        167,
                                        195
                                    ],
                                    "type": "text",
                                    "content": "3. 服务器处理",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        141,
                        210,
                        308,
                        220
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                142,
                                210,
                                309,
                                221
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        142,
                                        210,
                                        309,
                                        221
                                    ],
                                    "type": "text",
                                    "content": "o Django路由将请求交给对应的View处理：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        237,
                        121,
                        247
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                86,
                                234,
                                123,
                                249
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        86,
                                        234,
                                        123,
                                        249
                                    ],
                                    "type": "text",
                                    "content": "# urls.py",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        262,
                        190,
                        272
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                262,
                                192,
                                273
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        262,
                                        192,
                                        273
                                    ],
                                    "type": "text",
                                    "content": "path('search/', views.search)",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        289,
                        128,
                        298
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                287,
                                129,
                                300
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        287,
                                        129,
                                        300
                                    ],
                                    "type": "text",
                                    "content": "# views.py",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        314,
                        161,
                        324
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                313,
                                162,
                                326
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        313,
                                        162,
                                        326
                                    ],
                                    "type": "text",
                                    "content": "def search(request):",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        96,
                        341,
                        269,
                        351
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                96,
                                341,
                                270,
                                352
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        96,
                                        341,
                                        119,
                                        352
                                    ],
                                    "type": "text",
                                    "content": "query",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        119,
                                        343,
                                        126,
                                        349
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.73
                                },
                                {
                                    "bbox": [
                                        127,
                                        341,
                                        270,
                                        352
                                    ],
                                    "type": "text",
                                    "content": "request.GET.get('q') # 获取参数\"q\"的值",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        96,
                        367,
                        251,
                        378
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                96,
                                365,
                                252,
                                379
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        96,
                                        365,
                                        252,
                                        379
                                    ],
                                    "type": "text",
                                    "content": "return HttpResponse(f\"搜索内容：{query}\")",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        450,
                        148,
                        466
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                86,
                                449,
                                151,
                                469
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        86,
                                        449,
                                        151,
                                        469
                                    ],
                                    "type": "text",
                                    "content": "渲染过程:",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        141,
                        479,
                        380,
                        540
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 17,
                    "blocks": [
                        {
                            "bbox": [
                                141,
                                479,
                                380,
                                489
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 14,
                            "lines": [
                                {
                                    "bbox": [
                                        141,
                                        478,
                                        381,
                                        491
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                141,
                                                478,
                                                381,
                                                491
                                            ],
                                            "type": "text",
                                            "content": "1. search_form 视图调用 render(request, 'search_form.html')",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                141,
                                505,
                                346,
                                515
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 15,
                            "lines": [
                                {
                                    "bbox": [
                                        141,
                                        504,
                                        348,
                                        517
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                141,
                                                504,
                                                348,
                                                517
                                            ],
                                            "type": "text",
                                            "content": "2. Django 模板引擎找到 templates/search_form.html",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                141,
                                530,
                                267,
                                540
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 16,
                            "lines": [
                                {
                                    "bbox": [
                                        140,
                                        530,
                                        268,
                                        541
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                140,
                                                530,
                                                268,
                                                541
                                            ],
                                            "type": "text",
                                            "content": "3. 生成纯静态HTML 返回给用户",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        87,
                        556,
                        287,
                        567
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                556,
                                287,
                                568
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        556,
                                        287,
                                        568
                                    ],
                                    "type": "text",
                                    "content": "第二个方式没有模板渲染，直接返回httpresponse响应。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        123,
                        584,
                        166,
                        595
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                124,
                                584,
                                167,
                                596
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        124,
                                        584,
                                        167,
                                        596
                                    ],
                                    "type": "text",
                                    "content": "第三个例子",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        123,
                        610,
                        286,
                        621
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                126,
                                611,
                                286,
                                621
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        126,
                                        611,
                                        286,
                                        621
                                    ],
                                    "type": "text",
                                    "content": "<form action=\"/search-post/\" method=\"post\">",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        132,
                        636,
                        196,
                        647
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 21,
                    "lines": [
                        {
                            "bbox": [
                                132,
                                635,
                                198,
                                648
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        132,
                                        635,
                                        198,
                                        648
                                    ],
                                    "type": "text",
                                    "content": "{% csrf_token %}",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        132,
                        663,
                        240,
                        673
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 22,
                    "lines": [
                        {
                            "bbox": [
                                133,
                                662,
                                239,
                                674
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        133,
                                        662,
                                        239,
                                        674
                                    ],
                                    "type": "text",
                                    "content": "<input type=\"text\" name=\"q\">",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        132,
                        689,
                        260,
                        699
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 23,
                    "lines": [
                        {
                            "bbox": [
                                133,
                                689,
                                261,
                                699
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        133,
                                        689,
                                        173,
                                        699
                                    ],
                                    "type": "text",
                                    "content": "<input type",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        173,
                                        691,
                                        179,
                                        698
                                    ],
                                    "type": "inline_equation",
                                    "content": "\\mathrel { \\mathop = } \\frac { \\ d } { \\ d t }",
                                    "score": 0.53
                                },
                                {
                                    "bbox": [
                                        179,
                                        689,
                                        261,
                                        699
                                    ],
                                    "type": "text",
                                    "content": "\"submit\" value=\"搜索\">",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        123,
                        715,
                        154,
                        724
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 24,
                    "lines": [
                        {
                            "bbox": [
                                124,
                                714,
                                155,
                                725
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        124,
                                        714,
                                        155,
                                        725
                                    ],
                                    "type": "text",
                                    "content": "</form>",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [],
            "page_size": [
                595,
                841
            ],
            "page_idx": 5
        },
        {
            "para_blocks": [
                {
                    "type": "code",
                    "bbox": [
                        123,
                        80,
                        178,
                        90
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                123,
                                80,
                                178,
                                90
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        123,
                                        80,
                                        178,
                                        90
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                123,
                                                80,
                                                178,
                                                90
                                            ],
                                            "type": "text",
                                            "content": "<p>\\{rtt}></p>"
                                        }
                                    ]
                                }
                            ],
                            "index": 0,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 0,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "bbox": [
                        105,
                        106,
                        371,
                        117
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                105,
                                105,
                                372,
                                119
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        105,
                                        105,
                                        126,
                                        119
                                    ],
                                    "type": "text",
                                    "content": "项目",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        180,
                                        106,
                                        217,
                                        118
                                    ],
                                    "type": "text",
                                    "content": "GET 示例",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        330,
                                        106,
                                        372,
                                        118
                                    ],
                                    "type": "text",
                                    "content": "POST 示例",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        105,
                        134,
                        407,
                        146
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                105,
                                132,
                                408,
                                147
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        105,
                                        133,
                                        143,
                                        146
                                    ],
                                    "type": "text",
                                    "content": "URL 个数",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        179,
                                        132,
                                        305,
                                        147
                                    ],
                                    "type": "text",
                                    "content": "2 个 (/search-form/ 和 /search/)",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        330,
                                        132,
                                        408,
                                        147
                                    ],
                                    "type": "text",
                                    "content": "1 个 (/search-post/)",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        105,
                        162,
                        393,
                        173
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                105,
                                161,
                                394,
                                174
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        105,
                                        161,
                                        142,
                                        174
                                    ],
                                    "type": "text",
                                    "content": "表单方法",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        180,
                                        161,
                                        239,
                                        174
                                    ],
                                    "type": "text",
                                    "content": "method=\"get\"",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        329,
                                        161,
                                        394,
                                        173
                                    ],
                                    "type": "text",
                                    "content": "method=\"post\"",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        105,
                        190,
                        372,
                        200
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                107,
                                188,
                                373,
                                201
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        107,
                                        190,
                                        157,
                                        200
                                    ],
                                    "type": "text",
                                    "content": "数据传输方式",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        180,
                                        188,
                                        263,
                                        201
                                    ],
                                    "type": "text",
                                    "content": "通过 URL 参数 (?q=...)",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        329,
                                        189,
                                        373,
                                        200
                                    ],
                                    "type": "text",
                                    "content": "通过请求体",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        105,
                        216,
                        420,
                        228
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                105,
                                216,
                                420,
                                228
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        105,
                                        216,
                                        133,
                                        228
                                    ],
                                    "type": "text",
                                    "content": "安全性",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        180,
                                        216,
                                        274,
                                        227
                                    ],
                                    "type": "text",
                                    "content": "较低，数据暴露在 URL 中",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        330,
                                        216,
                                        420,
                                        227
                                    ],
                                    "type": "text",
                                    "content": "更安全，数据在请求体中",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        105,
                        244,
                        357,
                        255
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                106,
                                243,
                                357,
                                257
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        106,
                                        243,
                                        155,
                                        255
                                    ],
                                    "type": "text",
                                    "content": "CSRF Token",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        179,
                                        243,
                                        208,
                                        257
                                    ],
                                    "type": "text",
                                    "content": "不需要",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        329,
                                        243,
                                        357,
                                        256
                                    ],
                                    "type": "text",
                                    "content": "必须要",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        105,
                        272,
                        348,
                        282
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                106,
                                269,
                                349,
                                284
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        106,
                                        272,
                                        162,
                                        283
                                    ],
                                    "type": "text",
                                    "content": "View 函数数量",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        179,
                                        270,
                                        198,
                                        284
                                    ],
                                    "type": "text",
                                    "content": "2 个",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        329,
                                        269,
                                        349,
                                        284
                                    ],
                                    "type": "text",
                                    "content": "1 个",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        105,
                        300,
                        364,
                        311
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                106,
                                299,
                                365,
                                312
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        106,
                                        300,
                                        149,
                                        311
                                    ],
                                    "type": "text",
                                    "content": "显示与处理",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        180,
                                        300,
                                        215,
                                        312
                                    ],
                                    "type": "text",
                                    "content": "分开处理",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        329,
                                        299,
                                        365,
                                        312
                                    ],
                                    "type": "text",
                                    "content": "合并处理",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        327,
                        166,
                        337
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                326,
                                167,
                                338
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        326,
                                        167,
                                        338
                                    ],
                                    "type": "text",
                                    "content": "(1) 您的两个视图函数",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        353,
                        205,
                        363
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                353,
                                205,
                                364
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        353,
                                        205,
                                        364
                                    ],
                                    "type": "text",
                                    "content": "# 显示视图 （表面看只负责显示）",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        379,
                        182,
                        389
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                377,
                                183,
                                390
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        377,
                                        183,
                                        390
                                    ],
                                    "type": "text",
                                    "content": "def search_form(request):",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        96,
                        405,
                        335,
                        416
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                96,
                                405,
                                336,
                                416
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        96,
                                        405,
                                        336,
                                        416
                                    ],
                                    "type": "text",
                                    "content": "return render(request, 'search_form.html') # 但本质上仍是View 层",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        431,
                        205,
                        441
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                431,
                                205,
                                442
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        431,
                                        205,
                                        442
                                    ],
                                    "type": "text",
                                    "content": "# 处理视图 （表面看只负责处理）",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        457,
                        161,
                        467
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                456,
                                162,
                                468
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        456,
                                        162,
                                        468
                                    ],
                                    "type": "text",
                                    "content": "def search(request):",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        96,
                        483,
                        295,
                        493
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                96,
                                483,
                                295,
                                494
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        96,
                                        483,
                                        131,
                                        494
                                    ],
                                    "type": "text",
                                    "content": "message",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        132,
                                        486,
                                        139,
                                        491
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.73
                                },
                                {
                                    "bbox": [
                                        139,
                                        483,
                                        295,
                                        494
                                    ],
                                    "type": "text",
                                    "content": "process_request(request.GET) # 处理逻辑",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        96,
                        509,
                        255,
                        520
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                96,
                                509,
                                255,
                                520
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        96,
                                        509,
                                        255,
                                        520
                                    ],
                                    "type": "text",
                                    "content": "return HttpResponse(message) # 响应生成",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        535,
                        109,
                        544
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 17,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                534,
                                111,
                                548
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        534,
                                        111,
                                        548
                                    ],
                                    "type": "text",
                                    "content": "本质：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        550,
                        500,
                        561
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                550,
                                500,
                                561
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        550,
                                        500,
                                        561
                                    ],
                                    "type": "text",
                                    "content": "这两个函数都属于View 层，只是内部逻辑侧重不同。Django 的View 是统一的请求处理器，不强制分离显示与处理。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        576,
                        181,
                        587
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                577,
                                182,
                                587
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        577,
                                        182,
                                        587
                                    ],
                                    "type": "text",
                                    "content": "(2) 为什么不是两个MVT？",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        105,
                        602,
                        377,
                        666
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 23,
                    "blocks": [
                        {
                            "bbox": [
                                105,
                                602,
                                348,
                                613
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 20,
                            "lines": [
                                {
                                    "bbox": [
                                        108,
                                        602,
                                        349,
                                        613
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                108,
                                                607,
                                                111,
                                                609
                                            ],
                                            "type": "text",
                                            "content": "",
                                            "score": 0.0
                                        },
                                        {
                                            "bbox": [
                                                124,
                                                602,
                                                349,
                                                613
                                            ],
                                            "type": "text",
                                            "content": "Model：两个视图可能共享同一个Model（如都查询Article 表）",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                629,
                                377,
                                640
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 21,
                            "lines": [
                                {
                                    "bbox": [
                                        123,
                                        628,
                                        378,
                                        640
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                123,
                                                628,
                                                378,
                                                640
                                            ],
                                            "type": "text",
                                            "content": "Template：search_form 使用模板，search 直接返回响应（动态选择）",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                655,
                                281,
                                666
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 22,
                            "lines": [
                                {
                                    "bbox": [
                                        123,
                                        655,
                                        282,
                                        666
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                123,
                                                655,
                                                282,
                                                666
                                            ],
                                            "type": "text",
                                            "content": "View：都是接收request 并返回响应的函数",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        88,
                        690,
                        255,
                        715
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 24,
                    "lines": [
                        {
                            "bbox": [
                                87,
                                687,
                                259,
                                720
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        687,
                                        259,
                                        720
                                    ],
                                    "type": "text",
                                    "content": "创建第一个项目",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        730,
                        246,
                        741
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 25,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                729,
                                246,
                                742
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        729,
                                        246,
                                        742
                                    ],
                                    "type": "text",
                                    "content": "使用 django-admin 来创建 HelloWorld 项目：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [],
            "page_size": [
                595,
                841
            ],
            "page_idx": 6
        },
        {
            "para_blocks": [
                {
                    "type": "code",
                    "bbox": [
                        88,
                        79,
                        254,
                        90
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                88,
                                79,
                                254,
                                90
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        79,
                                        254,
                                        90
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                79,
                                                254,
                                                90
                                            ],
                                            "type": "text",
                                            "content": "django-admin startproject HelloWorld"
                                        }
                                    ]
                                }
                            ],
                            "index": 0,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 0,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "type": "code",
                    "bbox": [
                        88,
                        104,
                        149,
                        114
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                88,
                                104,
                                149,
                                114
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        104,
                                        149,
                                        114
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                104,
                                                149,
                                                114
                                            ],
                                            "type": "text",
                                            "content": "$ cd HelloWorld/"
                                        }
                                    ]
                                }
                            ],
                            "index": 1,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 1,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "type": "code",
                    "bbox": [
                        88,
                        131,
                        110,
                        140
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                88,
                                131,
                                110,
                                140
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        131,
                                        110,
                                        140
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                131,
                                                110,
                                                140
                                            ],
                                            "type": "text",
                                            "content": "$tree"
                                        }
                                    ]
                                }
                            ],
                            "index": 2,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 2,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "type": "code",
                    "bbox": [
                        88,
                        157,
                        218,
                        167
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                88,
                                157,
                                218,
                                167
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        157,
                                        218,
                                        167
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                157,
                                                218,
                                                167
                                            ],
                                            "type": "text",
                                            "content": "HelloWorld/ #项目根目录"
                                        }
                                    ]
                                }
                            ],
                            "index": 3,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 3,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "type": "code",
                    "bbox": [
                        89,
                        182,
                        239,
                        193
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                89,
                                182,
                                239,
                                193
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        89,
                                        182,
                                        239,
                                        193
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                182,
                                                239,
                                                193
                                            ],
                                            "type": "text",
                                            "content": "manage.py #项目管理脚本"
                                        }
                                    ]
                                }
                            ],
                            "index": 4,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 4,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "type": "code",
                    "bbox": [
                        89,
                        208,
                        250,
                        219
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                89,
                                208,
                                250,
                                219
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        89,
                                        208,
                                        250,
                                        219
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                208,
                                                250,
                                                219
                                            ],
                                            "type": "text",
                                            "content": "dbsqlite3 #SQLite数据库文件"
                                        }
                                    ]
                                }
                            ],
                            "index": 5,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 5,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "type": "code",
                    "bbox": [
                        89,
                        234,
                        262,
                        246
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                89,
                                234,
                                262,
                                246
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        89,
                                        234,
                                        262,
                                        246
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                234,
                                                262,
                                                246
                                            ],
                                            "type": "text",
                                            "content": "—— Pycache_// #Python字节码缓存"
                                        }
                                    ]
                                }
                            ],
                            "index": 6,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 6,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "type": "code",
                    "bbox": [
                        89,
                        260,
                        287,
                        271
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                89,
                                260,
                                287,
                                271
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        89,
                                        260,
                                        287,
                                        271
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                260,
                                                287,
                                                271
                                            ],
                                            "type": "text",
                                            "content": "—HelloWorld/#项目配置目录（与项目同名）"
                                        }
                                    ]
                                }
                            ],
                            "index": 7,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 7,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "type": "code",
                    "bbox": [
                        98,
                        286,
                        226,
                        298
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                98,
                                286,
                                226,
                                298
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        98,
                                        286,
                                        226,
                                        298
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                98,
                                                286,
                                                226,
                                                298
                                            ],
                                            "type": "text",
                                            "content": "init.py #包标识文件"
                                        }
                                    ]
                                }
                            ],
                            "index": 8,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 8,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "type": "code",
                    "bbox": [
                        98,
                        312,
                        217,
                        323
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                98,
                                312,
                                217,
                                323
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        98,
                                        312,
                                        217,
                                        323
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                98,
                                                312,
                                                217,
                                                323
                                            ],
                                            "type": "text",
                                            "content": "—settings.py #项目设置"
                                        }
                                    ]
                                }
                            ],
                            "index": 9,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 9,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "type": "code",
                    "bbox": [
                        98,
                        338,
                        217,
                        349
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                98,
                                338,
                                217,
                                349
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        98,
                                        338,
                                        217,
                                        349
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                98,
                                                338,
                                                217,
                                                349
                                            ],
                                            "type": "text",
                                            "content": "├—urls.py #主路由配置"
                                        }
                                    ]
                                }
                            ],
                            "index": 10,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 10,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "type": "code",
                    "bbox": [
                        98,
                        364,
                        216,
                        376
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                98,
                                364,
                                216,
                                376
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        98,
                                        364,
                                        216,
                                        376
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                98,
                                                364,
                                                216,
                                                376
                                            ],
                                            "type": "text",
                                            "content": "— asgi.py #ASGI 配置"
                                        }
                                    ]
                                }
                            ],
                            "index": 11,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 11,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "type": "code",
                    "bbox": [
                        98,
                        391,
                        220,
                        402
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                98,
                                391,
                                220,
                                402
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        98,
                                        391,
                                        220,
                                        402
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                98,
                                                391,
                                                220,
                                                402
                                            ],
                                            "type": "text",
                                            "content": "—wsgi.py #WSGI配置"
                                        }
                                    ]
                                }
                            ],
                            "index": 12,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 12,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "bbox": [
                        88,
                        423,
                        151,
                        439
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                422,
                                153,
                                440
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        422,
                                        153,
                                        440
                                    ],
                                    "type": "text",
                                    "content": "目录说明：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        453,
                        186,
                        465
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                452,
                                186,
                                465
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        452,
                                        186,
                                        465
                                    ],
                                    "type": "text",
                                    "content": "项目根目录 (HelloWorld/)：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "table",
                    "bbox": [
                        88,
                        469,
                        594,
                        576
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                88,
                                469,
                                594,
                                576
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        469,
                                        594,
                                        576
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                469,
                                                594,
                                                576
                                            ],
                                            "type": "table",
                                            "html": "<table><tr><td>文件/目录</td><td>作用</td></tr><tr><td>manage.py</td><td>Django命令行工具入口，可让你以各种方式与该Django项目进行交互。用于运行开发服务器、数据库迁移等操作。</td></tr><tr><td>db.sql3</td><td>SQLite 数据库文件（默认数据库，开发环境使用）。</td></tr><tr><td>__pycache__I</td><td>Python字节码缓存目录（自动生成，无需手动修改）。</td></tr></table>",
                                            "image_path": "c43fbf5546482fbe70641375fef390807849c110805286d7c5ea772917c5c607.jpg"
                                        }
                                    ]
                                }
                            ],
                            "index": 15,
                            "angle": 0,
                            "type": "table_body"
                        }
                    ],
                    "index": 15
                },
                {
                    "bbox": [
                        79,
                        597,
                        383,
                        686
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 20,
                    "blocks": [
                        {
                            "bbox": [
                                79,
                                597,
                                190,
                                607
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 16,
                            "lines": [
                                {
                                    "bbox": [
                                        82,
                                        596,
                                        192,
                                        608
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                82,
                                                600,
                                                85,
                                                603
                                            ],
                                            "type": "text",
                                            "content": "",
                                            "score": 0.0
                                        },
                                        {
                                            "bbox": [
                                                98,
                                                596,
                                                192,
                                                608
                                            ],
                                            "type": "text",
                                            "content": "HelloWorld: 项目的容器。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                79,
                                622,
                                371,
                                634
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 17,
                            "lines": [
                                {
                                    "bbox": [
                                        82,
                                        621,
                                        373,
                                        634
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                82,
                                                626,
                                                85,
                                                629
                                            ],
                                            "type": "text",
                                            "content": "",
                                            "score": 0.0
                                        },
                                        {
                                            "bbox": [
                                                97,
                                                621,
                                                373,
                                                634
                                            ],
                                            "type": "text",
                                            "content": "HelloWorld/__init__.py: 一个空文件，告诉 Python 该目录是一个 Python 包。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                79,
                                649,
                                383,
                                660
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 18,
                            "lines": [
                                {
                                    "bbox": [
                                        98,
                                        649,
                                        385,
                                        660
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                98,
                                                649,
                                                385,
                                                660
                                            ],
                                            "type": "text",
                                            "content": "HelloWorld/asgi.py: 一个 ASGI 兼容的 Web 服务器的入口，以便运行你的项目。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                79,
                                675,
                                290,
                                686
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 19,
                            "lines": [
                                {
                                    "bbox": [
                                        98,
                                        675,
                                        292,
                                        686
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                98,
                                                675,
                                                292,
                                                686
                                            ],
                                            "type": "text",
                                            "content": "HelloWorld/settings.py: 该 Django 项目的设置/配置。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        109,
                        708,
                        116,
                        714
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 21,
                    "lines": []
                },
                {
                    "bbox": [
                        127,
                        722,
                        205,
                        733
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 22,
                    "lines": [
                        {
                            "bbox": [
                                126,
                                722,
                                205,
                                734
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        126,
                                        722,
                                        205,
                                        734
                                    ],
                                    "type": "text",
                                    "content": "核心配置文件，包含：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        127,
                        738,
                        228,
                        749
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 23,
                    "lines": [
                        {
                            "bbox": [
                                125,
                                736,
                                229,
                                751
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        125,
                                        736,
                                        229,
                                        751
                                    ],
                                    "type": "text",
                                    "content": "- 数据库设置 (DATABASES)",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [],
            "page_size": [
                595,
                841
            ],
            "page_idx": 7
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        127,
                        85,
                        245,
                        128
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 3,
                    "blocks": [
                        {
                            "bbox": [
                                127,
                                85,
                                238,
                                98
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 0,
                            "lines": [
                                {
                                    "bbox": [
                                        126,
                                        84,
                                        238,
                                        99
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                126,
                                                84,
                                                238,
                                                99
                                            ],
                                            "type": "text",
                                            "content": "- 静态文件路径 (STATIC_URL)",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                127,
                                100,
                                242,
                                112
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 1,
                            "lines": [
                                {
                                    "bbox": [
                                        126,
                                        100,
                                        243,
                                        113
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                126,
                                                100,
                                                243,
                                                113
                                            ],
                                            "type": "text",
                                            "content": "- 应用注册 (INSTALLED_APPS)",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                127,
                                117,
                                245,
                                128
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 2,
                            "lines": [
                                {
                                    "bbox": [
                                        125,
                                        116,
                                        246,
                                        129
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                125,
                                                116,
                                                246,
                                                129
                                            ],
                                            "type": "text",
                                            "content": "- 调试模式 (DEBUG=True/False)",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        80,
                        174,
                        396,
                        186
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                98,
                                174,
                                396,
                                187
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        98,
                                        174,
                                        396,
                                        187
                                    ],
                                    "type": "text",
                                    "content": "HelloWorld/urls.py: 该 Django 项目的 URL 声明; 一份由 Django 驱动的网站\"目录\"。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        101,
                        222,
                        287,
                        233
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                101,
                                222,
                                287,
                                233
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        101,
                                        222,
                                        287,
                                        233
                                    ],
                                    "type": "text",
                                    "content": "主路由配置文件，定义URL 路径与视图的映射关系。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "image",
                    "bbox": [
                        99,
                        280,
                        459,
                        384
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                99,
                                280,
                                459,
                                384
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        99,
                                        280,
                                        459,
                                        384
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                99,
                                                280,
                                                459,
                                                384
                                            ],
                                            "type": "image",
                                            "image_path": "a823f7d1709065a5407af080d7f7f97b7690b14cc995738e94875496ffb4c9e6.jpg"
                                        }
                                    ]
                                }
                            ],
                            "index": 6,
                            "angle": 0,
                            "type": "image_body"
                        }
                    ],
                    "index": 6
                },
                {
                    "bbox": [
                        80,
                        400,
                        388,
                        412
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                97,
                                399,
                                389,
                                412
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        97,
                                        399,
                                        389,
                                        412
                                    ],
                                    "type": "text",
                                    "content": "HelloWorld/wsgi.py: 一个 WSGI 兼容的 Web 服务器的入口，以便运行你的项目。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        435,
                        174,
                        451
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                434,
                                176,
                                454
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        434,
                                        176,
                                        454
                                    ],
                                    "type": "text",
                                    "content": "关键文件详解",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        80,
                        487,
                        170,
                        498
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                80,
                                486,
                                170,
                                499
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        80,
                                        486,
                                        170,
                                        499
                                    ],
                                    "type": "text",
                                    "content": "1. settings.py（核心配置）",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        80,
                        513,
                        99,
                        523
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                80,
                                513,
                                100,
                                525
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        80,
                                        513,
                                        100,
                                        525
                                    ],
                                    "type": "text",
                                    "content": "实例",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        80,
                        539,
                        196,
                        550
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                80,
                                539,
                                197,
                                550
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        80,
                                        539,
                                        197,
                                        550
                                    ],
                                    "type": "text",
                                    "content": "# HelloWorld/settings.py 示例片段",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        80,
                        571,
                        220,
                        581
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                80,
                                571,
                                221,
                                581
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        80,
                                        571,
                                        221,
                                        581
                                    ],
                                    "type": "text",
                                    "content": "# 安全警告：生产环境必须关闭DEBUG！",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        80,
                        587,
                        128,
                        595
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                80,
                                586,
                                129,
                                597
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        80,
                                        586,
                                        105,
                                        597
                                    ],
                                    "type": "text",
                                    "content": "DEBUG",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        105,
                                        587,
                                        112,
                                        594
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.74
                                },
                                {
                                    "bbox": [
                                        113,
                                        586,
                                        129,
                                        597
                                    ],
                                    "type": "text",
                                    "content": "True",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        80,
                        618,
                        232,
                        628
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                80,
                                618,
                                233,
                                629
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        80,
                                        618,
                                        233,
                                        629
                                    ],
                                    "type": "text",
                                    "content": "# 允许访问的域名（DEBUG=False 时需配置）",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        80,
                        633,
                        152,
                        643
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                80,
                                634,
                                154,
                                644
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        80,
                                        634,
                                        154,
                                        644
                                    ],
                                    "type": "text",
                                    "content": "ALLOWED_HOSTS = []",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        80,
                        664,
                        155,
                        675
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                79,
                                663,
                                155,
                                677
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        79,
                                        663,
                                        155,
                                        677
                                    ],
                                    "type": "text",
                                    "content": "# 注册的 Django 应用",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        80,
                        679,
                        148,
                        690
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 17,
                    "lines": [
                        {
                            "bbox": [
                                80,
                                678,
                                149,
                                691
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        80,
                                        678,
                                        149,
                                        691
                                    ],
                                    "type": "text",
                                    "content": "INSTALLED_APPS = [",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        695,
                        214,
                        705
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                696,
                                215,
                                706
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        696,
                                        215,
                                        706
                                    ],
                                    "type": "text",
                                    "content": "'django.contrib.admin', # 管理员后台",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        711,
                        203,
                        721
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                712,
                                204,
                                722
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        712,
                                        204,
                                        722
                                    ],
                                    "type": "text",
                                    "content": "'django.contrib.auth', # 认证系统",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        726,
                        187,
                        736
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                726,
                                188,
                                738
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        726,
                                        188,
                                        738
                                    ],
                                    "type": "text",
                                    "content": "'django.contrib.contenttypes',",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        742,
                        171,
                        751
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 21,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                741,
                                173,
                                753
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        741,
                                        173,
                                        753
                                    ],
                                    "type": "text",
                                    "content": "'django.contrib.sessions',",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [],
            "page_size": [
                595,
                841
            ],
            "page_idx": 8
        },
        {
            "para_blocks": [
                {
                    "type": "code",
                    "bbox": [
                        77,
                        79,
                        268,
                        295
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                77,
                                79,
                                268,
                                295
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        77,
                                        79,
                                        268,
                                        295
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                77,
                                                79,
                                                268,
                                                295
                                            ],
                                            "type": "text",
                                            "content": "'django.contrib.messages',  \n'django.contrib(staticfiles', #静态文件处理  \n]  \n#数据库配置（默认SQLite）  \nDATABASES = {  \n    'default': {  \n        'ENGINE': 'django.db.backendssqlite3',  \n        'NAME': BASE_DIR / 'db.sqlite3', #数据库文件路径}  \n}  \n#静态文件URL（CSS/JS/图片）  \nSTATIC_URL = 'static/'"
                                        }
                                    ]
                                }
                            ],
                            "index": 0,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 0,
                    "sub_type": "code",
                    "guess_lang": "python"
                },
                {
                    "bbox": [
                        80,
                        308,
                        157,
                        319
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                79,
                                308,
                                157,
                                320
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        79,
                                        308,
                                        157,
                                        320
                                    ],
                                    "type": "text",
                                    "content": "2. urls.py（路由配置）",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        80,
                        334,
                        100,
                        345
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                80,
                                334,
                                100,
                                348
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        80,
                                        334,
                                        100,
                                        348
                                    ],
                                    "type": "text",
                                    "content": "实例",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        80,
                        360,
                        170,
                        371
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                80,
                                361,
                                168,
                                371
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        80,
                                        361,
                                        168,
                                        371
                                    ],
                                    "type": "text",
                                    "content": "# HelloWorld/urls.py 示例",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        80,
                        392,
                        195,
                        402
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                81,
                                391,
                                195,
                                403
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        81,
                                        391,
                                        195,
                                        403
                                    ],
                                    "type": "text",
                                    "content": "from django.contrib import admin",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        80,
                        407,
                        179,
                        417
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                81,
                                407,
                                178,
                                419
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        81,
                                        407,
                                        178,
                                        419
                                    ],
                                    "type": "text",
                                    "content": "from django.urls import path",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        80,
                        439,
                        248,
                        512
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                80,
                                439,
                                248,
                                512
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        80,
                                        439,
                                        248,
                                        512
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                80,
                                                439,
                                                248,
                                                512
                                            ],
                                            "type": "text",
                                            "content": "urlpatterns "
                                        },
                                        {
                                            "bbox": [
                                                80,
                                                439,
                                                248,
                                                512
                                            ],
                                            "type": "inline_equation",
                                            "content": "= ["
                                        },
                                        {
                                            "bbox": [
                                                80,
                                                439,
                                                248,
                                                512
                                            ],
                                            "type": "text",
                                            "content": " path('admin／',admin.site.urls)，#后台管理路由 #可在此添加自定义路由，如： #path('blog／',include('blog URLs'))   \n]"
                                        }
                                    ]
                                }
                            ],
                            "index": 6,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 6,
                    "sub_type": "algorithm"
                },
                {
                    "bbox": [
                        80,
                        527,
                        187,
                        538
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                80,
                                527,
                                186,
                                539
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        80,
                                        527,
                                        186,
                                        539
                                    ],
                                    "type": "text",
                                    "content": "3. manage.py（项目管理脚本）",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        80,
                        553,
                        100,
                        563
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                80,
                                553,
                                100,
                                565
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        80,
                                        553,
                                        100,
                                        565
                                    ],
                                    "type": "text",
                                    "content": "实例",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        80,
                        579,
                        156,
                        589
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                80,
                                578,
                                156,
                                590
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        80,
                                        578,
                                        156,
                                        590
                                    ],
                                    "type": "text",
                                    "content": "#!/usr/bin/env python",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        80,
                        595,
                        115,
                        604
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                79,
                                593,
                                116,
                                607
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        79,
                                        593,
                                        116,
                                        607
                                    ],
                                    "type": "text",
                                    "content": "import os",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        80,
                        610,
                        117,
                        620
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                80,
                                608,
                                119,
                                622
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        80,
                                        608,
                                        119,
                                        622
                                    ],
                                    "type": "text",
                                    "content": "import sys",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        80,
                        641,
                        340,
                        700
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                80,
                                641,
                                340,
                                700
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        80,
                                        641,
                                        340,
                                        700
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                80,
                                                641,
                                                340,
                                                700
                                            ],
                                            "type": "text",
                                            "content": "if __name__ == \"_main_:  \nos.environ.setdefault(\"DJANGO.SettingsMODULE\", \"HelloWorld.Settings\")  \nfrom django.core.management import execute_from_command_line  \nexecute_from_command_line(sys.argv)"
                                        }
                                    ]
                                }
                            ],
                            "index": 12,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 12,
                    "sub_type": "code",
                    "guess_lang": "python"
                },
                {
                    "bbox": [
                        88,
                        719,
                        158,
                        735
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                719,
                                159,
                                738
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        719,
                                        159,
                                        738
                                    ],
                                    "type": "text",
                                    "content": "启动服务器",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        79,
                        748,
                        295,
                        759
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                82,
                                748,
                                295,
                                759
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        82,
                                        748,
                                        295,
                                        759
                                    ],
                                    "type": "text",
                                    "content": "接下来我们进入 HelloWorld 目录输入以下命令，启动服务器：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [],
            "page_size": [
                595,
                841
            ],
            "page_idx": 9
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        79,
                        106,
                        418,
                        117
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                80,
                                106,
                                418,
                                117
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        80,
                                        106,
                                        396,
                                        117
                                    ],
                                    "type": "text",
                                    "content": "0.0.0.0 让其它电脑可连接到开发服务器，8000 为端口号。如果不说明，那么端口号默认为",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        396,
                                        107,
                                        418,
                                        116
                                    ],
                                    "type": "inline_equation",
                                    "content": "8 0 0 0 _ { \\circ }",
                                    "score": 0.82
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        79,
                        132,
                        381,
                        143
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                80,
                                131,
                                381,
                                144
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        80,
                                        131,
                                        381,
                                        144
                                    ],
                                    "type": "text",
                                    "content": "在浏览器输入你服务器的 ip（这里我们输入本机 IP 地址： 127.0.0.1:8000） 及端口号。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        163,
                        273,
                        181
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                162,
                                274,
                                183
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        162,
                                        274,
                                        183
                                    ],
                                    "type": "text",
                                    "content": "常用 django-admin 命令详解",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        191,
                        403,
                        203
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                190,
                                404,
                                205
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        190,
                                        404,
                                        205
                                    ],
                                    "type": "text",
                                    "content": "django-admin 是 Django 框架提供的一个命令行工具，它是管理 Django 项目的核心工具。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        210,
                        431,
                        221
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                210,
                                432,
                                222
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        210,
                                        432,
                                        222
                                    ],
                                    "type": "text",
                                    "content": "无论是创建新项目、运行开发服务器，还是执行数据库迁移，django-admin 都是不可或缺的工具。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        227,
                        267,
                        239
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                227,
                                267,
                                239
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        227,
                                        267,
                                        239
                                    ],
                                    "type": "text",
                                    "content": "要查看 django-admin 提供的所有命令，可以运行：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        246,
                        157,
                        257
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                245,
                                157,
                                257
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        245,
                                        157,
                                        257
                                    ],
                                    "type": "text",
                                    "content": "django-admin help",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        299,
                        175,
                        316
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                297,
                                176,
                                317
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        297,
                                        176,
                                        317
                                    ],
                                    "type": "text",
                                    "content": "1. 创建新项目",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        80,
                        351,
                        202,
                        361
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                80,
                                350,
                                202,
                                362
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        80,
                                        350,
                                        202,
                                        362
                                    ],
                                    "type": "text",
                                    "content": "django-admin startproject 项目名称",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        79,
                        376,
                        345,
                        387
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                81,
                                376,
                                345,
                                388
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        81,
                                        376,
                                        345,
                                        388
                                    ],
                                    "type": "text",
                                    "content": "这个命令会在当前目录下创建一个新的 Django 项目，包含基本的项目结构：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        105,
                        403,
                        219,
                        439
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 13,
                    "blocks": [
                        {
                            "bbox": [
                                105,
                                403,
                                219,
                                413
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 11,
                            "lines": [
                                {
                                    "bbox": [
                                        123,
                                        403,
                                        218,
                                        413
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                123,
                                                403,
                                                218,
                                                413
                                            ],
                                            "type": "text",
                                            "content": "manage.py：项目管理脚本",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                428,
                                210,
                                439
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 12,
                            "lines": [
                                {
                                    "bbox": [
                                        108,
                                        428,
                                        210,
                                        439
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                108,
                                                432,
                                                111,
                                                435
                                            ],
                                            "type": "text",
                                            "content": "",
                                            "score": 0.0
                                        },
                                        {
                                            "bbox": [
                                                124,
                                                428,
                                                210,
                                                439
                                            ],
                                            "type": "text",
                                            "content": "项目名称/：项目主目录",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        141,
                        454,
                        253,
                        543
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 18,
                    "blocks": [
                        {
                            "bbox": [
                                141,
                                454,
                                199,
                                465
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 14,
                            "lines": [
                                {
                                    "bbox": [
                                        141,
                                        452,
                                        200,
                                        468
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                141,
                                                452,
                                                200,
                                                468
                                            ],
                                            "type": "text",
                                            "content": "o __init__.py",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                141,
                                481,
                                253,
                                491
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 15,
                            "lines": [
                                {
                                    "bbox": [
                                        141,
                                        481,
                                        253,
                                        492
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                141,
                                                481,
                                                253,
                                                492
                                            ],
                                            "type": "text",
                                            "content": "o settings.py：项目设置文件",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                141,
                                507,
                                239,
                                517
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 16,
                            "lines": [
                                {
                                    "bbox": [
                                        141,
                                        506,
                                        239,
                                        518
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                141,
                                                506,
                                                239,
                                                518
                                            ],
                                            "type": "text",
                                            "content": "o urls.py：URL 路由配置",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                141,
                                533,
                                246,
                                543
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 17,
                            "lines": [
                                {
                                    "bbox": [
                                        141,
                                        533,
                                        246,
                                        544
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                141,
                                                533,
                                                246,
                                                544
                                            ],
                                            "type": "text",
                                            "content": "o wsgi.py：WSGI 应用入口",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        87,
                        568,
                        176,
                        584
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                567,
                                176,
                                587
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        567,
                                        176,
                                        587
                                    ],
                                    "type": "text",
                                    "content": "2. 创建新应用",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        80,
                        619,
                        315,
                        630
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                81,
                                619,
                                317,
                                632
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        81,
                                        619,
                                        317,
                                        632
                                    ],
                                    "type": "text",
                                    "content": "虽然通常使用 manage.py 来创建应用，但也可以通过 django-admin：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        80,
                        646,
                        190,
                        656
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 21,
                    "lines": [
                        {
                            "bbox": [
                                80,
                                645,
                                191,
                                657
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        80,
                                        645,
                                        191,
                                        657
                                    ],
                                    "type": "text",
                                    "content": "django-admin startapp 应用名称",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        80,
                        672,
                        217,
                        682
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 22,
                    "lines": [
                        {
                            "bbox": [
                                81,
                                671,
                                217,
                                683
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        81,
                                        671,
                                        217,
                                        683
                                    ],
                                    "type": "text",
                                    "content": "这会创建一个新的 Django 应用，包含：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        105,
                        698,
                        243,
                        761
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 26,
                    "blocks": [
                        {
                            "bbox": [
                                105,
                                698,
                                243,
                                708
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 23,
                            "lines": [
                                {
                                    "bbox": [
                                        123,
                                        698,
                                        244,
                                        709
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                123,
                                                698,
                                                244,
                                                709
                                            ],
                                            "type": "text",
                                            "content": "migrations/：数据库迁移文件目录",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                724,
                                163,
                                735
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 24,
                            "lines": [
                                {
                                    "bbox": [
                                        124,
                                        724,
                                        164,
                                        736
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                124,
                                                724,
                                                164,
                                                736
                                            ],
                                            "type": "text",
                                            "content": "__init__.py",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                751,
                                212,
                                761
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 25,
                            "lines": [
                                {
                                    "bbox": [
                                        124,
                                        751,
                                        213,
                                        761
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                124,
                                                751,
                                                213,
                                                761
                                            ],
                                            "type": "text",
                                            "content": "admin.py：管理后台配置",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        80,
                        80,
                        224,
                        90
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                80,
                                80,
                                224,
                                90
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        80,
                                        80,
                                        224,
                                        90
                                    ],
                                    "type": "text",
                                    "content": "python3 manage.py runserver 0.0.0.0:8000",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 10
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        105,
                        80,
                        214,
                        168
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 4,
                    "blocks": [
                        {
                            "bbox": [
                                105,
                                80,
                                191,
                                89
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 0,
                            "lines": [
                                {
                                    "bbox": [
                                        123,
                                        80,
                                        192,
                                        90
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                123,
                                                80,
                                                192,
                                                90
                                            ],
                                            "type": "text",
                                            "content": "apps.py：应用配置",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                106,
                                214,
                                116
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 1,
                            "lines": [
                                {
                                    "bbox": [
                                        124,
                                        106,
                                        215,
                                        116
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                124,
                                                106,
                                                215,
                                                116
                                            ],
                                            "type": "text",
                                            "content": "models.py：数据模型定义",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                132,
                                190,
                                142
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 2,
                            "lines": [
                                {
                                    "bbox": [
                                        122,
                                        132,
                                        192,
                                        143
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                122,
                                                132,
                                                192,
                                                143
                                            ],
                                            "type": "text",
                                            "content": "tests.py：测试代码",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                158,
                                193,
                                168
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 3,
                            "lines": [
                                {
                                    "bbox": [
                                        108,
                                        158,
                                        195,
                                        169
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                108,
                                                162,
                                                111,
                                                164
                                            ],
                                            "type": "text",
                                            "content": "",
                                            "score": 0.0
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                158,
                                                195,
                                                169
                                            ],
                                            "type": "text",
                                            "content": "views.py：视图函数",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        105,
                        185,
                        142,
                        193
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                105,
                                183,
                                145,
                                195
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        105,
                                        183,
                                        145,
                                        195
                                    ],
                                    "type": "text",
                                    "content": "models.py",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        105,
                        211,
                        223,
                        220
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                107,
                                211,
                                224,
                                221
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        107,
                                        211,
                                        224,
                                        221
                                    ],
                                    "type": "text",
                                    "content": "定义数据模型，与数据库表对应：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        106,
                        237,
                        124,
                        246
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                106,
                                236,
                                126,
                                248
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        106,
                                        236,
                                        126,
                                        248
                                    ],
                                    "type": "text",
                                    "content": "实例",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        105,
                        263,
                        208,
                        272
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                106,
                                263,
                                209,
                                274
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        106,
                                        263,
                                        209,
                                        274
                                    ],
                                    "type": "text",
                                    "content": "from django.db import models",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        105,
                        294,
                        320,
                        350
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                105,
                                294,
                                320,
                                350
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        105,
                                        294,
                                        320,
                                        350
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                105,
                                                294,
                                                320,
                                                350
                                            ],
                                            "type": "text",
                                            "content": "class Product/models.Model): name "
                                        },
                                        {
                                            "bbox": [
                                                105,
                                                294,
                                                320,
                                                350
                                            ],
                                            "type": "inline_equation",
                                            "content": "="
                                        },
                                        {
                                            "bbox": [
                                                105,
                                                294,
                                                320,
                                                350
                                            ],
                                            "type": "text",
                                            "content": " models.CharField(max_length "
                                        },
                                        {
                                            "bbox": [
                                                105,
                                                294,
                                                320,
                                                350
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\coloneqq"
                                        },
                                        {
                                            "bbox": [
                                                105,
                                                294,
                                                320,
                                                350
                                            ],
                                            "type": "text",
                                            "content": " 100) price "
                                        },
                                        {
                                            "bbox": [
                                                105,
                                                294,
                                                320,
                                                350
                                            ],
                                            "type": "inline_equation",
                                            "content": "="
                                        },
                                        {
                                            "bbox": [
                                                105,
                                                294,
                                                320,
                                                350
                                            ],
                                            "type": "text",
                                            "content": " modelsDecimalField(maxDigits "
                                        },
                                        {
                                            "bbox": [
                                                105,
                                                294,
                                                320,
                                                350
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\coloneqq"
                                        },
                                        {
                                            "bbox": [
                                                105,
                                                294,
                                                320,
                                                350
                                            ],
                                            "type": "text",
                                            "content": " 10,decimal_places "
                                        },
                                        {
                                            "bbox": [
                                                105,
                                                294,
                                                320,
                                                350
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\coloneqq"
                                        },
                                        {
                                            "bbox": [
                                                105,
                                                294,
                                                320,
                                                350
                                            ],
                                            "type": "text",
                                            "content": " 2) description "
                                        },
                                        {
                                            "bbox": [
                                                105,
                                                294,
                                                320,
                                                350
                                            ],
                                            "type": "inline_equation",
                                            "content": "="
                                        },
                                        {
                                            "bbox": [
                                                105,
                                                294,
                                                320,
                                                350
                                            ],
                                            "type": "text",
                                            "content": " models.TextField()"
                                        }
                                    ]
                                }
                            ],
                            "index": 9,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 9,
                    "sub_type": "algorithm"
                },
                {
                    "bbox": [
                        113,
                        371,
                        171,
                        381
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                113,
                                371,
                                172,
                                381
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        113,
                                        371,
                                        172,
                                        381
                                    ],
                                    "type": "text",
                                    "content": "def __str__(self):",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        120,
                        388,
                        176,
                        396
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                120,
                                387,
                                177,
                                397
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        120,
                                        387,
                                        177,
                                        397
                                    ],
                                    "type": "text",
                                    "content": "return self.name",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        105,
                        414,
                        137,
                        423
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                105,
                                412,
                                139,
                                425
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        105,
                                        412,
                                        139,
                                        425
                                    ],
                                    "type": "text",
                                    "content": "views.py",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        105,
                        439,
                        199,
                        449
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                107,
                                440,
                                200,
                                450
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        107,
                                        440,
                                        200,
                                        450
                                    ],
                                    "type": "text",
                                    "content": "处理业务逻辑，返回响应：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        106,
                        465,
                        124,
                        475
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                105,
                                465,
                                126,
                                478
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        105,
                                        465,
                                        126,
                                        478
                                    ],
                                    "type": "text",
                                    "content": "实例",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        105,
                        491,
                        228,
                        501
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                106,
                                491,
                                229,
                                502
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        106,
                                        491,
                                        229,
                                        502
                                    ],
                                    "type": "text",
                                    "content": "from django.shortcuts import render",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        105,
                        507,
                        204,
                        516
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                106,
                                507,
                                204,
                                518
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        106,
                                        507,
                                        204,
                                        518
                                    ],
                                    "type": "text",
                                    "content": "from .models import Product",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        105,
                        539,
                        351,
                        579
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                105,
                                539,
                                351,
                                579
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        105,
                                        539,
                                        351,
                                        579
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                105,
                                                539,
                                                351,
                                                579
                                            ],
                                            "type": "text",
                                            "content": "def product_list(request):\n    products = Product.objects.all()\n    return render(request, 'myapp/product_list.html', {'products': products})"
                                        }
                                    ]
                                }
                            ],
                            "index": 17,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 17,
                    "sub_type": "code",
                    "guess_lang": "python"
                },
                {
                    "bbox": [
                        105,
                        596,
                        139,
                        605
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                106,
                                594,
                                141,
                                608
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        106,
                                        594,
                                        141,
                                        608
                                    ],
                                    "type": "text",
                                    "content": "admin.py",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        105,
                        622,
                        185,
                        632
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                107,
                                622,
                                187,
                                633
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        107,
                                        622,
                                        187,
                                        633
                                    ],
                                    "type": "text",
                                    "content": "配置 Django 管理后台：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        106,
                        648,
                        124,
                        657
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                106,
                                647,
                                126,
                                660
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        106,
                                        647,
                                        126,
                                        660
                                    ],
                                    "type": "text",
                                    "content": "实例",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        105,
                        673,
                        220,
                        683
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 21,
                    "lines": [
                        {
                            "bbox": [
                                106,
                                673,
                                220,
                                684
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        106,
                                        673,
                                        220,
                                        684
                                    ],
                                    "type": "text",
                                    "content": "from django.contrib import admin",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        105,
                        690,
                        204,
                        698
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 22,
                    "lines": [
                        {
                            "bbox": [
                                107,
                                689,
                                204,
                                699
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        107,
                                        689,
                                        204,
                                        699
                                    ],
                                    "type": "text",
                                    "content": "from .models import Product",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        106,
                        720,
                        192,
                        729
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 23,
                    "lines": [
                        {
                            "bbox": [
                                106,
                                719,
                                193,
                                731
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        106,
                                        719,
                                        193,
                                        731
                                    ],
                                    "type": "text",
                                    "content": "@admin.register(Product)",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [],
            "page_size": [
                595,
                841
            ],
            "page_idx": 11
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        87,
                        157,
                        190,
                        173
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                156,
                                190,
                                174
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        156,
                                        190,
                                        174
                                    ],
                                    "type": "text",
                                    "content": "3. 检查项目配置",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        80,
                        208,
                        149,
                        218
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                80,
                                208,
                                149,
                                219
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        80,
                                        208,
                                        149,
                                        219
                                    ],
                                    "type": "text",
                                    "content": "django-admin check",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        79,
                        234,
                        280,
                        245
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                81,
                                234,
                                281,
                                245
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        81,
                                        234,
                                        281,
                                        245
                                    ],
                                    "type": "text",
                                    "content": "这个命令会检查你的 Django 项目是否有配置错误，包括：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        105,
                        260,
                        190,
                        349
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 9,
                    "blocks": [
                        {
                            "bbox": [
                                105,
                                260,
                                190,
                                270
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 5,
                            "lines": [
                                {
                                    "bbox": [
                                        108,
                                        260,
                                        190,
                                        271
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                108,
                                                264,
                                                111,
                                                267
                                            ],
                                            "type": "text",
                                            "content": ".",
                                            "score": 0.577
                                        },
                                        {
                                            "bbox": [
                                                124,
                                                260,
                                                190,
                                                271
                                            ],
                                            "type": "text",
                                            "content": "模型定义是否正确",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                287,
                                189,
                                296
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 6,
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        287,
                                        189,
                                        297
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                290,
                                                111,
                                                293
                                            ],
                                            "type": "text",
                                            "content": "",
                                            "score": 0.0
                                        },
                                        {
                                            "bbox": [
                                                124,
                                                287,
                                                189,
                                                297
                                            ],
                                            "type": "text",
                                            "content": "URL 配置是否有效",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                312,
                                190,
                                322
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 7,
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        312,
                                        190,
                                        323
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                316,
                                                111,
                                                319
                                            ],
                                            "type": "text",
                                            "content": "",
                                            "score": 0.0
                                        },
                                        {
                                            "bbox": [
                                                124,
                                                312,
                                                190,
                                                323
                                            ],
                                            "type": "text",
                                            "content": "模板设置是否正确",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                338,
                                182,
                                349
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 8,
                            "lines": [
                                {
                                    "bbox": [
                                        125,
                                        339,
                                        182,
                                        349
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                125,
                                                339,
                                                182,
                                                349
                                            ],
                                            "type": "text",
                                            "content": "静态文件配置等",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        87,
                        374,
                        176,
                        390
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                86,
                                372,
                                177,
                                392
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        86,
                                        372,
                                        177,
                                        392
                                    ],
                                    "type": "text",
                                    "content": "4. 数据库迁移",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        80,
                        425,
                        238,
                        435
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                81,
                                425,
                                240,
                                436
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        81,
                                        425,
                                        240,
                                        436
                                    ],
                                    "type": "text",
                                    "content": "Django 使用迁移系统来管理数据库模式变更：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        80,
                        452,
                        239,
                        461
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                80,
                                451,
                                239,
                                463
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        80,
                                        451,
                                        239,
                                        463
                                    ],
                                    "type": "text",
                                    "content": "django-admin makemigrations # 创建迁移文件",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        80,
                        478,
                        239,
                        487
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                80,
                                477,
                                239,
                                488
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        80,
                                        477,
                                        239,
                                        488
                                    ],
                                    "type": "text",
                                    "content": "django-admin migrate # 应用迁移到数据库",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        512,
                        189,
                        528
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                86,
                                511,
                                190,
                                529
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        86,
                                        511,
                                        190,
                                        529
                                    ],
                                    "type": "text",
                                    "content": "5. 创建超级用户",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        80,
                        565,
                        182,
                        573
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                80,
                                564,
                                183,
                                575
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        80,
                                        564,
                                        183,
                                        575
                                    ],
                                    "type": "text",
                                    "content": "django-admin createsuperuser",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        79,
                        590,
                        312,
                        601
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                81,
                                590,
                                312,
                                602
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        81,
                                        590,
                                        312,
                                        602
                                    ],
                                    "type": "text",
                                    "content": "这个命令会引导你创建一个可以访问 Django 管理后台的超级用户。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        625,
                        200,
                        641
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 17,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                624,
                                201,
                                643
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        624,
                                        201,
                                        643
                                    ],
                                    "type": "text",
                                    "content": "6.启动开发服务器",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        80,
                        677,
                        163,
                        687
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                80,
                                677,
                                164,
                                687
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        80,
                                        677,
                                        164,
                                        687
                                    ],
                                    "type": "text",
                                    "content": "django-admin runserver",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        80,
                        703,
                        117,
                        713
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                80,
                                702,
                                118,
                                714
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        80,
                                        702,
                                        118,
                                        714
                                    ],
                                    "type": "text",
                                    "content": "基本语法:",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        80,
                        729,
                        207,
                        740
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                80,
                                729,
                                208,
                                740
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        80,
                                        729,
                                        208,
                                        740
                                    ],
                                    "type": "text",
                                    "content": "python manage.py runserver [IP:端口]",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        105,
                        80,
                        244,
                        90
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                107,
                                80,
                                244,
                                90
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        107,
                                        80,
                                        244,
                                        90
                                    ],
                                    "type": "text",
                                    "content": "class ProductAdmin(admin.ModelAdmin):",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        95,
                        209,
                        105
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                96,
                                209,
                                106
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        96,
                                        151,
                                        106
                                    ],
                                    "type": "text",
                                    "content": "list_display",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        151,
                                        97,
                                        157,
                                        104
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.7
                                },
                                {
                                    "bbox": [
                                        158,
                                        96,
                                        209,
                                        106
                                    ],
                                    "type": "text",
                                    "content": "('name', 'price')",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 12
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        87,
                        85,
                        284,
                        101
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                84,
                                286,
                                104
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        84,
                                        286,
                                        104
                                    ],
                                    "type": "text",
                                    "content": "扩展目录（非自动生成，但常用）",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        80,
                        114,
                        123,
                        122
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                80,
                                114,
                                123,
                                123
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        80,
                                        114,
                                        123,
                                        123
                                    ],
                                    "type": "text",
                                    "content": "HelloWorld/",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        81,
                        139,
                        244,
                        280
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 8,
                    "blocks": [
                        {
                            "bbox": [
                                81,
                                139,
                                244,
                                151
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 2,
                            "lines": [
                                {
                                    "bbox": [
                                        80,
                                        137,
                                        245,
                                        153
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                80,
                                                137,
                                                119,
                                                153
                                            ],
                                            "type": "text",
                                            "content": "├── apps/",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                141,
                                                140,
                                                245,
                                                150
                                            ],
                                            "type": "text",
                                            "content": "# 推荐：存放所有自定义应用",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                81,
                                165,
                                179,
                                176
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 3,
                            "lines": [
                                {
                                    "bbox": [
                                        79,
                                        163,
                                        180,
                                        179
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                79,
                                                163,
                                                126,
                                                179
                                            ],
                                            "type": "text",
                                            "content": "│ └── blog/",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                138,
                                                165,
                                                180,
                                                178
                                            ],
                                            "type": "text",
                                            "content": "# 示例应用",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                81,
                                190,
                                230,
                                202
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 4,
                            "lines": [
                                {
                                    "bbox": [
                                        80,
                                        190,
                                        230,
                                        205
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                80,
                                                190,
                                                120,
                                                205
                                            ],
                                            "type": "text",
                                            "content": "├── static/",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                138,
                                                191,
                                                230,
                                                203
                                            ],
                                            "type": "text",
                                            "content": "# 静态文件（CSS/JS/图片）",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                81,
                                217,
                                199,
                                228
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 5,
                            "lines": [
                                {
                                    "bbox": [
                                        80,
                                        216,
                                        201,
                                        231
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                80,
                                                216,
                                                123,
                                                231
                                            ],
                                            "type": "text",
                                            "content": "├── media/",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                143,
                                                217,
                                                201,
                                                229
                                            ],
                                            "type": "text",
                                            "content": "# 用户上传文件",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                81,
                                243,
                                205,
                                254
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 6,
                            "lines": [
                                {
                                    "bbox": [
                                        82,
                                        243,
                                        205,
                                        256
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                82,
                                                243,
                                                135,
                                                256
                                            ],
                                            "type": "text",
                                            "content": "├── templates/",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                147,
                                                243,
                                                205,
                                                255
                                            ],
                                            "type": "text",
                                            "content": "# 全局模板目录",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                81,
                                270,
                                212,
                                280
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 7,
                            "lines": [
                                {
                                    "bbox": [
                                        83,
                                        270,
                                        213,
                                        281
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                83,
                                                270,
                                                213,
                                                281
                                            ],
                                            "type": "text",
                                            "content": "└── requirements.txt # 项目依赖列表",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        88,
                        305,
                        251,
                        322
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                305,
                                254,
                                322
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        305,
                                        254,
                                        322
                                    ],
                                    "type": "text",
                                    "content": "1. apps/ 目录（推荐结构）",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        80,
                        356,
                        230,
                        367
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                82,
                                357,
                                230,
                                367
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        82,
                                        357,
                                        230,
                                        367
                                    ],
                                    "type": "text",
                                    "content": "将应用集中管理，避免散落在项目根目录。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        80,
                        382,
                        207,
                        393
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                81,
                                382,
                                208,
                                394
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        81,
                                        382,
                                        208,
                                        394
                                    ],
                                    "type": "text",
                                    "content": "需在 settings.py 中配置 Python 路径：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        80,
                        409,
                        116,
                        418
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                80,
                                407,
                                119,
                                421
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        80,
                                        407,
                                        119,
                                        421
                                    ],
                                    "type": "text",
                                    "content": "import sys",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        80,
                        434,
                        239,
                        444
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                80,
                                434,
                                241,
                                446
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        80,
                                        434,
                                        241,
                                        446
                                    ],
                                    "type": "text",
                                    "content": "sys.path.insert(0, os.path.join(BASE_DIR, 'apps'))",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        470,
                        232,
                        486
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                469,
                                232,
                                488
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        469,
                                        232,
                                        488
                                    ],
                                    "type": "text",
                                    "content": "2. 静态文件与媒体文件",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        105,
                        521,
                        459,
                        659
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 21,
                    "blocks": [
                        {
                            "bbox": [
                                105,
                                521,
                                341,
                                532
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 15,
                            "lines": [
                                {
                                    "bbox": [
                                        123,
                                        521,
                                        342,
                                        533
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                123,
                                                521,
                                                342,
                                                533
                                            ],
                                            "type": "text",
                                            "content": "static/：存放 CSS、JavaScript、图片等，通过 STATIC_URL 访问。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                547,
                                459,
                                558
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 16,
                            "lines": [
                                {
                                    "bbox": [
                                        122,
                                        548,
                                        461,
                                        559
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                122,
                                                548,
                                                461,
                                                559
                                            ],
                                            "type": "text",
                                            "content": "media/：用户上传的文件（如头像），通过 MEDIA_URL 访问。需配置服务器在开发时提供访问：",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                573,
                                205,
                                583
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 17,
                            "lines": [
                                {
                                    "bbox": [
                                        108,
                                        574,
                                        205,
                                        584
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                108,
                                                577,
                                                111,
                                                580
                                            ],
                                            "type": "text",
                                            "content": ".",
                                            "score": 0.673
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                574,
                                                205,
                                                584
                                            ],
                                            "type": "text",
                                            "content": "# urls.py（仅开发环境）",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                600,
                                232,
                                610
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 18,
                            "lines": [
                                {
                                    "bbox": [
                                        123,
                                        598,
                                        234,
                                        612
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                123,
                                                598,
                                                234,
                                                612
                                            ],
                                            "type": "text",
                                            "content": "from django.conf import settings",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                626,
                                257,
                                636
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 19,
                            "lines": [
                                {
                                    "bbox": [
                                        123,
                                        625,
                                        258,
                                        637
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                123,
                                                625,
                                                258,
                                                637
                                            ],
                                            "type": "text",
                                            "content": "from django.conf.urls.static import static",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                651,
                                112,
                                659
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 20,
                            "lines": []
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        80,
                        677,
                        348,
                        688
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 22,
                    "lines": [
                        {
                            "bbox": [
                                81,
                                677,
                                349,
                                689
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        81,
                                        677,
                                        118,
                                        689
                                    ],
                                    "type": "text",
                                    "content": "urlpatterns",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        119,
                                        679,
                                        129,
                                        687
                                    ],
                                    "type": "inline_equation",
                                    "content": "+ =",
                                    "score": 0.81
                                },
                                {
                                    "bbox": [
                                        129,
                                        677,
                                        349,
                                        689
                                    ],
                                    "type": "text",
                                    "content": "static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        735,
                        238,
                        751
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 23,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                734,
                                239,
                                753
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        734,
                                        239,
                                        753
                                    ],
                                    "type": "text",
                                    "content": "一个项目可以由多个应用",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [],
            "page_size": [
                595,
                841
            ],
            "page_idx": 13
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        80,
                        79,
                        152,
                        742
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 26,
                    "blocks": [
                        {
                            "bbox": [
                                80,
                                79,
                                120,
                                90
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 0,
                            "lines": [
                                {
                                    "bbox": [
                                        80,
                                        79,
                                        120,
                                        91
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                80,
                                                79,
                                                120,
                                                91
                                            ],
                                            "type": "text",
                                            "content": "myproject/",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                81,
                                105,
                                86,
                                116
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 1,
                            "lines": []
                        },
                        {
                            "bbox": [
                                81,
                                131,
                                133,
                                142
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 2,
                            "lines": [
                                {
                                    "bbox": [
                                        81,
                                        129,
                                        135,
                                        145
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                81,
                                                129,
                                                135,
                                                145
                                            ],
                                            "type": "text",
                                            "content": "├── manage.py",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                81,
                                157,
                                152,
                                169
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 3,
                            "lines": [
                                {
                                    "bbox": [
                                        82,
                                        157,
                                        153,
                                        169
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                82,
                                                157,
                                                153,
                                                169
                                            ],
                                            "type": "text",
                                            "content": "├── requirements.txt",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                81,
                                183,
                                118,
                                194
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 4,
                            "lines": [
                                {
                                    "bbox": [
                                        81,
                                        182,
                                        120,
                                        195
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                81,
                                                182,
                                                120,
                                                195
                                            ],
                                            "type": "text",
                                            "content": "├── static/",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                81,
                                210,
                                120,
                                220
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 5,
                            "lines": [
                                {
                                    "bbox": [
                                        79,
                                        207,
                                        122,
                                        222
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                79,
                                                207,
                                                122,
                                                222
                                            ],
                                            "type": "text",
                                            "content": "│ ── css/ ├",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                81,
                                235,
                                115,
                                246
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 6,
                            "lines": [
                                {
                                    "bbox": [
                                        79,
                                        232,
                                        117,
                                        249
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                79,
                                                232,
                                                117,
                                                249
                                            ],
                                            "type": "text",
                                            "content": "│ ── js/ ├",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                81,
                                262,
                                132,
                                272
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 7,
                            "lines": [
                                {
                                    "bbox": [
                                        79,
                                        260,
                                        133,
                                        275
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                79,
                                                260,
                                                133,
                                                275
                                            ],
                                            "type": "text",
                                            "content": "│ └── images/",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                81,
                                288,
                                121,
                                298
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 8,
                            "lines": [
                                {
                                    "bbox": [
                                        81,
                                        286,
                                        123,
                                        300
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                81,
                                                286,
                                                123,
                                                300
                                            ],
                                            "type": "text",
                                            "content": "├── media/",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                81,
                                313,
                                132,
                                324
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 9,
                            "lines": [
                                {
                                    "bbox": [
                                        81,
                                        312,
                                        134,
                                        327
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                81,
                                                312,
                                                134,
                                                327
                                            ],
                                            "type": "text",
                                            "content": "├── templates/",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                81,
                                340,
                                138,
                                350
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 10,
                            "lines": [
                                {
                                    "bbox": [
                                        80,
                                        339,
                                        139,
                                        352
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                80,
                                                339,
                                                139,
                                                352
                                            ],
                                            "type": "text",
                                            "content": "│ └── base.html",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                81,
                                366,
                                132,
                                377
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 11,
                            "lines": [
                                {
                                    "bbox": [
                                        82,
                                        364,
                                        134,
                                        379
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                82,
                                                364,
                                                134,
                                                379
                                            ],
                                            "type": "text",
                                            "content": "└── myproject/",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                391,
                                141,
                                403
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 12,
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        389,
                                        142,
                                        406
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                389,
                                                142,
                                                406
                                            ],
                                            "type": "text",
                                            "content": "── __init__.py ├",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                417,
                                139,
                                429
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 13,
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        416,
                                        142,
                                        432
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                416,
                                                142,
                                                432
                                            ],
                                            "type": "text",
                                            "content": "── settings.py ├",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                444,
                                126,
                                454
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 14,
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        441,
                                        129,
                                        459
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                441,
                                                129,
                                                459
                                            ],
                                            "type": "text",
                                            "content": "── urls.py ├",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                470,
                                129,
                                481
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 15,
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        468,
                                        130,
                                        484
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                468,
                                                130,
                                                484
                                            ],
                                            "type": "text",
                                            "content": "── wsgi.py ├",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                497,
                                126,
                                507
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 16,
                            "lines": [
                                {
                                    "bbox": [
                                        89,
                                        495,
                                        128,
                                        509
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                495,
                                                128,
                                                509
                                            ],
                                            "type": "text",
                                            "content": "└── asgi.py",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                81,
                                523,
                                126,
                                533
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 17,
                            "lines": [
                                {
                                    "bbox": [
                                        82,
                                        521,
                                        127,
                                        535
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                82,
                                                521,
                                                127,
                                                535
                                            ],
                                            "type": "text",
                                            "content": "└── myapp1/",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                549,
                                142,
                                559
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 18,
                            "lines": [
                                {
                                    "bbox": [
                                        89,
                                        548,
                                        143,
                                        560
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                548,
                                                143,
                                                560
                                            ],
                                            "type": "text",
                                            "content": "── migrations/├",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                575,
                                139,
                                585
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 19,
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        573,
                                        141,
                                        587
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                573,
                                                141,
                                                587
                                            ],
                                            "type": "text",
                                            "content": "── templates/ ├",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                601,
                                142,
                                611
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 20,
                            "lines": [
                                {
                                    "bbox": [
                                        87,
                                        598,
                                        143,
                                        613
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                87,
                                                598,
                                                143,
                                                613
                                            ],
                                            "type": "text",
                                            "content": "│ └── myapp1/",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                627,
                                141,
                                638
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 21,
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        624,
                                        142,
                                        640
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                624,
                                                142,
                                                640
                                            ],
                                            "type": "text",
                                            "content": "── __init__.py ├",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                653,
                                135,
                                664
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 22,
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        650,
                                        137,
                                        666
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                650,
                                                137,
                                                666
                                            ],
                                            "type": "text",
                                            "content": "── admin.py ├",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                678,
                                129,
                                689
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 23,
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        677,
                                        132,
                                        692
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                677,
                                                132,
                                                692
                                            ],
                                            "type": "text",
                                            "content": "── apps.py ├",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                704,
                                138,
                                715
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 24,
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        703,
                                        140,
                                        718
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                703,
                                                140,
                                                718
                                            ],
                                            "type": "text",
                                            "content": "── models.py ├",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                731,
                                129,
                                742
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 25,
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        729,
                                        132,
                                        745
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                729,
                                                132,
                                                745
                                            ],
                                            "type": "text",
                                            "content": "── tests.py ├",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                }
            ],
            "discarded_blocks": [],
            "page_size": [
                595,
                841
            ],
            "page_idx": 14
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        88,
                        79,
                        132,
                        116
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 2,
                    "blocks": [
                        {
                            "bbox": [
                                88,
                                79,
                                127,
                                89
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 0,
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        76,
                                        129,
                                        94
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                76,
                                                129,
                                                94
                                            ],
                                            "type": "text",
                                            "content": "── urls.py ├",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                106,
                                132,
                                116
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 1,
                            "lines": [
                                {
                                    "bbox": [
                                        89,
                                        105,
                                        132,
                                        117
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                105,
                                                132,
                                                117
                                            ],
                                            "type": "text",
                                            "content": "└── views.py",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        81,
                        132,
                        126,
                        142
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                82,
                                130,
                                127,
                                144
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        82,
                                        130,
                                        127,
                                        144
                                    ],
                                    "type": "text",
                                    "content": "└── myapp2/",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        158,
                        148,
                        169
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                157,
                                149,
                                170
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        157,
                                        149,
                                        170
                                    ],
                                    "type": "text",
                                    "content": "└── ... (类似结构)",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        184,
                        122,
                        194
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                184,
                                123,
                                195
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        184,
                                        123,
                                        195
                                    ],
                                    "type": "text",
                                    "content": "实践建议",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        105,
                        210,
                        368,
                        325
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 11,
                    "blocks": [
                        {
                            "bbox": [
                                105,
                                210,
                                310,
                                221
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 6,
                            "lines": [
                                {
                                    "bbox": [
                                        105,
                                        211,
                                        310,
                                        222
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                105,
                                                211,
                                                310,
                                                222
                                            ],
                                            "type": "text",
                                            "content": "1. 项目与应用分离：保持每个应用的独立性，便于复用",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                236,
                                323,
                                247
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 7,
                            "lines": [
                                {
                                    "bbox": [
                                        104,
                                        236,
                                        324,
                                        248
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                104,
                                                236,
                                                324,
                                                248
                                            ],
                                            "type": "text",
                                            "content": "2. 环境配置：使用不同的 settings 文件区分开发和生产环境",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                262,
                                368,
                                273
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 8,
                            "lines": [
                                {
                                    "bbox": [
                                        104,
                                        262,
                                        370,
                                        275
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                104,
                                                262,
                                                370,
                                                275
                                            ],
                                            "type": "text",
                                            "content": "3. 静态文件管理：开发时使用 STATICFILES_DIRS，生产时使用 collectstatic",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                289,
                                315,
                                299
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 9,
                            "lines": [
                                {
                                    "bbox": [
                                        104,
                                        288,
                                        316,
                                        300
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                104,
                                                288,
                                                316,
                                                300
                                            ],
                                            "type": "text",
                                            "content": "4. URL 设计：在应用级别定义 URL，然后在项目级别包含",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                314,
                                278,
                                325
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 10,
                            "lines": [
                                {
                                    "bbox": [
                                        105,
                                        315,
                                        279,
                                        326
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                105,
                                                315,
                                                279,
                                                326
                                            ],
                                            "type": "text",
                                            "content": "5. 模板组织：为每个应用创建子目录存放模板",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        87,
                        340,
                        181,
                        352
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                341,
                                181,
                                352
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        341,
                                        181,
                                        352
                                    ],
                                    "type": "text",
                                    "content": "生产环境vs 开发环境差异",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "table",
                    "bbox": [
                        88,
                        364,
                        594,
                        553
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                88,
                                364,
                                594,
                                553
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        364,
                                        594,
                                        553
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                364,
                                                594,
                                                553
                                            ],
                                            "type": "table",
                                            "html": "<table><tr><td>文件/配置</td><td>开发环境</td><td>生产环境</td></tr><tr><td>DEBUG</td><td>True（显示错误详情）</td><td>False（隐藏错误，记录到日志）</td></tr><tr><td>数据库</td><td>SQLite（默认）</td><td>PostgreSQL/MySQL（性能优化）</td></tr><tr><td>静态文件</td><td>runserver 自动服务</td><td>使用 collectstatic 收集到 CDN</td></tr><tr><td>ALLOWED_HOSTS</td><td>空列表或 [&#x27;localhost&#x27;]</td><td>必须配置域名（如 [&#x27;example.com&#x27;])</td></tr></table>",
                                            "image_path": "d1a1f6ba9036662acf8c0bf0be0cbc4df02f97c028a0669d048704990c5b36eb.jpg"
                                        }
                                    ]
                                }
                            ],
                            "index": 13,
                            "angle": 0,
                            "type": "table_body"
                        }
                    ],
                    "index": 13
                },
                {
                    "bbox": [
                        88,
                        585,
                        184,
                        608
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                85,
                                581,
                                188,
                                611
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        85,
                                        581,
                                        188,
                                        611
                                    ],
                                    "type": "text",
                                    "content": "path() 函数",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        613,
                        456,
                        625
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                613,
                                459,
                                627
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        613,
                                        459,
                                        627
                                    ],
                                    "type": "text",
                                    "content": "Django path() 可以接收四个参数，分别是两个必选参数：route、view 和两个可选参数：kwargs、name。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        629,
                        121,
                        640
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                630,
                                121,
                                640
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        630,
                                        121,
                                        640
                                    ],
                                    "type": "text",
                                    "content": "语法格式：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        654,
                        274,
                        664
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 17,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                652,
                                275,
                                665
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        652,
                                        275,
                                        665
                                    ],
                                    "type": "text",
                                    "content": "path(route, view, kwargs=None, name=None)",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        678,
                        504,
                        704
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                679,
                                505,
                                689
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        679,
                                        505,
                                        689
                                    ],
                                    "type": "text",
                                    "content": "route：字符串，定义URL 的路径部分。可以包含变量，例如<int:my_variable>，以从URL 中捕获参数并将其传递给",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                694,
                                126,
                                705
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        694,
                                        126,
                                        705
                                    ],
                                    "type": "text",
                                    "content": "视图函数。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        709,
                        392,
                        720
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                709,
                                393,
                                721
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        709,
                                        393,
                                        721
                                    ],
                                    "type": "text",
                                    "content": "view：视图函数，处理与给定路由匹配的请求。可以是一个函数或一个基于类的视图。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        725,
                        338,
                        736
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                725,
                                339,
                                736
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        725,
                                        339,
                                        736
                                    ],
                                    "type": "text",
                                    "content": "kwargs（可选）：一个字典，包含传递给视图函数的额外关键字参数。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [],
            "page_size": [
                595,
                841
            ],
            "page_idx": 15
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        86,
                        79,
                        505,
                        106
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                80,
                                505,
                                89
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        80,
                                        505,
                                        89
                                    ],
                                    "type": "text",
                                    "content": "name（可选）：为URL 路由指定一个唯一的名称，以便在代码的其他地方引用它。这对于在模板中生成URL 或在代",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                95,
                                206,
                                106
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        95,
                                        206,
                                        106
                                    ],
                                    "type": "text",
                                    "content": "码中进行重定向等操作非常有用。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        111,
                        326,
                        122
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                111,
                                326,
                                122
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        111,
                                        326,
                                        122
                                    ],
                                    "type": "text",
                                    "content": "这样我们就完成了使用模板来输出数据，从而实现数据与视图分离。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        126,
                        255,
                        137
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                126,
                                253,
                                137
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        126,
                                        253,
                                        137
                                    ],
                                    "type": "text",
                                    "content": "接下来我们将具体介绍模板中常用的语法规则。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        163,
                        196,
                        187
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                87,
                                162,
                                197,
                                188
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        162,
                                        197,
                                        188
                                    ],
                                    "type": "text",
                                    "content": "Django 模板",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        194,
                        500,
                        221
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                194,
                                499,
                                205
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        194,
                                        499,
                                        205
                                    ],
                                    "type": "text",
                                    "content": "Django 的模板系统（Template System）是用于将业务逻辑（Python）与展示层（HTML）分离的核心组件，它允许",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                210,
                                272,
                                221
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        210,
                                        272,
                                        221
                                    ],
                                    "type": "text",
                                    "content": "开发者通过简单的标签和变量动态生成 HTML 页面。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        227,
                        502,
                        254
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                227,
                                502,
                                240
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        227,
                                        502,
                                        240
                                    ],
                                    "type": "text",
                                    "content": "在上一章节中我们使用 django.http.HttpResponse() 来输出 \"Hello World！\"，该方式将数据与视图混合在一起，不",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                243,
                                185,
                                255
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        243,
                                        185,
                                        255
                                    ],
                                    "type": "text",
                                    "content": "符合 Django 的 MVT 思想。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        260,
                        451,
                        272
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                262,
                                451,
                                272
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        262,
                                        451,
                                        272
                                    ],
                                    "type": "text",
                                    "content": "本章节我们将为大家详细介绍Django 模板的应用，模板是一个文本，用于分离文档的表现形式和内容。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "table",
                    "bbox": [
                        88,
                        277,
                        595,
                        439
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                88,
                                277,
                                595,
                                439
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        277,
                                        595,
                                        439
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                277,
                                                595,
                                                439
                                            ],
                                            "type": "table",
                                            "html": "<table><tr><td>功能</td><td>语法/示例</td><td>适用场景</td></tr><tr><td>变量渲染</td><td>{\\ variable }</td><td>动态显示数据</td></tr><tr><td>逻辑控制</td><td>{% if %}, {% for %}</td><td>条件/循环渲染</td></tr><tr><td>模板继承</td><td>{% extends %}, {% block %}</td><td>避免重复 HTML 结构</td></tr><tr><td>静态文件</td><td>{% static &#x27;path&#x27; %}</td><td>加载 CSS/JS/图片</td></tr><tr><td>自定义过滤器</td><td>@register.filter</td><td>扩展模板功能</td></tr></table>",
                                            "image_path": "d6715d65fc28226ad77843e37b6ae208fe41f5917292f96ae26d2c7786e130c3.jpg"
                                        }
                                    ]
                                }
                            ],
                            "index": 7,
                            "angle": 0,
                            "type": "table_body"
                        }
                    ],
                    "index": 7
                },
                {
                    "bbox": [
                        88,
                        486,
                        232,
                        511
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                486,
                                235,
                                511
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        486,
                                        235,
                                        511
                                    ],
                                    "type": "text",
                                    "content": "Django 模板标签",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        523,
                        120,
                        539
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                86,
                                520,
                                122,
                                542
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        86,
                                        520,
                                        122,
                                        542
                                    ],
                                    "type": "text",
                                    "content": "变量",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        550,
                        126,
                        562
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                550,
                                127,
                                563
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        550,
                                        127,
                                        563
                                    ],
                                    "type": "text",
                                    "content": "模板语法：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        575,
                        246,
                        587
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                575,
                                248,
                                587
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        575,
                                        248,
                                        587
                                    ],
                                    "type": "text",
                                    "content": "view：｛\"HTML 变量名\" : \"views 变量名\"｝",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        599,
                        164,
                        611
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                87,
                                597,
                                166,
                                613
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        597,
                                        166,
                                        613
                                    ],
                                    "type": "text",
                                    "content": "HTML：｛｛变量名｝｝",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        629,
                        127,
                        647
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                86,
                                626,
                                129,
                                653
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        86,
                                        626,
                                        129,
                                        653
                                    ],
                                    "type": "text",
                                    "content": "列表",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        658,
                        329,
                        670
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                658,
                                329,
                                671
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        658,
                                        329,
                                        671
                                    ],
                                    "type": "text",
                                    "content": "templates 中的 runoob.html 中，可以用 . 索引下标取出对应的元素。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        673,
                        281,
                        686
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                673,
                                281,
                                687
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        673,
                                        281,
                                        687
                                    ],
                                    "type": "text",
                                    "content": "HelloWorld/HelloWorld/views.py 文件代码：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        88,
                        692,
                        402,
                        751
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                88,
                                692,
                                402,
                                751
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        692,
                                        402,
                                        751
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                692,
                                                402,
                                                751
                                            ],
                                            "type": "text",
                                            "content": "from django.shortcuts import render  \ndef runoob(request):  \n    views_list = [\"菜鸟教程1\", \"菜鸟教程2\", \"菜鸟教程3\"]  \n    return render(request, \"runoob.html\", {\"views_list\": views_list})"
                                        }
                                    ]
                                }
                            ],
                            "index": 16,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 16,
                    "sub_type": "code",
                    "guess_lang": "python"
                }
            ],
            "discarded_blocks": [],
            "page_size": [
                595,
                841
            ],
            "page_idx": 16
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        87,
                        79,
                        296,
                        90
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                79,
                                297,
                                91
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        79,
                                        297,
                                        91
                                    ],
                                    "type": "text",
                                    "content": "templates 中的 runoob.html 中，可以用 .键 取出对应的值。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        103,
                        134,
                        120
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                85,
                                100,
                                137,
                                123
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        85,
                                        100,
                                        137,
                                        123
                                    ],
                                    "type": "text",
                                    "content": "过滤器",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        132,
                        121,
                        142
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                132,
                                122,
                                142
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        132,
                                        122,
                                        142
                                    ],
                                    "type": "text",
                                    "content": "模板语法：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        156,
                        211,
                        167
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                156,
                                212,
                                167
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        156,
                                        212,
                                        167
                                    ],
                                    "type": "text",
                                    "content": "{{ 变量名 | 过滤器：可选参数 }}",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        180,
                        349,
                        191
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                181,
                                349,
                                190
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        181,
                                        349,
                                        190
                                    ],
                                    "type": "text",
                                    "content": "模板过滤器可以在变量被显示前修改它，过滤器使用管道字符，如下所示：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        196,
                        107,
                        205
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                195,
                                107,
                                206
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        195,
                                        107,
                                        206
                                    ],
                                    "type": "text",
                                    "content": "safe",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        211,
                        213,
                        222
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                211,
                                214,
                                222
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        211,
                                        214,
                                        222
                                    ],
                                    "type": "text",
                                    "content": "将字符串标记为安全，不需要转义。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        227,
                        280,
                        238
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                227,
                                282,
                                239
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        227,
                                        282,
                                        239
                                    ],
                                    "type": "text",
                                    "content": "要保证 views.py 传过来的数据绝对安全，才能用 safe。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        243,
                        233,
                        253
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                243,
                                234,
                                254
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        243,
                                        234,
                                        254
                                    ],
                                    "type": "text",
                                    "content": "和后端 views.py 的 mark_safe 效果相同。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        259,
                        497,
                        269
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                258,
                                499,
                                270
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        258,
                                        499,
                                        270
                                    ],
                                    "type": "text",
                                    "content": "Django 会自动对 views.py 传到HTML文件中的标签语法进行转义，令其语义失效。加safe 过滤器是告诉Django 该",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        275,
                        301,
                        285
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                275,
                                301,
                                285
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        275,
                                        301,
                                        285
                                    ],
                                    "type": "text",
                                    "content": "数据是安全的，不必对其进行转义，可以让该数据语义生效。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        297,
                        164,
                        314
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                86,
                                295,
                                167,
                                316
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        86,
                                        295,
                                        167,
                                        316
                                    ],
                                    "type": "text",
                                    "content": "if/else 标签",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        325,
                        158,
                        336
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                327,
                                158,
                                336
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        327,
                                        158,
                                        336
                                    ],
                                    "type": "text",
                                    "content": "基本语法格式如下：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        88,
                        349,
                        213,
                        386
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                88,
                                349,
                                213,
                                386
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        349,
                                        213,
                                        386
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                349,
                                                213,
                                                386
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\{\\% \\text{if condition}\\}"
                                        },
                                        {
                                            "bbox": [
                                                88,
                                                349,
                                                213,
                                                386
                                            ],
                                            "type": "text",
                                            "content": " display{"
                                        },
                                        {
                                            "bbox": [
                                                88,
                                                349,
                                                213,
                                                386
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\%"
                                        },
                                        {
                                            "bbox": [
                                                88,
                                                349,
                                                213,
                                                386
                                            ],
                                            "type": "text",
                                            "content": "endif}"
                                        }
                                    ]
                                }
                            ],
                            "index": 13,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 13,
                    "sub_type": "algorithm"
                },
                {
                    "bbox": [
                        87,
                        399,
                        110,
                        409
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                398,
                                111,
                                411
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        398,
                                        111,
                                        411
                                    ],
                                    "type": "text",
                                    "content": "或者：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        88,
                        423,
                        257,
                        508
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                88,
                                423,
                                257,
                                508
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        423,
                                        257,
                                        508
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                423,
                                                257,
                                                508
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\{\\%"
                                        },
                                        {
                                            "bbox": [
                                                88,
                                                423,
                                                257,
                                                508
                                            ],
                                            "type": "text",
                                            "content": " if condition1 "
                                        },
                                        {
                                            "bbox": [
                                                88,
                                                423,
                                                257,
                                                508
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\}"
                                        },
                                        {
                                            "bbox": [
                                                88,
                                                423,
                                                257,
                                                508
                                            ],
                                            "type": "text",
                                            "content": " . display 1{% elif condition2 "
                                        },
                                        {
                                            "bbox": [
                                                88,
                                                423,
                                                257,
                                                508
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\}"
                                        },
                                        {
                                            "bbox": [
                                                88,
                                                423,
                                                257,
                                                508
                                            ],
                                            "type": "text",
                                            "content": " . display 2{% else "
                                        },
                                        {
                                            "bbox": [
                                                88,
                                                423,
                                                257,
                                                508
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\}"
                                        },
                                        {
                                            "bbox": [
                                                88,
                                                423,
                                                257,
                                                508
                                            ],
                                            "type": "text",
                                            "content": " display 3{%endif "
                                        },
                                        {
                                            "bbox": [
                                                88,
                                                423,
                                                257,
                                                508
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\}"
                                        }
                                    ]
                                }
                            ],
                            "index": 15,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 15,
                    "sub_type": "algorithm"
                },
                {
                    "bbox": [
                        87,
                        523,
                        236,
                        533
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                523,
                                236,
                                533
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        523,
                                        236,
                                        533
                                    ],
                                    "type": "text",
                                    "content": "根据条件判断是否输出。if/else 支持嵌套。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        538,
                        434,
                        550
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 17,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                538,
                                437,
                                550
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        539,
                                        100,
                                        549
                                    ],
                                    "type": "inline_equation",
                                    "content": "\\{ \\%",
                                    "score": 0.61
                                },
                                {
                                    "bbox": [
                                        100,
                                        538,
                                        437,
                                        550
                                    ],
                                    "type": "text",
                                    "content": "if %} 标签接受 and ， or 或者 not 关键字来对多个变量做判断 ，或者对变量取反（ not )，例如：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        88,
                        561,
                        310,
                        598
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                88,
                                561,
                                310,
                                598
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        561,
                                        310,
                                        598
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                561,
                                                310,
                                                598
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\{\\%"
                                        },
                                        {
                                            "bbox": [
                                                88,
                                                561,
                                                310,
                                                598
                                            ],
                                            "type": "text",
                                            "content": " if athlete_list and coach_list "
                                        },
                                        {
                                            "bbox": [
                                                88,
                                                561,
                                                310,
                                                598
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\}"
                                        },
                                        {
                                            "bbox": [
                                                88,
                                                561,
                                                310,
                                                598
                                            ],
                                            "type": "text",
                                            "content": " athletes和coaches变量都是可用的。 "
                                        },
                                        {
                                            "bbox": [
                                                88,
                                                561,
                                                310,
                                                598
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\{\\%"
                                        },
                                        {
                                            "bbox": [
                                                88,
                                                561,
                                                310,
                                                598
                                            ],
                                            "type": "text",
                                            "content": "endif "
                                        },
                                        {
                                            "bbox": [
                                                88,
                                                561,
                                                310,
                                                598
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\}"
                                        }
                                    ]
                                }
                            ],
                            "index": 18,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 18,
                    "sub_type": "algorithm"
                },
                {
                    "bbox": [
                        87,
                        612,
                        340,
                        622
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                613,
                                341,
                                622
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        613,
                                        341,
                                        622
                                    ],
                                    "type": "text",
                                    "content": "遍历字典: 可以直接用字典.items 方法，用变量的解包分别获取键和值。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        666,
                        142,
                        682
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                85,
                                664,
                                145,
                                684
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        85,
                                        664,
                                        145,
                                        684
                                    ],
                                    "type": "text",
                                    "content": "for 标签",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        694,
                        224,
                        705
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 21,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                694,
                                225,
                                706
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        696,
                                        100,
                                        705
                                    ],
                                    "type": "inline_equation",
                                    "content": "\\{ \\%",
                                    "score": 0.59
                                },
                                {
                                    "bbox": [
                                        100,
                                        694,
                                        111,
                                        706
                                    ],
                                    "type": "text",
                                    "content": "for",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        112,
                                        695,
                                        123,
                                        705
                                    ],
                                    "type": "inline_equation",
                                    "content": "\\% \\}",
                                    "score": 0.58
                                },
                                {
                                    "bbox": [
                                        123,
                                        694,
                                        225,
                                        706
                                    ],
                                    "type": "text",
                                    "content": "允许我们在一个序列上迭代。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        710,
                        498,
                        735
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 22,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                710,
                                499,
                                721
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        710,
                                        499,
                                        721
                                    ],
                                    "type": "text",
                                    "content": "与 Python 的 for 语句的情形类似，循环语法是 for X in Y ，Y 是要迭代的序列而 X 是在每一个特定的循环中使用的变",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                724,
                                120,
                                737
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        724,
                                        120,
                                        737
                                    ],
                                    "type": "text",
                                    "content": "量名称。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        741,
                        386,
                        752
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 23,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                741,
                                387,
                                752
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        741,
                                        210,
                                        752
                                    ],
                                    "type": "text",
                                    "content": "每一次循环中，模板系统会渲染在",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        210,
                                        742,
                                        222,
                                        751
                                    ],
                                    "type": "inline_equation",
                                    "content": "6 \\%",
                                    "score": 0.75
                                },
                                {
                                    "bbox": [
                                        222,
                                        741,
                                        243,
                                        752
                                    ],
                                    "type": "text",
                                    "content": "for",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        243,
                                        742,
                                        255,
                                        751
                                    ],
                                    "type": "inline_equation",
                                    "content": "\\% 3",
                                    "score": 0.79
                                },
                                {
                                    "bbox": [
                                        255,
                                        741,
                                        265,
                                        752
                                    ],
                                    "type": "text",
                                    "content": "和",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        265,
                                        742,
                                        277,
                                        752
                                    ],
                                    "type": "inline_equation",
                                    "content": "6 \\%",
                                    "score": 0.77
                                },
                                {
                                    "bbox": [
                                        277,
                                        741,
                                        313,
                                        752
                                    ],
                                    "type": "text",
                                    "content": "endfor",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        313,
                                        742,
                                        325,
                                        751
                                    ],
                                    "type": "inline_equation",
                                    "content": "\\% 3",
                                    "score": 0.78
                                },
                                {
                                    "bbox": [
                                        326,
                                        741,
                                        387,
                                        752
                                    ],
                                    "type": "text",
                                    "content": "之间的所有内容。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [],
            "page_size": [
                595,
                841
            ],
            "page_idx": 17
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        87,
                        80,
                        361,
                        89
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                81,
                                361,
                                89
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        81,
                                        361,
                                        89
                                    ],
                                    "type": "text",
                                    "content": "例如，给定一个运动员列表 athlete_list 变量，我们可以使用下面的代码来显示这个列表：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        95,
                        139,
                        105
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                95,
                                140,
                                107
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        95,
                                        140,
                                        107
                                    ],
                                    "type": "text",
                                    "content": "{% empty %}",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        111,
                        399,
                        121
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                110,
                                401,
                                122
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        110,
                                        150,
                                        122
                                    ],
                                    "type": "text",
                                    "content": "可选的 {% empty",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        150,
                                        111,
                                        161,
                                        121
                                    ],
                                    "type": "inline_equation",
                                    "content": "\\% \\}",
                                    "score": 0.51
                                },
                                {
                                    "bbox": [
                                        162,
                                        110,
                                        401,
                                        122
                                    ],
                                    "type": "text",
                                    "content": "从句：在循环为空的时候执行（即 in 后面的参数布尔值为 False ）。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        134,
                        148,
                        151
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                86,
                                132,
                                151,
                                153
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        86,
                                        132,
                                        151,
                                        153
                                    ],
                                    "type": "text",
                                    "content": "注释标签",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        163,
                        170,
                        174
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                161,
                                173,
                                175
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        161,
                                        173,
                                        175
                                    ],
                                    "type": "text",
                                    "content": "Django 注释使用 {# #}。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        186,
                        160,
                        197
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                186,
                                161,
                                198
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        186,
                                        161,
                                        198
                                    ],
                                    "type": "text",
                                    "content": "{# 这是一个注释 #}",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        216,
                        174,
                        234
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                86,
                                215,
                                176,
                                235
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        86,
                                        215,
                                        176,
                                        235
                                    ],
                                    "type": "text",
                                    "content": "include 标签",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        245,
                        289,
                        256
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                245,
                                289,
                                257
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        245,
                                        289,
                                        257
                                    ],
                                    "type": "text",
                                    "content": "{% include %} 标签允许在模板中包含其它的模板的内容。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        261,
                        223,
                        271
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                260,
                                224,
                                272
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        260,
                                        224,
                                        272
                                    ],
                                    "type": "text",
                                    "content": "下面这个例子都包含了 nav.html 模板：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        285,
                        198,
                        296
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                285,
                                198,
                                296
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        285,
                                        198,
                                        296
                                    ],
                                    "type": "text",
                                    "content": "{% include \"nav.html\" %}",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        314,
                        183,
                        333
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                85,
                                312,
                                187,
                                335
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        85,
                                        312,
                                        187,
                                        335
                                    ],
                                    "type": "text",
                                    "content": "csrf_token",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        343,
                        287,
                        353
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                343,
                                288,
                                353
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        343,
                                        288,
                                        353
                                    ],
                                    "type": "text",
                                    "content": "csrf_token 用于form表单中，作用是跨站请求伪造保护。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        358,
                        407,
                        368
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                358,
                                408,
                                370
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        358,
                                        122,
                                        369
                                    ],
                                    "type": "text",
                                    "content": "如果不用",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        122,
                                        359,
                                        134,
                                        369
                                    ],
                                    "type": "inline_equation",
                                    "content": "\\{ \\%",
                                    "score": 0.67
                                },
                                {
                                    "bbox": [
                                        135,
                                        358,
                                        176,
                                        369
                                    ],
                                    "type": "text",
                                    "content": "csrf_token",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        177,
                                        359,
                                        189,
                                        370
                                    ],
                                    "type": "inline_equation",
                                    "content": "\\% \\}",
                                    "score": 0.71
                                },
                                {
                                    "bbox": [
                                        190,
                                        358,
                                        408,
                                        369
                                    ],
                                    "type": "text",
                                    "content": "标签，在用 form 表单时，要再次跳转页面会报403 权限错误。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        374,
                        324,
                        384
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                373,
                                326,
                                385
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        373,
                                        326,
                                        385
                                    ],
                                    "type": "text",
                                    "content": "用了{% csrf_token %} 标签，在 form 表单提交数据时，才会成功。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        89,
                        394,
                        257,
                        415
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                392,
                                258,
                                417
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        392,
                                        258,
                                        417
                                    ],
                                    "type": "text",
                                    "content": "自定义标签和过滤器",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        423,
                        423,
                        449
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 17,
                    "blocks": [
                        {
                            "bbox": [
                                87,
                                423,
                                423,
                                433
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 15,
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        422,
                                        424,
                                        435
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                422,
                                                424,
                                                435
                                            ],
                                            "type": "text",
                                            "content": "1、在应用目录下创建 templatetags 目录(与 templates 目录同级，目录名只能是 templatetags)",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                87,
                                439,
                                249,
                                449
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 16,
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        439,
                                        251,
                                        450
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                439,
                                                143,
                                                450
                                            ],
                                            "type": "text",
                                            "content": "4、利用装饰器",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                143,
                                                439,
                                                152,
                                                449
                                            ],
                                            "type": "inline_equation",
                                            "content": "@",
                                            "score": 0.66
                                        },
                                        {
                                            "bbox": [
                                                152,
                                                439,
                                                251,
                                                450
                                            ],
                                            "type": "text",
                                            "content": "register.filter 自定义过滤器。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        87,
                        454,
                        221,
                        464
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                454,
                                222,
                                465
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        454,
                                        222,
                                        465
                                    ],
                                    "type": "text",
                                    "content": "注意：装饰器的参数最多只能有 2 个。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        470,
                        249,
                        480
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                469,
                                251,
                                481
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        469,
                                        251,
                                        481
                                    ],
                                    "type": "text",
                                    "content": "4、利用装饰器 @register.filter 自定义过滤器。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        485,
                        221,
                        495
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                485,
                                222,
                                496
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        485,
                                        222,
                                        496
                                    ],
                                    "type": "text",
                                    "content": "注意：装饰器的参数最多只能有 2 个。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        508,
                        260,
                        520
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 21,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                508,
                                262,
                                521
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        508,
                                        262,
                                        521
                                    ],
                                    "type": "text",
                                    "content": "@register.filterdef my_filter(v1, v2):",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        106,
                        534,
                        171,
                        543
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 22,
                    "lines": [
                        {
                            "bbox": [
                                105,
                                533,
                                173,
                                544
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        105,
                                        533,
                                        173,
                                        544
                                    ],
                                    "type": "text",
                                    "content": "return v1 * v2",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        559,
                        265,
                        570
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 23,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                559,
                                266,
                                571
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        559,
                                        266,
                                        571
                                    ],
                                    "type": "text",
                                    "content": "5、利用装饰器 @register.simple_tag 自定义标签。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        579,
                        201,
                        599
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 24,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                578,
                                203,
                                602
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        578,
                                        203,
                                        602
                                    ],
                                    "type": "text",
                                    "content": "配置静态文件",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        608,
                        220,
                        618
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 25,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                608,
                                221,
                                618
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        608,
                                        221,
                                        618
                                    ],
                                    "type": "text",
                                    "content": "1、在项目根目录下创建 statics 目录。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "image",
                    "bbox": [
                        88,
                        620,
                        217,
                        729
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                88,
                                620,
                                217,
                                729
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        620,
                                        217,
                                        729
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                620,
                                                217,
                                                729
                                            ],
                                            "type": "image",
                                            "image_path": "7a0bccfdc891cb8db6929d9ee4656cf5853f50e3339e9658e86f85cd0a8ec3cd.jpg"
                                        }
                                    ]
                                }
                            ],
                            "index": 26,
                            "angle": 0,
                            "type": "image_body"
                        }
                    ],
                    "index": 26
                },
                {
                    "bbox": [
                        87,
                        733,
                        257,
                        743
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 27,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                732,
                                258,
                                744
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        732,
                                        258,
                                        744
                                    ],
                                    "type": "text",
                                    "content": "2、在 settings 文件的最下方配置添加以下配置：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [],
            "page_size": [
                595,
                841
            ],
            "page_idx": 18
        },
        {
            "para_blocks": [
                {
                    "type": "code",
                    "bbox": [
                        88,
                        79,
                        270,
                        139
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                88,
                                79,
                                270,
                                139
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        79,
                                        270,
                                        139
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                79,
                                                270,
                                                139
                                            ],
                                            "type": "text",
                                            "content": "STATIC_url "
                                        },
                                        {
                                            "bbox": [
                                                88,
                                                79,
                                                270,
                                                139
                                            ],
                                            "type": "inline_equation",
                                            "content": "="
                                        },
                                        {
                                            "bbox": [
                                                88,
                                                79,
                                                270,
                                                139
                                            ],
                                            "type": "text",
                                            "content": " \"/static/'#别名  \nSTATICFILES_DIRS "
                                        },
                                        {
                                            "bbox": [
                                                88,
                                                79,
                                                270,
                                                139
                                            ],
                                            "type": "inline_equation",
                                            "content": "="
                                        },
                                        {
                                            "bbox": [
                                                88,
                                                79,
                                                270,
                                                139
                                            ],
                                            "type": "text",
                                            "content": " [os.path.join(Base_DIR，\"statics\")，]"
                                        }
                                    ]
                                }
                            ],
                            "index": 0,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 0,
                    "sub_type": "algorithm"
                },
                {
                    "bbox": [
                        86,
                        153,
                        492,
                        195
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 4,
                    "blocks": [
                        {
                            "bbox": [
                                86,
                                153,
                                492,
                                163
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 1,
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        153,
                                        494,
                                        165
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                153,
                                                494,
                                                165
                                            ],
                                            "type": "text",
                                            "content": "3、在 statics 目录下创建 css 目录，js 目录，images 目录，plugins 目录， 分别放 css 文件，js 文件，图片，插件。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                87,
                                169,
                                242,
                                179
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 2,
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        169,
                                        243,
                                        180
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                169,
                                                243,
                                                180
                                            ],
                                            "type": "text",
                                            "content": "4、把 bootstrap 框架放入插件目录 plugins。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                87,
                                185,
                                260,
                                195
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 3,
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        184,
                                        261,
                                        196
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                184,
                                                261,
                                                196
                                            ],
                                            "type": "text",
                                            "content": "5、在 HTML 文件的 head 标签中引入 bootstrap。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        87,
                        200,
                        354,
                        211
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                199,
                                355,
                                211
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        199,
                                        355,
                                        211
                                    ],
                                    "type": "text",
                                    "content": "注意：此时引用路径中的要用配置文件中的别名static，而不是目录 statics。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        237,
                        164,
                        258
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                87,
                                235,
                                166,
                                260
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        235,
                                        166,
                                        260
                                    ],
                                    "type": "text",
                                    "content": "模板继承",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        267,
                        269,
                        277
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                267,
                                270,
                                278
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        267,
                                        270,
                                        278
                                    ],
                                    "type": "text",
                                    "content": "模板可以用继承的方式来实现复用，减少冗余内容。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        283,
                        364,
                        293
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                284,
                                365,
                                294
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        284,
                                        365,
                                        294
                                    ],
                                    "type": "text",
                                    "content": "网页的头部和尾部内容一般都是一致的，我们就可以通过模板继承来实现复用。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        299,
                        388,
                        309
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                298,
                                390,
                                310
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        298,
                                        390,
                                        310
                                    ],
                                    "type": "text",
                                    "content": "父模板用于放置可重复利用的内容，子模板继承父模板的内容，并放置自己的内容。。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        322,
                        133,
                        338
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                86,
                                320,
                                136,
                                342
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        86,
                                        320,
                                        136,
                                        342
                                    ],
                                    "type": "text",
                                    "content": "父模板",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        350,
                        489,
                        361
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                350,
                                490,
                                361
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        350,
                                        490,
                                        361
                                    ],
                                    "type": "text",
                                    "content": "标签 block...endblock: 父模板中的预留区域，该区域留给子模板填充差异性的内容，不同预留区域名字不能相同。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        88,
                        375,
                        394,
                        386
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                88,
                                375,
                                394,
                                386
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        375,
                                        394,
                                        386
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                375,
                                                394,
                                                386
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\{\\% \\text{block} \\text{名称} \\% \\}"
                                        },
                                        {
                                            "bbox": [
                                                88,
                                                375,
                                                394,
                                                386
                                            ],
                                            "type": "text",
                                            "content": " 预留给子模板的区域，可以设置设置默认内容 "
                                        },
                                        {
                                            "bbox": [
                                                88,
                                                375,
                                                394,
                                                386
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\{\\% \\text{endblock} \\text{名称} \\% \\}"
                                        }
                                    ]
                                }
                            ],
                            "index": 12,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 12,
                    "sub_type": "algorithm"
                },
                {
                    "bbox": [
                        88,
                        404,
                        133,
                        421
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                87,
                                403,
                                136,
                                424
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        403,
                                        136,
                                        424
                                    ],
                                    "type": "text",
                                    "content": "子模板",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        433,
                        221,
                        444
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                433,
                                222,
                                444
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        433,
                                        222,
                                        444
                                    ],
                                    "type": "text",
                                    "content": "子模板使用标签extends 继承父模板：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        88,
                        458,
                        194,
                        468
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                88,
                                458,
                                194,
                                468
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        458,
                                        194,
                                        468
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                458,
                                                194,
                                                468
                                            ],
                                            "type": "text",
                                            "content": "% extends \"父模板路径\"%}"
                                        }
                                    ]
                                }
                            ],
                            "index": 15,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 15,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "bbox": [
                        87,
                        482,
                        476,
                        492
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                483,
                                477,
                                493
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        483,
                                        477,
                                        493
                                    ],
                                    "type": "text",
                                    "content": "子模板如果没有设置父模板预留区域的内容，则使用在父模板设置的默认内容，当然也可以都不设置，就为空。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        497,
                        213,
                        507
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 17,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                497,
                                214,
                                508
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        497,
                                        214,
                                        508
                                    ],
                                    "type": "text",
                                    "content": "子模板设置父模板预留区域的内容：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        88,
                        523,
                        267,
                        533
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                88,
                                523,
                                267,
                                533
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        523,
                                        267,
                                        533
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                523,
                                                267,
                                                533
                                            ],
                                            "type": "text",
                                            "content": "{ "
                                        },
                                        {
                                            "bbox": [
                                                88,
                                                523,
                                                267,
                                                533
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\%"
                                        },
                                        {
                                            "bbox": [
                                                88,
                                                523,
                                                267,
                                                533
                                            ],
                                            "type": "text",
                                            "content": " block名称 "
                                        },
                                        {
                                            "bbox": [
                                                88,
                                                523,
                                                267,
                                                533
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\%"
                                        },
                                        {
                                            "bbox": [
                                                88,
                                                523,
                                                267,
                                                533
                                            ],
                                            "type": "text",
                                            "content": " }内容{ "
                                        },
                                        {
                                            "bbox": [
                                                88,
                                                523,
                                                267,
                                                533
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\%"
                                        },
                                        {
                                            "bbox": [
                                                88,
                                                523,
                                                267,
                                                533
                                            ],
                                            "type": "text",
                                            "content": " endblock名称 "
                                        },
                                        {
                                            "bbox": [
                                                88,
                                                523,
                                                267,
                                                533
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\%"
                                        },
                                        {
                                            "bbox": [
                                                88,
                                                523,
                                                267,
                                                533
                                            ],
                                            "type": "text",
                                            "content": " }"
                                        }
                                    ]
                                }
                            ],
                            "index": 18,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 18,
                    "sub_type": "algorithm"
                },
                {
                    "bbox": [
                        87,
                        547,
                        196,
                        557
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                547,
                                198,
                                558
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        547,
                                        198,
                                        558
                                    ],
                                    "type": "text",
                                    "content": "Django 模型使用自带的 ORM。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        565,
                        502,
                        591
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                565,
                                503,
                                576
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        565,
                                        503,
                                        576
                                    ],
                                    "type": "text",
                                    "content": "对象关系映射（Object Relational Mapping，简称ORM ）用于实现面向对象编程语言里不同类型系统的数据之间的转",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                578,
                                104,
                                593
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        86,
                                        578,
                                        104,
                                        593
                                    ],
                                    "type": "text",
                                    "content": "换。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        598,
                        282,
                        608
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 21,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                599,
                                283,
                                609
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        599,
                                        283,
                                        609
                                    ],
                                    "type": "text",
                                    "content": "ORM 在业务逻辑层和数据库层之间充当了桥梁的作用。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        616,
                        433,
                        627
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 22,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                618,
                                434,
                                627
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        618,
                                        434,
                                        627
                                    ],
                                    "type": "text",
                                    "content": "ORM 是通过使用描述对象和数据库之间的映射的元数据，将程序中的对象自动持久化到数据库中。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        650,
                        145,
                        661
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 23,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                649,
                                146,
                                661
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        649,
                                        146,
                                        661
                                    ],
                                    "type": "text",
                                    "content": "ORM 解析过程:",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        80,
                        666,
                        252,
                        728
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 27,
                    "blocks": [
                        {
                            "bbox": [
                                80,
                                666,
                                240,
                                676
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 24,
                            "lines": [
                                {
                                    "bbox": [
                                        80,
                                        665,
                                        241,
                                        677
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                80,
                                                665,
                                                241,
                                                677
                                            ],
                                            "type": "text",
                                            "content": "1、ORM 会将 Python 代码转成为 SQL 语句。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                80,
                                692,
                                252,
                                702
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 25,
                            "lines": [
                                {
                                    "bbox": [
                                        80,
                                        692,
                                        254,
                                        703
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                80,
                                                692,
                                                254,
                                                703
                                            ],
                                            "type": "text",
                                            "content": "2、SQL 语句通过 pymysql 传送到数据库服务端。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                80,
                                718,
                                238,
                                728
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 26,
                            "lines": [
                                {
                                    "bbox": [
                                        81,
                                        719,
                                        238,
                                        729
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                81,
                                                719,
                                                238,
                                                729
                                            ],
                                            "type": "text",
                                            "content": "3、在数据库中执行 SQL 语句并将结果返回。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                }
            ],
            "discarded_blocks": [],
            "page_size": [
                595,
                841
            ],
            "page_idx": 19
        },
        {
            "para_blocks": [
                {
                    "type": "image",
                    "bbox": [
                        94,
                        77,
                        573,
                        184
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                94,
                                77,
                                573,
                                184
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        94,
                                        77,
                                        573,
                                        184
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                94,
                                                77,
                                                573,
                                                184
                                            ],
                                            "type": "image",
                                            "image_path": "89ff050f91c03b4570c077c1d5a0b35eba5235ff5bcb76f7b6a8328a7ce6d1c7.jpg"
                                        }
                                    ]
                                }
                            ],
                            "index": 0,
                            "angle": 0,
                            "type": "image_body"
                        }
                    ],
                    "index": 0
                },
                {
                    "bbox": [
                        88,
                        200,
                        153,
                        210
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                200,
                                153,
                                211
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        200,
                                        153,
                                        211
                                    ],
                                    "type": "text",
                                    "content": "ORM 对应关系表：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "image",
                    "bbox": [
                        115,
                        247,
                        472,
                        417
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                115,
                                247,
                                472,
                                417
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        115,
                                        247,
                                        472,
                                        417
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                115,
                                                247,
                                                472,
                                                417
                                            ],
                                            "type": "image",
                                            "image_path": "e3b1faa6363d2686aa3e435194c96d28a466d037563692d969fb0f4eb9f90257.jpg"
                                        }
                                    ]
                                }
                            ],
                            "index": 2,
                            "angle": 0,
                            "type": "image_body"
                        }
                    ],
                    "index": 2
                },
                {
                    "bbox": [
                        88,
                        470,
                        130,
                        480
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                470,
                                130,
                                481
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        470,
                                        130,
                                        481
                                    ],
                                    "type": "text",
                                    "content": "数据库配置",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        496,
                        261,
                        507
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                497,
                                260,
                                506
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        497,
                                        260,
                                        506
                                    ],
                                    "type": "text",
                                    "content": "ORM 无法操作到数据库级别，只能操作到数据表",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        548,
                        348,
                        559
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                548,
                                349,
                                560
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        548,
                                        349,
                                        560
                                    ],
                                    "type": "text",
                                    "content": "我们在项目的 settings.py 文件中找到 DATABASES 配置项，将其信息修改为：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        574,
                        247,
                        585
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                575,
                                248,
                                586
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        575,
                                        248,
                                        586
                                    ],
                                    "type": "text",
                                    "content": "HelloWorld/HelloWorld/settings.py: 文件代码：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        600,
                        505,
                        643
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                600,
                                506,
                                611
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        600,
                                        127,
                                        611
                                    ],
                                    "type": "text",
                                    "content": "DATABASES",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        127,
                                        602,
                                        135,
                                        609
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.54
                                },
                                {
                                    "bbox": [
                                        135,
                                        600,
                                        506,
                                        611
                                    ],
                                    "type": "text",
                                    "content": "{ 'default': { 'ENGINE': 'django.db.backends.mysql', # 数 据 库 引 擎 'NAME': 'runoob', # 数 据 库 名 称 'HOST':",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                615,
                                506,
                                628
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        615,
                                        506,
                                        628
                                    ],
                                    "type": "text",
                                    "content": "'127.0.0.1', # 数据库地址，本机 ip 地址 127.0.0.1 'PORT': 3306, # 端口 'USER': 'root', # 数据库用户名 'PASSWORD': '123456',",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                629,
                                146,
                                644
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        629,
                                        146,
                                        644
                                    ],
                                    "type": "text",
                                    "content": "# 数据库密码 } }",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        657,
                        505,
                        683
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                658,
                                505,
                                669
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        658,
                                        505,
                                        669
                                    ],
                                    "type": "text",
                                    "content": "上面包含数据库名称和用户的信息，它们与 MySQL 中对应数据库和用户的设置相同。Django 根据这一设置，与 MySQL",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                674,
                                205,
                                683
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        674,
                                        205,
                                        683
                                    ],
                                    "type": "text",
                                    "content": "中相应的数据库和用户连接起来。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        699,
                        292,
                        710
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                698,
                                294,
                                711
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        698,
                                        294,
                                        711
                                    ],
                                    "type": "text",
                                    "content": "接下来，告诉 Django 使用 pymysql 模块连接 mysql 数据库：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        725,
                        107,
                        735
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                724,
                                107,
                                738
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        724,
                                        107,
                                        738
                                    ],
                                    "type": "text",
                                    "content": "实例",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [],
            "page_size": [
                595,
                841
            ],
            "page_idx": 20
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        86,
                        79,
                        318,
                        92
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                79,
                                318,
                                91
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        79,
                                        318,
                                        91
                                    ],
                                    "type": "text",
                                    "content": "# 在与 settings.py 同级目录下的 __init__.py 中引入模块和进行配置",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        95,
                        142,
                        105
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                94,
                                143,
                                108
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        94,
                                        143,
                                        108
                                    ],
                                    "type": "text",
                                    "content": "import pymysql",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        111,
                        189,
                        121
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                111,
                                190,
                                122
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        111,
                                        190,
                                        122
                                    ],
                                    "type": "text",
                                    "content": "pymysql.install_as_MySQLdb()",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        184,
                        164,
                        205
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                86,
                                182,
                                167,
                                208
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        86,
                                        182,
                                        167,
                                        208
                                    ],
                                    "type": "text",
                                    "content": "定义模型",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        220,
                        152,
                        236
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                85,
                                216,
                                155,
                                238
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        85,
                                        216,
                                        155,
                                        238
                                    ],
                                    "type": "text",
                                    "content": "创建 APP",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        248,
                        447,
                        259
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                247,
                                449,
                                261
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        247,
                                        449,
                                        261
                                    ],
                                    "type": "text",
                                    "content": "Django 规定，如果要使用模型，必须要创建一个 app。我们使用以下命令创建一个 TestModel 的 app:",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        87,
                        272,
                        230,
                        283
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                87,
                                272,
                                230,
                                283
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        87,
                                        272,
                                        230,
                                        283
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                87,
                                                272,
                                                230,
                                                283
                                            ],
                                            "type": "text",
                                            "content": "django-admin startapp TestModel"
                                        }
                                    ]
                                }
                            ],
                            "index": 6,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 6,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "type": "code",
                    "bbox": [
                        87,
                        297,
                        420,
                        323
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                87,
                                297,
                                420,
                                323
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        87,
                                        297,
                                        420,
                                        323
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                87,
                                                297,
                                                420,
                                                323
                                            ],
                                            "type": "text",
                                            "content": "# models.py from django.db import models class Test(model.Model): name = models.CharField(max_length=20)"
                                        }
                                    ]
                                }
                            ],
                            "index": 7,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 7,
                    "sub_type": "code",
                    "guess_lang": "python"
                },
                {
                    "bbox": [
                        86,
                        328,
                        494,
                        356
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                329,
                                495,
                                340
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        329,
                                        495,
                                        340
                                    ],
                                    "type": "text",
                                    "content": "以上的类名代表了数据库表名，且继承了models.Model，类里面的字段代表数据表中的字段(name)，数据类型则由",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                343,
                                413,
                                356
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        343,
                                        413,
                                        356
                                    ],
                                    "type": "text",
                                    "content": "CharField（相当于 varchar）、DateField（相当于 datetime）， max_length 参数限定长度。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        360,
                        149,
                        370
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                360,
                                151,
                                371
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        360,
                                        151,
                                        371
                                    ],
                                    "type": "text",
                                    "content": "在命令行中运行：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        87,
                        385,
                        273,
                        395
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                87,
                                385,
                                273,
                                395
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        87,
                                        385,
                                        273,
                                        395
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                87,
                                                385,
                                                273,
                                                395
                                            ],
                                            "type": "text",
                                            "content": "$ python3 manage.py migrate # 创建表结构"
                                        }
                                    ]
                                }
                            ],
                            "index": 10,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 10,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "type": "code",
                    "bbox": [
                        87,
                        409,
                        462,
                        420
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                87,
                                409,
                                462,
                                420
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        87,
                                        409,
                                        462,
                                        420
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                87,
                                                409,
                                                462,
                                                420
                                            ],
                                            "type": "text",
                                            "content": "$ python3 manage.py makemigrations TestModel # 让 Django 知道我们在我们的模型有一些变更"
                                        }
                                    ]
                                }
                            ],
                            "index": 11,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 11,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "type": "code",
                    "bbox": [
                        87,
                        434,
                        317,
                        445
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                87,
                                434,
                                317,
                                445
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        87,
                                        434,
                                        317,
                                        445
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                87,
                                                434,
                                                317,
                                                445
                                            ],
                                            "type": "text",
                                            "content": "$ python3 manage.py migrate TestModel # 创建表结构"
                                        }
                                    ]
                                }
                            ],
                            "index": 12,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 12,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "bbox": [
                        86,
                        457,
                        362,
                        470
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                458,
                                363,
                                471
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        458,
                                        363,
                                        471
                                    ],
                                    "type": "text",
                                    "content": "看到几行 \"Creating table…\" 的字样，你的数据表就创建好了。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        474,
                        164,
                        485
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                473,
                                165,
                                486
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        473,
                                        165,
                                        486
                                    ],
                                    "type": "text",
                                    "content": "Creating tables ...",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        493,
                        105,
                        500
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 15,
                    "lines": []
                },
                {
                    "bbox": [
                        86,
                        505,
                        301,
                        517
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                504,
                                302,
                                518
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        504,
                                        302,
                                        518
                                    ],
                                    "type": "text",
                                    "content": "Creating table TestModel_test #我们自定义的表",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        525,
                        105,
                        531
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 17,
                    "lines": []
                },
                {
                    "bbox": [
                        86,
                        535,
                        343,
                        549
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                534,
                                346,
                                550
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        534,
                                        346,
                                        550
                                    ],
                                    "type": "text",
                                    "content": "表名组成结构为：应用名_类名（如：TestModel_test）。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        550,
                        492,
                        564
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                550,
                                493,
                                565
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        550,
                                        493,
                                        565
                                    ],
                                    "type": "text",
                                    "content": "注意：尽管我们没有在 models 给表设置主键，但是 Django 会自动添加一个 id 作为主键。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        566,
                        132,
                        579
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                566,
                                133,
                                581
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        566,
                                        133,
                                        581
                                    ],
                                    "type": "text",
                                    "content": "添加数据",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        582,
                        433,
                        595
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 21,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                582,
                                435,
                                596
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        582,
                                        435,
                                        596
                                    ],
                                    "type": "text",
                                    "content": "添加数据需要先创建对象，然后再执行 save 函数，相当于SQL中的INSERT：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        87,
                        597,
                        179,
                        609
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                87,
                                597,
                                179,
                                609
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        87,
                                        597,
                                        179,
                                        609
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                87,
                                                597,
                                                179,
                                                609
                                            ],
                                            "type": "text",
                                            "content": "- - coding: utf-8 -"
                                        }
                                    ]
                                }
                            ],
                            "index": 22,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 22,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "type": "code",
                    "bbox": [
                        87,
                        629,
                        255,
                        641
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                87,
                                629,
                                255,
                                641
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        87,
                                        629,
                                        255,
                                        641
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                87,
                                                629,
                                                255,
                                                641
                                            ],
                                            "type": "text",
                                            "content": "from django.http import HttpResponse"
                                        }
                                    ]
                                }
                            ],
                            "index": 23,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 23,
                    "sub_type": "code",
                    "guess_lang": "python"
                },
                {
                    "type": "code",
                    "bbox": [
                        87,
                        661,
                        242,
                        672
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                87,
                                661,
                                242,
                                672
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        87,
                                        661,
                                        242,
                                        672
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                87,
                                                661,
                                                242,
                                                672
                                            ],
                                            "type": "text",
                                            "content": "from TestModel.models import Test"
                                        }
                                    ]
                                }
                            ],
                            "index": 24,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 24,
                    "sub_type": "code",
                    "guess_lang": "python"
                },
                {
                    "bbox": [
                        87,
                        692,
                        150,
                        704
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 25,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                692,
                                151,
                                704
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        692,
                                        151,
                                        704
                                    ],
                                    "type": "text",
                                    "content": "# 数据库操作",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        87,
                        708,
                        174,
                        719
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                87,
                                708,
                                174,
                                719
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        87,
                                        708,
                                        174,
                                        719
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                87,
                                                708,
                                                174,
                                                719
                                            ],
                                            "type": "text",
                                            "content": "def testdb(request):"
                                        }
                                    ]
                                }
                            ],
                            "index": 26,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 26,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "type": "code",
                    "bbox": [
                        96,
                        723,
                        218,
                        735
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                96,
                                723,
                                218,
                                735
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        96,
                                        723,
                                        218,
                                        735
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                96,
                                                723,
                                                218,
                                                735
                                            ],
                                            "type": "text",
                                            "content": "test1 = Test(name='runoob')"
                                        }
                                    ]
                                }
                            ],
                            "index": 27,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 27,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "type": "code",
                    "bbox": [
                        97,
                        738,
                        148,
                        750
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                97,
                                738,
                                148,
                                750
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        97,
                                        738,
                                        148,
                                        750
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                97,
                                                738,
                                                148,
                                                750
                                            ],
                                            "type": "text",
                                            "content": "test1.save()"
                                        }
                                    ]
                                }
                            ],
                            "index": 28,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 28,
                    "sub_type": "code",
                    "guess_lang": "txt"
                }
            ],
            "discarded_blocks": [],
            "page_size": [
                595,
                841
            ],
            "page_idx": 21
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        98,
                        79,
                        312,
                        92
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                97,
                                79,
                                314,
                                93
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        97,
                                        79,
                                        314,
                                        93
                                    ],
                                    "type": "text",
                                    "content": "return HttpResponse(\"<p>数据添加成功！</p>\")",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        89,
                        95,
                        132,
                        107
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                95,
                                133,
                                109
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        95,
                                        133,
                                        109
                                    ],
                                    "type": "text",
                                    "content": "更新数据",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        110,
                        255,
                        122
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                109,
                                257,
                                125
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        109,
                                        257,
                                        125
                                    ],
                                    "type": "text",
                                    "content": "修改数据可以使用 save() 或 update():",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        88,
                        126,
                        179,
                        137
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                88,
                                126,
                                179,
                                137
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        126,
                                        179,
                                        137
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                126,
                                                179,
                                                137
                                            ],
                                            "type": "text",
                                            "content": "- -coding: utf-8 -"
                                        }
                                    ]
                                }
                            ],
                            "index": 3,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 3,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "type": "code",
                    "bbox": [
                        88,
                        157,
                        255,
                        169
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                88,
                                157,
                                255,
                                169
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        157,
                                        255,
                                        169
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                157,
                                                255,
                                                169
                                            ],
                                            "type": "text",
                                            "content": "from django.http import HttpResponse"
                                        }
                                    ]
                                }
                            ],
                            "index": 4,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 4,
                    "sub_type": "code",
                    "guess_lang": "python"
                },
                {
                    "type": "code",
                    "bbox": [
                        88,
                        188,
                        242,
                        200
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                88,
                                188,
                                242,
                                200
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        188,
                                        242,
                                        200
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                188,
                                                242,
                                                200
                                            ],
                                            "type": "text",
                                            "content": "from TestModel.models import Test"
                                        }
                                    ]
                                }
                            ],
                            "index": 5,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 5,
                    "sub_type": "code",
                    "guess_lang": "python"
                },
                {
                    "type": "code",
                    "bbox": [
                        88,
                        235,
                        174,
                        247
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                88,
                                219,
                                150,
                                232
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        220,
                                        151,
                                        232
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                220,
                                                151,
                                                232
                                            ],
                                            "type": "text",
                                            "content": "# 数据库操作",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ],
                            "index": 6,
                            "angle": 0,
                            "type": "code_caption"
                        },
                        {
                            "bbox": [
                                88,
                                235,
                                174,
                                247
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        235,
                                        174,
                                        247
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                235,
                                                174,
                                                247
                                            ],
                                            "type": "text",
                                            "content": "def testdb(request):"
                                        }
                                    ]
                                }
                            ],
                            "index": 7,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 7,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "bbox": [
                        97,
                        250,
                        414,
                        263
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                96,
                                250,
                                415,
                                264
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        96,
                                        250,
                                        170,
                                        264
                                    ],
                                    "type": "text",
                                    "content": "# 修改其中一个",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        170,
                                        251,
                                        191,
                                        263
                                    ],
                                    "type": "inline_equation",
                                    "content": "\\mathrm { i } { \\mathsf { d } } { = } 1",
                                    "score": 0.86
                                },
                                {
                                    "bbox": [
                                        191,
                                        250,
                                        415,
                                        264
                                    ],
                                    "type": "text",
                                    "content": "的 name 字段，再 save，相当于 SQL 中的 UPDATE",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        97,
                        266,
                        221,
                        278
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                97,
                                266,
                                221,
                                278
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        97,
                                        266,
                                        221,
                                        278
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                97,
                                                266,
                                                221,
                                                278
                                            ],
                                            "type": "text",
                                            "content": "test1 = Test.objects.get(id=1)"
                                        }
                                    ]
                                }
                            ],
                            "index": 9,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 9,
                    "sub_type": "code",
                    "guess_lang": "python"
                },
                {
                    "type": "code",
                    "bbox": [
                        98,
                        282,
                        192,
                        293
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                98,
                                282,
                                192,
                                293
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        98,
                                        282,
                                        192,
                                        293
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                98,
                                                282,
                                                192,
                                                293
                                            ],
                                            "type": "text",
                                            "content": "test1.name = 'Google'"
                                        }
                                    ]
                                }
                            ],
                            "index": 10,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 10,
                    "sub_type": "code",
                    "guess_lang": "python"
                },
                {
                    "type": "code",
                    "bbox": [
                        98,
                        298,
                        148,
                        309
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                98,
                                298,
                                148,
                                309
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        98,
                                        298,
                                        148,
                                        309
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                98,
                                                298,
                                                148,
                                                309
                                            ],
                                            "type": "text",
                                            "content": "test1.save()"
                                        }
                                    ]
                                }
                            ],
                            "index": 11,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 11,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "type": "code",
                    "bbox": [
                        98,
                        328,
                        170,
                        341
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                98,
                                328,
                                170,
                                341
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        98,
                                        328,
                                        170,
                                        341
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                98,
                                                328,
                                                170,
                                                341
                                            ],
                                            "type": "text",
                                            "content": "# 另外一种方式"
                                        }
                                    ]
                                }
                            ],
                            "index": 12,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 12,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "type": "code",
                    "bbox": [
                        98,
                        343,
                        305,
                        356
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                98,
                                343,
                                305,
                                356
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        98,
                                        343,
                                        305,
                                        356
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                98,
                                                343,
                                                305,
                                                356
                                            ],
                                            "type": "text",
                                            "content": "Test.objects.filter(id=1).update(name='Google')"
                                        }
                                    ]
                                }
                            ],
                            "index": 13,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 13,
                    "sub_type": "code",
                    "guess_lang": "python"
                },
                {
                    "type": "code",
                    "bbox": [
                        98,
                        375,
                        170,
                        387
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                98,
                                375,
                                170,
                                387
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        98,
                                        375,
                                        170,
                                        387
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                98,
                                                375,
                                                170,
                                                387
                                            ],
                                            "type": "text",
                                            "content": "修改所有的列"
                                        }
                                    ]
                                }
                            ],
                            "index": 14,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 14,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "type": "code",
                    "bbox": [
                        98,
                        391,
                        279,
                        403
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                98,
                                391,
                                279,
                                403
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        98,
                                        391,
                                        279,
                                        403
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                98,
                                                391,
                                                279,
                                                403
                                            ],
                                            "type": "text",
                                            "content": "Test.objects.all().update(name='Google')"
                                        }
                                    ]
                                }
                            ],
                            "index": 15,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 15,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "type": "code",
                    "bbox": [
                        98,
                        422,
                        280,
                        435
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                98,
                                422,
                                280,
                                435
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        98,
                                        422,
                                        280,
                                        435
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                98,
                                                422,
                                                280,
                                                435
                                            ],
                                            "type": "text",
                                            "content": "return HttpResponse(\"/<p>修改成功</p>\")"
                                        }
                                    ]
                                }
                            ],
                            "index": 16,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 16,
                    "sub_type": "code",
                    "guess_lang": "lua"
                },
                {
                    "bbox": [
                        88,
                        438,
                        132,
                        449
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 17,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                437,
                                133,
                                451
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        437,
                                        133,
                                        451
                                    ],
                                    "type": "text",
                                    "content": "删除数据",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        453,
                        350,
                        465
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                454,
                                351,
                                466
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        454,
                                        351,
                                        466
                                    ],
                                    "type": "text",
                                    "content": "删除数据库中的对象只需调用该对象的delete()方法即可：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        495,
                        214,
                        521
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                86,
                                493,
                                217,
                                523
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        86,
                                        493,
                                        217,
                                        523
                                    ],
                                    "type": "text",
                                    "content": "Django 表单",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        537,
                        434,
                        549
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                538,
                                436,
                                548
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        538,
                                        436,
                                        548
                                    ],
                                    "type": "text",
                                    "content": "HTML表单是网站交互性的经典方式。 本章将介绍如何用Django对用户提交的表单数据进行处理。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        558,
                        180,
                        578
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 21,
                    "lines": [
                        {
                            "bbox": [
                                85,
                                556,
                                184,
                                581
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        85,
                                        556,
                                        184,
                                        581
                                    ],
                                    "type": "text",
                                    "content": "HTTP 请求",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        587,
                        502,
                        613
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 22,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                588,
                                502,
                                597
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        588,
                                        502,
                                        597
                                    ],
                                    "type": "text",
                                    "content": "HTTP协议以\"请求－回复\"的方式工作。客户发送请求时，可以在请求中附加数据。服务器通过解析请求，就可以获得",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                602,
                                265,
                                613
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        602,
                                        265,
                                        613
                                    ],
                                    "type": "text",
                                    "content": "客户传来的数据，并根据URL来提供特定的服务。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        628,
                        153,
                        644
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 23,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                626,
                                155,
                                646
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        626,
                                        155,
                                        646
                                    ],
                                    "type": "text",
                                    "content": "GET 方法",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        657,
                        279,
                        670
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 24,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                659,
                                279,
                                671
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        659,
                                        279,
                                        671
                                    ],
                                    "type": "text",
                                    "content": "用户提交了表单，服务器解析表单并回复",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        674,
                        332,
                        685
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 25,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                674,
                                333,
                                686
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        674,
                                        333,
                                        686
                                    ],
                                    "type": "text",
                                    "content": "我们在之前的项目中创建一个 search.py 文件，用于接收用户的请求：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        88,
                        692,
                        225,
                        703
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                88,
                                692,
                                225,
                                703
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        692,
                                        225,
                                        703
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                692,
                                                225,
                                                703
                                            ],
                                            "type": "text",
                                            "content": "from django.http import HttpResponse"
                                        }
                                    ]
                                }
                            ],
                            "index": 26,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 26,
                    "sub_type": "code",
                    "guess_lang": "python"
                },
                {
                    "type": "code",
                    "bbox": [
                        88,
                        711,
                        217,
                        720
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                88,
                                711,
                                217,
                                720
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        711,
                                        217,
                                        720
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                711,
                                                217,
                                                720
                                            ],
                                            "type": "text",
                                            "content": "from django.shortcuts import render"
                                        }
                                    ]
                                }
                            ],
                            "index": 27,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 27,
                    "sub_type": "code",
                    "guess_lang": "python"
                },
                {
                    "type": "code",
                    "bbox": [
                        88,
                        729,
                        113,
                        737
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                88,
                                729,
                                113,
                                737
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        729,
                                        113,
                                        737
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                729,
                                                113,
                                                737
                                            ],
                                            "type": "text",
                                            "content": "#表单"
                                        }
                                    ]
                                }
                            ],
                            "index": 28,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 28,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "type": "code",
                    "bbox": [
                        88,
                        746,
                        181,
                        756
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                88,
                                746,
                                181,
                                756
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        746,
                                        181,
                                        756
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                746,
                                                181,
                                                756
                                            ],
                                            "type": "text",
                                            "content": "def search_form(request):"
                                        }
                                    ]
                                }
                            ],
                            "index": 29,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 29,
                    "sub_type": "code",
                    "guess_lang": "txt"
                }
            ],
            "discarded_blocks": [],
            "page_size": [
                595,
                841
            ],
            "page_idx": 22
        },
        {
            "para_blocks": [
                {
                    "type": "code",
                    "bbox": [
                        88,
                        77,
                        279,
                        722
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                88,
                                77,
                                279,
                                722
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        77,
                                        279,
                                        722
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                77,
                                                279,
                                                722
                                            ],
                                            "type": "text",
                                            "content": "return render(request, 'search_form.html')  \n#接收请求数据  \ndef search(request):  \n    request_encoding='utf-8'  \n    if 'q' in request.GET and request.GET['q']:  \n        message = '你搜索的内容为: ' + request.GET['q']  \n    else:  \n        message = '你提交了空表单'  \n    return HttpResponse(message)  \n在模板目录templates中添加search_form.html表单：  \n/HelloWorld/template/search_form.html文件代码：  \n<!DOCTYPE html>  \n<html>  \n<head>  \n<meta charset=\"utf-8\">  \n<title>菜鸟教程(runob.com)</title>  \n</head>  \n<body>  \n<form action=\"/search/\" method=\"get\">  \n    <input type=\"text\" name=\"q\">  \n    <input type=\"submit\" value=\"搜索\">  \n</form>  \n</body>  \n</html>  \nurls.py规则修改为如下形式：  \n/HelloWorld/HelloWorld URLs.py文件代码：  \nfrom django.conf.urls import url  \nfrom . import views,testdb,search  \nurlpatterns = [url(r'^hello/$', views.runoob),url(r'^testdb/$', testdb.testdb),url(r'^search-form/$', search.search_form),url(r'^search/$', search.search),]"
                                        }
                                    ]
                                }
                            ],
                            "index": 0,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 0,
                    "sub_type": "code",
                    "guess_lang": "python"
                },
                {
                    "bbox": [
                        88,
                        735,
                        157,
                        752
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                86,
                                733,
                                158,
                                752
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        86,
                                        733,
                                        158,
                                        752
                                    ],
                                    "type": "text",
                                    "content": "POST 方法",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [],
            "page_size": [
                595,
                841
            ],
            "page_idx": 23
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        87,
                        80,
                        299,
                        89
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                81,
                                299,
                                89
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        81,
                                        299,
                                        89
                                    ],
                                    "type": "text",
                                    "content": "上面我们使用了GET 方法，视图显示和请求处理分成两个函数处理。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        95,
                        426,
                        105
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                96,
                                426,
                                105
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        96,
                                        426,
                                        105
                                    ],
                                    "type": "text",
                                    "content": "提交数据时更常用POST 方法。我们下面使用该方法，并用一个URL和处理函数，同时显示视图和处理请求。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        111,
                        184,
                        121
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                111,
                                184,
                                122
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        111,
                                        184,
                                        122
                                    ],
                                    "type": "text",
                                    "content": "1. GET 方法实现（search.py）",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        127,
                        113,
                        137
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                87,
                                126,
                                114,
                                137
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        126,
                                        114,
                                        137
                                    ],
                                    "type": "text",
                                    "content": "python",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        142,
                        245,
                        153
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                142,
                                245,
                                153
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        142,
                                        245,
                                        153
                                    ],
                                    "type": "text",
                                    "content": "# 两个独立的函数： 一个显示表单， 一个处理请求",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        158,
                        214,
                        168
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                158,
                                214,
                                169
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        158,
                                        214,
                                        169
                                    ],
                                    "type": "text",
                                    "content": "def search_form(request): # 显示表单",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        174,
                        236,
                        184
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                95,
                                174,
                                237,
                                184
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        95,
                                        174,
                                        237,
                                        184
                                    ],
                                    "type": "text",
                                    "content": "return render(request, 'search_form.html')",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        205,
                        195,
                        215
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                205,
                                195,
                                215
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        205,
                                        195,
                                        215
                                    ],
                                    "type": "text",
                                    "content": "def search(request): # 处理请求",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        220,
                        229,
                        230
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                95,
                                220,
                                230,
                                231
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        95,
                                        220,
                                        230,
                                        231
                                    ],
                                    "type": "text",
                                    "content": "if 'q' in request.GET and request.GET['q']:",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        102,
                        236,
                        257,
                        246
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                102,
                                235,
                                257,
                                248
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        102,
                                        235,
                                        133,
                                        248
                                    ],
                                    "type": "text",
                                    "content": "message",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        134,
                                        238,
                                        141,
                                        244
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.78
                                },
                                {
                                    "bbox": [
                                        141,
                                        235,
                                        197,
                                        248
                                    ],
                                    "type": "text",
                                    "content": "'你搜索的内容为: '",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        198,
                                        238,
                                        204,
                                        244
                                    ],
                                    "type": "inline_equation",
                                    "content": "^ +",
                                    "score": 0.51
                                },
                                {
                                    "bbox": [
                                        204,
                                        235,
                                        257,
                                        248
                                    ],
                                    "type": "text",
                                    "content": "request.GET['q']",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        252,
                        113,
                        260
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                95,
                                251,
                                114,
                                262
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        95,
                                        251,
                                        114,
                                        262
                                    ],
                                    "type": "text",
                                    "content": "else:",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        102,
                        267,
                        193,
                        276
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                102,
                                267,
                                195,
                                277
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        102,
                                        267,
                                        133,
                                        277
                                    ],
                                    "type": "text",
                                    "content": "message",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        134,
                                        269,
                                        141,
                                        275
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.77
                                },
                                {
                                    "bbox": [
                                        141,
                                        267,
                                        195,
                                        277
                                    ],
                                    "type": "text",
                                    "content": "'你提交了空表单'",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        283,
                        200,
                        292
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                95,
                                282,
                                201,
                                294
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        95,
                                        282,
                                        201,
                                        294
                                    ],
                                    "type": "text",
                                    "content": "return HttpResponse(message)",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        299,
                        192,
                        309
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                87,
                                297,
                                193,
                                310
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        297,
                                        193,
                                        310
                                    ],
                                    "type": "text",
                                    "content": "2. POST 方法实现（search2.py）",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        314,
                        113,
                        323
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                314,
                                114,
                                324
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        314,
                                        114,
                                        324
                                    ],
                                    "type": "text",
                                    "content": "python",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        329,
                        217,
                        338
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                330,
                                217,
                                338
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        330,
                                        217,
                                        338
                                    ],
                                    "type": "text",
                                    "content": "# 单个函数同时处理表单显示和请求处理",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        345,
                        173,
                        354
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                344,
                                174,
                                356
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        344,
                                        174,
                                        356
                                    ],
                                    "type": "text",
                                    "content": "def search_post(request):",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        361,
                        120,
                        370
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 17,
                    "lines": [
                        {
                            "bbox": [
                                95,
                                361,
                                120,
                                370
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        95,
                                        361,
                                        120,
                                        370
                                    ],
                                    "type": "inline_equation",
                                    "content": "\\mathsf { c t x } = \\left\\{ \\right\\}",
                                    "score": 0.67
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        376,
                        252,
                        386
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                95,
                                376,
                                254,
                                386
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        95,
                                        376,
                                        254,
                                        386
                                    ],
                                    "type": "text",
                                    "content": "if request.POST: # 如果是POST 请求 （表单提交）",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        102,
                        392,
                        192,
                        401
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                104,
                                392,
                                193,
                                402
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        104,
                                        392,
                                        128,
                                        402
                                    ],
                                    "type": "text",
                                    "content": "ctx['rlt']",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        129,
                                        393,
                                        136,
                                        400
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.73
                                },
                                {
                                    "bbox": [
                                        136,
                                        392,
                                        193,
                                        402
                                    ],
                                    "type": "text",
                                    "content": "request.POST['q']",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        407,
                        279,
                        417
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                95,
                                407,
                                279,
                                417
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        95,
                                        407,
                                        279,
                                        417
                                    ],
                                    "type": "text",
                                    "content": "return render(request, \"post.html\", ctx) # 总是返回模板",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        423,
                        177,
                        433
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 21,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                423,
                                177,
                                433
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        423,
                                        177,
                                        433
                                    ],
                                    "type": "text",
                                    "content": "何时用 GET？何时用 POST？",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        439,
                        145,
                        448
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 22,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                439,
                                145,
                                449
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        439,
                                        145,
                                        449
                                    ],
                                    "type": "text",
                                    "content": "适合 GET 的情况：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        105,
                        454,
                        276,
                        495
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 26,
                    "blocks": [
                        {
                            "bbox": [
                                105,
                                454,
                                276,
                                464
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 23,
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        454,
                                        276,
                                        464
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                457,
                                                111,
                                                460
                                            ],
                                            "type": "text",
                                            "content": "",
                                            "score": 0.0
                                        },
                                        {
                                            "bbox": [
                                                124,
                                                454,
                                                276,
                                                464
                                            ],
                                            "type": "text",
                                            "content": "搜索功能（用户可能想收藏或分享搜索结果URL）",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                470,
                                242,
                                479
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 24,
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        470,
                                        242,
                                        480
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                472,
                                                111,
                                                476
                                            ],
                                            "type": "text",
                                            "content": ".",
                                            "score": 0.658
                                        },
                                        {
                                            "bbox": [
                                                124,
                                                470,
                                                242,
                                                480
                                            ],
                                            "type": "text",
                                            "content": "筛选和排序（参数在URL中便于分享）",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                486,
                                240,
                                495
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 25,
                            "lines": [
                                {
                                    "bbox": [
                                        108,
                                        486,
                                        240,
                                        495
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                108,
                                                488,
                                                111,
                                                491
                                            ],
                                            "type": "text",
                                            "content": "",
                                            "score": 0.0
                                        },
                                        {
                                            "bbox": [
                                                124,
                                                486,
                                                240,
                                                495
                                            ],
                                            "type": "text",
                                            "content": "幂等操作（不改变服务器状态的操作）",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        88,
                        501,
                        149,
                        510
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 27,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                501,
                                150,
                                511
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        501,
                                        150,
                                        511
                                    ],
                                    "type": "text",
                                    "content": "适合 POST 的情况：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        105,
                        517,
                        217,
                        572
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 32,
                    "blocks": [
                        {
                            "bbox": [
                                105,
                                517,
                                208,
                                526
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 28,
                            "lines": [
                                {
                                    "bbox": [
                                        124,
                                        518,
                                        209,
                                        526
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                124,
                                                518,
                                                209,
                                                526
                                            ],
                                            "type": "text",
                                            "content": "登录/注册（包含敏感信息）",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                532,
                                198,
                                541
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 29,
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        533,
                                        198,
                                        542
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                534,
                                                111,
                                                539
                                            ],
                                            "type": "text",
                                            "content": ".",
                                            "score": 0.9
                                        },
                                        {
                                            "bbox": [
                                                124,
                                                533,
                                                198,
                                                542
                                            ],
                                            "type": "text",
                                            "content": "表单提交（创建新数据）",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                548,
                                217,
                                557
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 30,
                            "lines": [
                                {
                                    "bbox": [
                                        108,
                                        549,
                                        217,
                                        557
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                108,
                                                550,
                                                111,
                                                554
                                            ],
                                            "type": "text",
                                            "content": ".",
                                            "score": 0.652
                                        },
                                        {
                                            "bbox": [
                                                124,
                                                549,
                                                217,
                                                557
                                            ],
                                            "type": "text",
                                            "content": "任何会改变服务器状态的操作",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                563,
                                168,
                                572
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 31,
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        564,
                                        168,
                                        573
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                565,
                                                112,
                                                570
                                            ],
                                            "type": "text",
                                            "content": ".",
                                            "score": 0.757
                                        },
                                        {
                                            "bbox": [
                                                124,
                                                564,
                                                168,
                                                573
                                            ],
                                            "type": "text",
                                            "content": "大量数据提交",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        88,
                        579,
                        132,
                        588
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 33,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                580,
                                132,
                                589
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        580,
                                        132,
                                        589
                                    ],
                                    "type": "text",
                                    "content": "最佳实践总结",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        105,
                        594,
                        313,
                        650
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 38,
                    "blocks": [
                        {
                            "bbox": [
                                105,
                                594,
                                260,
                                603
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 34,
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        594,
                                        260,
                                        604
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                595,
                                                121,
                                                604
                                            ],
                                            "type": "text",
                                            "content": "1.",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                594,
                                                260,
                                                604
                                            ],
                                            "type": "text",
                                            "content": "GET 完全可以用单函数处理显示和处理逻辑",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                610,
                                313,
                                620
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 35,
                            "lines": [
                                {
                                    "bbox": [
                                        105,
                                        610,
                                        315,
                                        621
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                105,
                                                610,
                                                315,
                                                621
                                            ],
                                            "type": "text",
                                            "content": "2. 原代码设计是过时的模式，现代 Django 开发不推荐这样分离",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                625,
                                297,
                                635
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 36,
                            "lines": [
                                {
                                    "bbox": [
                                        105,
                                        626,
                                        298,
                                        636
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                105,
                                                626,
                                                298,
                                                636
                                            ],
                                            "type": "text",
                                            "content": "3. 选择GET 还是 POST 取决于具体场景，而不是技术限制",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                641,
                                217,
                                650
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 37,
                            "lines": [
                                {
                                    "bbox": [
                                        105,
                                        641,
                                        217,
                                        651
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                105,
                                                641,
                                                217,
                                                651
                                            ],
                                            "type": "text",
                                            "content": "4. 单函数模式更简洁、更易维护",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        88,
                        680,
                        175,
                        697
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 39,
                    "lines": [
                        {
                            "bbox": [
                                86,
                                678,
                                177,
                                698
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        86,
                                        678,
                                        177,
                                        698
                                    ],
                                    "type": "text",
                                    "content": "Request 对象",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        708,
                        345,
                        719
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 40,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                707,
                                346,
                                719
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        707,
                                        346,
                                        719
                                    ],
                                    "type": "text",
                                    "content": "每个视图函数的第一个参数是一个HttpRequest 对象，就像下面这个runoob() 函数:",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        724,
                        208,
                        734
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 41,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                724,
                                209,
                                734
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        724,
                                        209,
                                        734
                                    ],
                                    "type": "text",
                                    "content": "from django.http import HttpResponse",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [],
            "page_size": [
                595,
                841
            ],
            "page_idx": 24
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        88,
                        86,
                        188,
                        103
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                84,
                                189,
                                104
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        84,
                                        189,
                                        104
                                    ],
                                    "type": "text",
                                    "content": "QueryDict 对象",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        114,
                        330,
                        155
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                114,
                                330,
                                123
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        114,
                                        330,
                                        123
                                    ],
                                    "type": "text",
                                    "content": "在 HttpRequest 对象中, GET 和 POST 属性是 django.http.QueryDict 类的实例。",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                129,
                                287,
                                139
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        129,
                                        287,
                                        139
                                    ],
                                    "type": "text",
                                    "content": "QueryDict类似字典的自定义类，用来处理单键对应多值的情况。",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                146,
                                280,
                                153
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        146,
                                        280,
                                        153
                                    ],
                                    "type": "text",
                                    "content": "QueryDict实现所有标准的词典方法。还包括一些特有的方法：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        87,
                        176,
                        207,
                        201
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                87,
                                176,
                                207,
                                201
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        87,
                                        176,
                                        207,
                                        201
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                87,
                                                176,
                                                207,
                                                201
                                            ],
                                            "type": "text",
                                            "content": "def runoob(request): return HttpResponse(\"Hello world\")"
                                        }
                                    ]
                                }
                            ],
                            "index": 2,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 2,
                    "sub_type": "code",
                    "guess_lang": "python"
                },
                {
                    "bbox": [
                        88,
                        218,
                        230,
                        247
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                84,
                                216,
                                234,
                                250
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        84,
                                        216,
                                        234,
                                        250
                                    ],
                                    "type": "text",
                                    "content": "Django 视图",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        263,
                        143,
                        282
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                86,
                                260,
                                146,
                                285
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        86,
                                        260,
                                        146,
                                        285
                                    ],
                                    "type": "text",
                                    "content": "视图层",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        292,
                        378,
                        302
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                292,
                                378,
                                302
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        292,
                                        378,
                                        302
                                    ],
                                    "type": "text",
                                    "content": "一个视图函数，简称视图，是一个简单的Python 函数，它接受Web 请求并且返回Web 响应。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        308,
                        373,
                        317
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                308,
                                374,
                                318
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        308,
                                        374,
                                        318
                                    ],
                                    "type": "text",
                                    "content": "响应可以是一个HTML 页面、一个404 错误页面、重定向页面、XML 文档、或者一张图片...",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        323,
                        483,
                        333
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                323,
                                484,
                                333
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        323,
                                        484,
                                        333
                                    ],
                                    "type": "text",
                                    "content": "无论视图本身包含什么逻辑，都要返回响应。代码写在哪里都可以，只要在Python 目录下面，一般放在项目的views.py 文件中。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        339,
                        323,
                        349
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                339,
                                323,
                                349
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        339,
                                        323,
                                        349
                                    ],
                                    "type": "text",
                                    "content": "每个视图函数都负责返回一个HttpResponse 对象，对象中包含生成的响应。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        354,
                        324,
                        364
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                354,
                                324,
                                366
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        354,
                                        324,
                                        366
                                    ],
                                    "type": "text",
                                    "content": "视图层中有两个重要的对象：请求对象(request)与响应对象(HttpResponse)。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        370,
                        246,
                        380
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                370,
                                248,
                                381
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        370,
                                        248,
                                        381
                                    ],
                                    "type": "text",
                                    "content": "请求对象: HttpRequest 对象（简称 request 对象）",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        386,
                        196,
                        396
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                386,
                                196,
                                396
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        386,
                                        196,
                                        396
                                    ],
                                    "type": "text",
                                    "content": "以下介绍几个常用的request 属性。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        411,
                        136,
                        424
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                87,
                                410,
                                139,
                                428
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        410,
                                        139,
                                        428
                                    ],
                                    "type": "text",
                                    "content": "1、GET",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        438,
                        331,
                        447
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                438,
                                332,
                                448
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        438,
                                        332,
                                        448
                                    ],
                                    "type": "text",
                                    "content": "数据类型是QueryDict，一个类似于字典的对象，包含HTTP GET 的所有参数。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        454,
                        233,
                        462
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                454,
                                233,
                                463
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        454,
                                        233,
                                        463
                                    ],
                                    "type": "text",
                                    "content": "有相同的键，就把所有的值放到对应的列表里。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        469,
                        158,
                        478
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                470,
                                158,
                                478
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        470,
                                        158,
                                        478
                                    ],
                                    "type": "text",
                                    "content": "取值格式：对象.方法。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        485,
                        303,
                        494
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                484,
                                305,
                                495
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        484,
                                        305,
                                        495
                                    ],
                                    "type": "text",
                                    "content": "get()：返回字符串，如果该键对应有多个值，取出该键的最后一个值。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        501,
                        104,
                        509
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 17,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                500,
                                105,
                                510
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        500,
                                        105,
                                        510
                                    ],
                                    "type": "text",
                                    "content": "实例",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        87,
                        516,
                        241,
                        557
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                87,
                                516,
                                241,
                                557
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        87,
                                        516,
                                        241,
                                        557
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                87,
                                                516,
                                                241,
                                                557
                                            ],
                                            "type": "text",
                                            "content": "def runoob(request):\n    name = request.GET.get(\"name\")\n    return HttpResponse('姓名：{}''.format(name))"
                                        }
                                    ]
                                }
                            ],
                            "index": 18,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 18,
                    "sub_type": "code",
                    "guess_lang": "python"
                },
                {
                    "bbox": [
                        87,
                        571,
                        146,
                        585
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                86,
                                569,
                                148,
                                587
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        86,
                                        569,
                                        148,
                                        587
                                    ],
                                    "type": "text",
                                    "content": "2、POST",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        598,
                        335,
                        608
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                598,
                                336,
                                608
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        598,
                                        336,
                                        608
                                    ],
                                    "type": "text",
                                    "content": "数据类型是QueryDict，一个类似于字典的对象，包含HTTP POST 的所有参数。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        614,
                        368,
                        624
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 21,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                615,
                                370,
                                624
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        615,
                                        370,
                                        624
                                    ],
                                    "type": "text",
                                    "content": "常用于form 表单，form 表单里的标签name 属性对应参数的键，value 属性对应参数的值。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        629,
                        159,
                        639
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 22,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                629,
                                160,
                                640
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        629,
                                        160,
                                        640
                                    ],
                                    "type": "text",
                                    "content": "取值格式：对象.方法。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        645,
                        303,
                        655
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 23,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                645,
                                305,
                                655
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        645,
                                        305,
                                        655
                                    ],
                                    "type": "text",
                                    "content": "get()：返回字符串，如果该键对应有多个值，取出该键的最后一个值。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        661,
                        104,
                        670
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 24,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                660,
                                105,
                                671
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        660,
                                        105,
                                        671
                                    ],
                                    "type": "text",
                                    "content": "实例",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        87,
                        677,
                        241,
                        718
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                87,
                                677,
                                241,
                                718
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        87,
                                        677,
                                        241,
                                        718
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                87,
                                                677,
                                                241,
                                                718
                                            ],
                                            "type": "text",
                                            "content": "def runoob(request):\n    name = request.POST.get(\"name\")\n    return HttpResponse('姓名：{}'.format(name))"
                                        }
                                    ]
                                }
                            ],
                            "index": 25,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 25,
                    "sub_type": "code",
                    "guess_lang": "python"
                },
                {
                    "bbox": [
                        87,
                        732,
                        145,
                        748
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 26,
                    "lines": [
                        {
                            "bbox": [
                                86,
                                728,
                                147,
                                751
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        86,
                                        728,
                                        147,
                                        751
                                    ],
                                    "type": "text",
                                    "content": "3、body",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [],
            "page_size": [
                595,
                841
            ],
            "page_idx": 25
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        86,
                        80,
                        411,
                        90
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                81,
                                412,
                                89
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        81,
                                        412,
                                        89
                                    ],
                                    "type": "text",
                                    "content": "数据类型是二进制字节流，是原生请求体里的参数内容，在HTTP 中用于POST，因为GET 没有请求体。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        95,
                        399,
                        105
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                95,
                                399,
                                105
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        95,
                                        399,
                                        105
                                    ],
                                    "type": "text",
                                    "content": "在HTTP 中不常用，而在处理非HTTP 形式的报文时非常有用，例如：二进制图片、XML、Json 等。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        111,
                        105,
                        121
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                111,
                                105,
                                121
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        111,
                                        105,
                                        121
                                    ],
                                    "type": "text",
                                    "content": "实例",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        88,
                        127,
                        202,
                        185
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                88,
                                127,
                                202,
                                185
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        127,
                                        202,
                                        185
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                127,
                                                202,
                                                185
                                            ],
                                            "type": "text",
                                            "content": "def runoob(request): name "
                                        },
                                        {
                                            "bbox": [
                                                88,
                                                127,
                                                202,
                                                185
                                            ],
                                            "type": "inline_equation",
                                            "content": "="
                                        },
                                        {
                                            "bbox": [
                                                88,
                                                127,
                                                202,
                                                185
                                            ],
                                            "type": "text",
                                            "content": " request.body print(name) return HttpResponse(\"菜鸟教程\")"
                                        }
                                    ]
                                }
                            ],
                            "index": 3,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 3,
                    "sub_type": "algorithm"
                },
                {
                    "bbox": [
                        87,
                        189,
                        229,
                        199
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                190,
                                229,
                                198
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        190,
                                        229,
                                        198
                                    ],
                                    "type": "text",
                                    "content": "获取URL 中的路径部分，数据类型是字符串。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        205,
                        105,
                        215
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                204,
                                105,
                                216
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        204,
                                        105,
                                        216
                                    ],
                                    "type": "text",
                                    "content": "实例",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        88,
                        221,
                        200,
                        278
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                88,
                                221,
                                200,
                                278
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        221,
                                        200,
                                        278
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                221,
                                                200,
                                                278
                                            ],
                                            "type": "text",
                                            "content": "def runoob(request): name "
                                        },
                                        {
                                            "bbox": [
                                                88,
                                                221,
                                                200,
                                                278
                                            ],
                                            "type": "inline_equation",
                                            "content": "="
                                        },
                                        {
                                            "bbox": [
                                                88,
                                                221,
                                                200,
                                                278
                                            ],
                                            "type": "text",
                                            "content": " request.path print(name) return HttpResponse(\"菜鸟教程\")"
                                        }
                                    ]
                                }
                            ],
                            "index": 6,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 6,
                    "sub_type": "algorithm"
                },
                {
                    "bbox": [
                        87,
                        291,
                        143,
                        307
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                85,
                                289,
                                146,
                                309
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        85,
                                        289,
                                        146,
                                        309
                                    ],
                                    "type": "text",
                                    "content": "4、path",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        319,
                        229,
                        329
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                320,
                                229,
                                328
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        320,
                                        229,
                                        328
                                    ],
                                    "type": "text",
                                    "content": "获取URL 中的路径部分，数据类型是字符串。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        334,
                        105,
                        344
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                334,
                                105,
                                345
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        334,
                                        105,
                                        345
                                    ],
                                    "type": "text",
                                    "content": "实例",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        88,
                        349,
                        201,
                        407
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                88,
                                349,
                                201,
                                407
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        349,
                                        201,
                                        407
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                349,
                                                201,
                                                407
                                            ],
                                            "type": "text",
                                            "content": "def runoob(request): name "
                                        },
                                        {
                                            "bbox": [
                                                88,
                                                349,
                                                201,
                                                407
                                            ],
                                            "type": "inline_equation",
                                            "content": "="
                                        },
                                        {
                                            "bbox": [
                                                88,
                                                349,
                                                201,
                                                407
                                            ],
                                            "type": "text",
                                            "content": " request.path print(name) return HttpResponse(\"菜鸟教程\")"
                                        }
                                    ]
                                }
                            ],
                            "index": 10,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 10,
                    "sub_type": "algorithm"
                },
                {
                    "bbox": [
                        87,
                        437,
                        166,
                        451
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                87,
                                435,
                                166,
                                454
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        435,
                                        166,
                                        454
                                    ],
                                    "type": "text",
                                    "content": "5、method",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        464,
                        268,
                        474
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                465,
                                268,
                                473
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        465,
                                        268,
                                        473
                                    ],
                                    "type": "text",
                                    "content": "获取当前请求的方式，数据类型是字符串，且结果为大写。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        480,
                        105,
                        489
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                479,
                                105,
                                491
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        479,
                                        105,
                                        491
                                    ],
                                    "type": "text",
                                    "content": "实例",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        88,
                        495,
                        202,
                        552
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                88,
                                495,
                                202,
                                552
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        495,
                                        202,
                                        552
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                495,
                                                202,
                                                552
                                            ],
                                            "type": "text",
                                            "content": "def runoob(request): name "
                                        },
                                        {
                                            "bbox": [
                                                88,
                                                495,
                                                202,
                                                552
                                            ],
                                            "type": "inline_equation",
                                            "content": "="
                                        },
                                        {
                                            "bbox": [
                                                88,
                                                495,
                                                202,
                                                552
                                            ],
                                            "type": "text",
                                            "content": " request.method print(name) return HttpResponse(\"菜鸟教程\")"
                                        }
                                    ]
                                }
                            ],
                            "index": 14,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 14,
                    "sub_type": "algorithm"
                },
                {
                    "bbox": [
                        87,
                        564,
                        348,
                        586
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                87,
                                560,
                                348,
                                587
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        560,
                                        348,
                                        587
                                    ],
                                    "type": "text",
                                    "content": "响应对象：HttpResponse 对象",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        593,
                        293,
                        604
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                592,
                                293,
                                605
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        592,
                                        293,
                                        605
                                    ],
                                    "type": "text",
                                    "content": "响应对象主要有三种形式：HttpResponse()、render()、redirect()。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        609,
                        452,
                        619
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 17,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                609,
                                453,
                                619
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        609,
                                        453,
                                        619
                                    ],
                                    "type": "text",
                                    "content": "HttpResponse(): 返回文本，参数为字符串，字符串中写文本内容。如果参数为字符串里含有html 标签，也可以渲染。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        624,
                        500,
                        634
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                624,
                                501,
                                634
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        624,
                                        501,
                                        634
                                    ],
                                    "type": "text",
                                    "content": "ender(): 返回文本，第一个参数为 request，第二个参数为字符串（页面名称），第三个参数为字典（可选参数，向页面传递的参数：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        640,
                        211,
                        650
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                640,
                                212,
                                650
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        640,
                                        212,
                                        650
                                    ],
                                    "type": "text",
                                    "content": "键为页面参数名，值为views参数名）。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        655,
                        105,
                        666
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                655,
                                105,
                                667
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        655,
                                        105,
                                        667
                                    ],
                                    "type": "text",
                                    "content": "实例",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        88,
                        671,
                        261,
                        713
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                88,
                                671,
                                261,
                                713
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        671,
                                        261,
                                        713
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                671,
                                                261,
                                                713
                                            ],
                                            "type": "text",
                                            "content": "def runoob(request):\n    name = \"菜鸟教程\"\n    return render(request, \"runoob.html\", {\"name\": name})"
                                        }
                                    ]
                                }
                            ],
                            "index": 21,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 21,
                    "sub_type": "code",
                    "guess_lang": "python"
                },
                {
                    "bbox": [
                        87,
                        719,
                        456,
                        729
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 22,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                719,
                                456,
                                728
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        719,
                                        456,
                                        728
                                    ],
                                    "type": "text",
                                    "content": "redirect()：重定向，跳转新页面。参数为字符串，字符串中填写页面路径。一般用于form 表单提交后，跳转到新页面。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        734,
                        105,
                        744
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 23,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                733,
                                105,
                                745
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        733,
                                        105,
                                        745
                                    ],
                                    "type": "text",
                                    "content": "实例",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        88,
                        750,
                        155,
                        760
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                88,
                                750,
                                155,
                                760
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        750,
                                        155,
                                        760
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                750,
                                                155,
                                                760
                                            ],
                                            "type": "text",
                                            "content": "def runoob(request):"
                                        }
                                    ]
                                }
                            ],
                            "index": 24,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 24,
                    "sub_type": "code",
                    "guess_lang": "txt"
                }
            ],
            "discarded_blocks": [],
            "page_size": [
                595,
                841
            ],
            "page_idx": 26
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        95,
                        81,
                        173,
                        89
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                96,
                                79,
                                174,
                                90
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        96,
                                        79,
                                        174,
                                        90
                                    ],
                                    "type": "text",
                                    "content": "return redirect(\"/index/\")",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        95,
                        274,
                        105
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                96,
                                275,
                                106
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        96,
                                        275,
                                        106
                                    ],
                                    "type": "text",
                                    "content": "render 和 redirect 是在 HttpResponse 的基础上进行了封装：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        105,
                        111,
                        264,
                        137
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 4,
                    "blocks": [
                        {
                            "bbox": [
                                105,
                                111,
                                264,
                                121
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 2,
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        111,
                                        264,
                                        121
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                114,
                                                110,
                                                116
                                            ],
                                            "type": "text",
                                            "content": "",
                                            "score": 0.0
                                        },
                                        {
                                            "bbox": [
                                                124,
                                                111,
                                                264,
                                                121
                                            ],
                                            "type": "text",
                                            "content": "render：底层返回的也是 HttpResponse 对象",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                127,
                                260,
                                137
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 3,
                            "lines": [
                                {
                                    "bbox": [
                                        124,
                                        127,
                                        260,
                                        137
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                124,
                                                127,
                                                260,
                                                137
                                            ],
                                            "type": "text",
                                            "content": "redirect：底层继承的是 HttpResponse 对象",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        89,
                        154,
                        229,
                        183
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                85,
                                152,
                                233,
                                185
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        85,
                                        152,
                                        233,
                                        185
                                    ],
                                    "type": "text",
                                    "content": "Django 路由",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        194,
                        503,
                        205
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                195,
                                503,
                                204
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        195,
                                        503,
                                        204
                                    ],
                                    "type": "text",
                                    "content": "路由简单的来说就是根据用户请求的URL 链接来判断对应的处理程序，并返回处理结果，也就是URL 与Django 的视图建立映射关系。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        210,
                        318,
                        220
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                210,
                                318,
                                220
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        210,
                                        318,
                                        220
                                    ],
                                    "type": "text",
                                    "content": "Django 路由在 urls.py 配置，urls.py 中的每一条配置对应相应的处理方法。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        232,
                        171,
                        251
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                86,
                                227,
                                175,
                                254
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        86,
                                        227,
                                        175,
                                        254
                                    ],
                                    "type": "text",
                                    "content": "Path 设置",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        262,
                        168,
                        271
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                261,
                                169,
                                272
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        261,
                                        169,
                                        272
                                    ],
                                    "type": "text",
                                    "content": "Django 2.2.x 之后的版本",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        105,
                        277,
                        367,
                        302
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 12,
                    "blocks": [
                        {
                            "bbox": [
                                105,
                                277,
                                367,
                                287
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 10,
                            "lines": [
                                {
                                    "bbox": [
                                        124,
                                        277,
                                        367,
                                        287
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                124,
                                                277,
                                                367,
                                                287
                                            ],
                                            "type": "text",
                                            "content": "path：用于普通路径，不需要自己手动添加正则首位限制符号，底层已经添加。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                292,
                                321,
                                302
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 11,
                            "lines": [
                                {
                                    "bbox": [
                                        108,
                                        293,
                                        321,
                                        302
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                108,
                                                295,
                                                111,
                                                299
                                            ],
                                            "type": "text",
                                            "content": ".",
                                            "score": 0.678
                                        },
                                        {
                                            "bbox": [
                                                124,
                                                293,
                                                321,
                                                302
                                            ],
                                            "type": "text",
                                            "content": "re_path：用于正则路径，需要自己手动添加正则首位限制符号。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        87,
                        308,
                        104,
                        317
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                307,
                                105,
                                319
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        307,
                                        105,
                                        319
                                    ],
                                    "type": "text",
                                    "content": "实例",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        86,
                        323,
                        277,
                        412
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                86,
                                323,
                                277,
                                412
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        86,
                                        323,
                                        277,
                                        412
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                86,
                                                323,
                                                277,
                                                412
                                            ],
                                            "type": "text",
                                            "content": "from django.url import re_path # 用re_path 需要引入\nurlpatterns = [\n    path('admin/', admin.site URLs),\n    path('index/', views.index), # 普通路径\n    re_path(r'^articles/[0-9]{4}]/$', views_articles), # 正则路径"
                                        }
                                    ]
                                }
                            ],
                            "index": 14,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 14,
                    "sub_type": "code",
                    "guess_lang": "python"
                },
                {
                    "bbox": [
                        88,
                        423,
                        235,
                        443
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                423,
                                235,
                                444
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        423,
                                        235,
                                        444
                                    ],
                                    "type": "text",
                                    "content": "正则路径中的分组",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        458,
                        225,
                        474
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                457,
                                226,
                                476
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        457,
                                        226,
                                        476
                                    ],
                                    "type": "text",
                                    "content": "正则路径中的无名分组",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        486,
                        192,
                        497
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 17,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                486,
                                192,
                                497
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        486,
                                        192,
                                        497
                                    ],
                                    "type": "text",
                                    "content": "无名分组按位置传参，一一对应。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        502,
                        299,
                        513
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                502,
                                299,
                                513
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        502,
                                        299,
                                        513
                                    ],
                                    "type": "text",
                                    "content": "views 中除了request，其他形参的数量要与urls 中的分组数量一致。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        518,
                        113,
                        528
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                517,
                                114,
                                529
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        517,
                                        114,
                                        529
                                    ],
                                    "type": "text",
                                    "content": "urls.py",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        87,
                        534,
                        229,
                        622
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                87,
                                534,
                                229,
                                622
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        87,
                                        534,
                                        229,
                                        622
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                87,
                                                534,
                                                229,
                                                622
                                            ],
                                            "type": "text",
                                            "content": "urlpatterns "
                                        },
                                        {
                                            "bbox": [
                                                87,
                                                534,
                                                229,
                                                622
                                            ],
                                            "type": "inline_equation",
                                            "content": "="
                                        },
                                        {
                                            "bbox": [
                                                87,
                                                534,
                                                229,
                                                622
                                            ],
                                            "type": "text",
                                            "content": " [ path('admin'/,admin.site URLs), re_path(\"^index/([0-9]{4})/$\",views.index), ] views.py from django.shortcuts import HttpResponse"
                                        }
                                    ]
                                }
                            ],
                            "index": 20,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 20,
                    "sub_type": "algorithm"
                },
                {
                    "type": "code",
                    "bbox": [
                        87,
                        643,
                        294,
                        684
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                87,
                                643,
                                294,
                                684
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        87,
                                        643,
                                        294,
                                        684
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                87,
                                                643,
                                                294,
                                                684
                                            ],
                                            "type": "text",
                                            "content": "def index(request, year):\n    print(year) # 一个形参代表路径中一个分组的内容，按顺序匹配\n    return HttpResponse('菜鸟教程')"
                                        }
                                    ]
                                }
                            ],
                            "index": 21,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 21,
                    "sub_type": "code",
                    "guess_lang": "python"
                },
                {
                    "bbox": [
                        88,
                        697,
                        226,
                        713
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 22,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                696,
                                226,
                                714
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        696,
                                        226,
                                        714
                                    ],
                                    "type": "text",
                                    "content": "正则路径中的有名分组",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        725,
                        108,
                        735
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 23,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                724,
                                108,
                                736
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        724,
                                        108,
                                        736
                                    ],
                                    "type": "text",
                                    "content": "语法：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        741,
                        161,
                        751
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 24,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                741,
                                161,
                                751
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        741,
                                        161,
                                        751
                                    ],
                                    "type": "text",
                                    "content": "(?P<组名>正则表达式)",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [],
            "page_size": [
                595,
                841
            ],
            "page_idx": 27
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        86,
                        80,
                        218,
                        89
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                81,
                                218,
                                89
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        81,
                                        218,
                                        89
                                    ],
                                    "type": "text",
                                    "content": "有名分组按关键字传参，与位置顺序无关。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        95,
                        455,
                        105
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                95,
                                455,
                                105
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        95,
                                        455,
                                        105
                                    ],
                                    "type": "text",
                                    "content": "views 中除了request，其他形参的数量要与urls 中的分组数量一致，并且views 中的形参名称要与urls 中的组名对应。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        111,
                        113,
                        121
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                110,
                                115,
                                123
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        110,
                                        115,
                                        123
                                    ],
                                    "type": "text",
                                    "content": "urls.py",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        87,
                        127,
                        276,
                        263
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                87,
                                127,
                                276,
                                263
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        87,
                                        127,
                                        276,
                                        263
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                87,
                                                127,
                                                276,
                                                263
                                            ],
                                            "type": "text",
                                            "content": "urlpatterns "
                                        },
                                        {
                                            "bbox": [
                                                87,
                                                127,
                                                276,
                                                263
                                            ],
                                            "type": "inline_equation",
                                            "content": "="
                                        },
                                        {
                                            "bbox": [
                                                87,
                                                127,
                                                276,
                                                263
                                            ],
                                            "type": "text",
                                            "content": " [path('admin／',admin.site.urls),re_path(\"^index/(?P[0-9]{4})/(?P[0-9]{2})/\\$\"，views.index),]views.pyfrom django.shortcuts import HttpResponsedef index(request, year, month):print(year,month)#一个形参代表路径中一个分组的内容,return HttpResponse('菜鸟教程')"
                                        }
                                    ]
                                }
                            ],
                            "index": 3,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 3,
                    "sub_type": "algorithm"
                },
                {
                    "bbox": [
                        87,
                        275,
                        202,
                        291
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                273,
                                204,
                                293
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        273,
                                        204,
                                        293
                                    ],
                                    "type": "text",
                                    "content": "路由分发(include)",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        303,
                        362,
                        313
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                303,
                                364,
                                313
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        303,
                                        364,
                                        313
                                    ],
                                    "type": "text",
                                    "content": "存在问题：Django 项目里多个app目录共用一个urls 容易造成混淆，后期维护也不方便。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        319,
                        317,
                        328
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                318,
                                318,
                                329
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        318,
                                        318,
                                        329
                                    ],
                                    "type": "text",
                                    "content": "解决：使用路由分发（include），让每个app目录都单独拥有自己的urls。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        334,
                        107,
                        343
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                333,
                                108,
                                344
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        333,
                                        108,
                                        344
                                    ],
                                    "type": "text",
                                    "content": "步骤：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        105,
                        350,
                        344,
                        375
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 10,
                    "blocks": [
                        {
                            "bbox": [
                                105,
                                350,
                                270,
                                359
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 8,
                            "lines": [
                                {
                                    "bbox": [
                                        119,
                                        349,
                                        271,
                                        361
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                119,
                                                349,
                                                271,
                                                361
                                            ],
                                            "type": "text",
                                            "content": "1、在每个 app 目录里都创建一个 urls.py 文件。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                365,
                                344,
                                375
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 9,
                            "lines": [
                                {
                                    "bbox": [
                                        123,
                                        365,
                                        345,
                                        375
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                123,
                                                365,
                                                345,
                                                375
                                            ],
                                            "type": "text",
                                            "content": "2、在项目名称目录下的urls 文件里，统一将路径分发给各个app 目录。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        87,
                        380,
                        104,
                        391
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                380,
                                105,
                                391
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        380,
                                        105,
                                        391
                                    ],
                                    "type": "text",
                                    "content": "实例",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        396,
                        196,
                        406
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                396,
                                196,
                                407
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        396,
                                        196,
                                        407
                                    ],
                                    "type": "text",
                                    "content": "from django.contrib import admin",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        86,
                        412,
                        295,
                        484
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                86,
                                412,
                                295,
                                484
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        86,
                                        412,
                                        295,
                                        484
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                86,
                                                412,
                                                295,
                                                484
                                            ],
                                            "type": "text",
                                            "content": "from django.url import path, include # 从 django.url 引入 include  \nurlpatterns = [  \n    path('admin/', admin.site URLs),  \n    path(\"app01/\", include(\"app01 URLs\")),  \n    path(\"app02/\", include(\"app02 URLs\")),"
                                        }
                                    ]
                                }
                            ],
                            "index": 13,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 13,
                    "sub_type": "code",
                    "guess_lang": "python"
                },
                {
                    "bbox": [
                        88,
                        512,
                        162,
                        531
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                509,
                                165,
                                534
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        509,
                                        165,
                                        534
                                    ],
                                    "type": "text",
                                    "content": "反向解析",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        542,
                        421,
                        551
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                543,
                                422,
                                551
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        543,
                                        422,
                                        551
                                    ],
                                    "type": "text",
                                    "content": "随着功能的增加，路由层的url 发生变化，就需要去更改对应的视图层和模板层的url，非常麻烦，不便维护。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        557,
                        456,
                        566
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                558,
                                456,
                                566
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        558,
                                        456,
                                        566
                                    ],
                                    "type": "text",
                                    "content": "这时我们可以利用反向解析，当路由层url 发生改变，在视图层和模板层动态反向解析出更改后的url，免去修改的操作。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        573,
                        254,
                        582
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 17,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                574,
                                254,
                                582
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        574,
                                        254,
                                        582
                                    ],
                                    "type": "text",
                                    "content": "反向解析一般用在模板中的超链接及视图中的重定向。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        597,
                        143,
                        612
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                596,
                                145,
                                614
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        596,
                                        145,
                                        614
                                    ],
                                    "type": "text",
                                    "content": "普通路径",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        624,
                        236,
                        634
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                624,
                                238,
                                634
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        624,
                                        238,
                                        634
                                    ],
                                    "type": "text",
                                    "content": "在urls.py 中给路由起别名，name=\"路由别名\"。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        640,
                        217,
                        650
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                640,
                                218,
                                651
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        640,
                                        218,
                                        651
                                    ],
                                    "type": "text",
                                    "content": "path(\"login1/\", views.login, name=\"login\")",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        655,
                        350,
                        666
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 21,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                655,
                                351,
                                666
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        655,
                                        351,
                                        666
                                    ],
                                    "type": "text",
                                    "content": "在 views.py 中，从 django.urls 中引入 reverse，利用 reverse(\"路由别名\") 反向解析:",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        671,
                        186,
                        681
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 22,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                671,
                                186,
                                682
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        671,
                                        186,
                                        682
                                    ],
                                    "type": "text",
                                    "content": "return redirect(reverse(\"login\"))",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        687,
                        324,
                        697
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 23,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                687,
                                326,
                                698
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        687,
                                        326,
                                        698
                                    ],
                                    "type": "text",
                                    "content": "在模板 templates 中的 HTML 文件中，利用 {% url \"路由别名\" %} 反向解析。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        703,
                        238,
                        712
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 24,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                703,
                                238,
                                713
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        703,
                                        238,
                                        713
                                    ],
                                    "type": "text",
                                    "content": "<form action=\"{% url 'login' %}\" method=\"post\">",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        726,
                        217,
                        742
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 25,
                    "lines": [
                        {
                            "bbox": [
                                86,
                                724,
                                219,
                                744
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        86,
                                        724,
                                        219,
                                        744
                                    ],
                                    "type": "text",
                                    "content": "正则路径（无名分组）",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [],
            "page_size": [
                595,
                841
            ],
            "page_idx": 28
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        86,
                        80,
                        238,
                        90
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                80,
                                238,
                                90
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        80,
                                        238,
                                        90
                                    ],
                                    "type": "text",
                                    "content": "在 urls.py 中给路由起别名，name=\"路由别名\"。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        95,
                        262,
                        105
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                95,
                                263,
                                106
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        95,
                                        263,
                                        106
                                    ],
                                    "type": "text",
                                    "content": "re_path(r\"^login/([0-9]{2})/$\", views.login, name=\"login\")",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        111,
                        447,
                        121
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                111,
                                448,
                                122
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        111,
                                        448,
                                        122
                                    ],
                                    "type": "text",
                                    "content": "在 views.py 中，从 django.urls 中引入 reverse，利用 reverse(\"路由别名\"，args=(符合正则匹配的参数,)) 反向解析。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        127,
                        220,
                        137
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                126,
                                220,
                                138
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        126,
                                        220,
                                        138
                                    ],
                                    "type": "text",
                                    "content": "return redirect(reverse(\"login\",args=(10,)))",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        142,
                        382,
                        153
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                142,
                                383,
                                153
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        142,
                                        383,
                                        153
                                    ],
                                    "type": "text",
                                    "content": "在模板 templates 中的 HTML 文件中利用 {% url \"路由别名\" 符合正则匹配的参数 %} 反向解析。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        158,
                        248,
                        168
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                158,
                                248,
                                168
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        158,
                                        248,
                                        168
                                    ],
                                    "type": "text",
                                    "content": "<form action=\"{% url 'login' 10 %}\" method=\"post\">",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        181,
                        218,
                        197
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                179,
                                217,
                                198
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        179,
                                        217,
                                        198
                                    ],
                                    "type": "text",
                                    "content": "正则路径（有名分组）",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        210,
                        238,
                        220
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                210,
                                238,
                                220
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        210,
                                        238,
                                        220
                                    ],
                                    "type": "text",
                                    "content": "在 urls.py 中给路由起别名，name=\"路由别名\"。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        225,
                        292,
                        235
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                225,
                                293,
                                236
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        225,
                                        293,
                                        236
                                    ],
                                    "type": "text",
                                    "content": "re_path(r\"^login/(?P<year>[0-9]{4})/$\", views.login, name=\"login\")",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        241,
                        484,
                        251
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                241,
                                486,
                                252
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        241,
                                        486,
                                        252
                                    ],
                                    "type": "text",
                                    "content": "在 views.py 中，从 django.urls 中引入 reverse，利用 reverse(\"路由别名\"，kwargs={\"分组名\":符合正则匹配的参数}) 反向解析。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        256,
                        255,
                        266
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                257,
                                255,
                                267
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        257,
                                        255,
                                        267
                                    ],
                                    "type": "text",
                                    "content": "return redirect(reverse(\"login\",kwargs={\"year\":3333}))",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        272,
                        414,
                        282
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                272,
                                415,
                                282
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        272,
                                        415,
                                        282
                                    ],
                                    "type": "text",
                                    "content": "在模板 templates 中的 HTML 文件中，利用{% url \"路由别名\" 分组名=符合正则匹配的参数 %} 反向解析。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        288,
                        273,
                        297
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                287,
                                273,
                                297
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        287,
                                        273,
                                        297
                                    ],
                                    "type": "text",
                                    "content": "<form action=\"{% url 'login' year=3333 %}\" method=\"post\">",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        325,
                        163,
                        344
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                86,
                                322,
                                164,
                                348
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        86,
                                        322,
                                        164,
                                        348
                                    ],
                                    "type": "text",
                                    "content": "命名空间",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        354,
                        271,
                        364
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                355,
                                271,
                                364
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        355,
                                        271,
                                        364
                                    ],
                                    "type": "text",
                                    "content": "命名空间（英语：Namespace）是表示标识符的可见范围。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        370,
                        339,
                        380
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                370,
                                339,
                                380
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        370,
                                        339,
                                        380
                                    ],
                                    "type": "text",
                                    "content": "一个标识符可在多个命名空间中定义，它在不同命名空间中的含义是互不相干的。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        386,
                        464,
                        395
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                386,
                                465,
                                396
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        386,
                                        465,
                                        396
                                    ],
                                    "type": "text",
                                    "content": "一个新的命名空间中可定义任何标识符，它们不会与任何重复的标识符发生冲突，因为重复的定义都处于其它命名空间中。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        401,
                        505,
                        411
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 17,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                402,
                                505,
                                412
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        402,
                                        505,
                                        412
                                    ],
                                    "type": "text",
                                    "content": "存在问题：路由别名 name 没有作用域，Django 在反向解析 URL 时，会在项目全局顺序搜索，当查找到第一个路由别名 name 指定",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        417,
                        450,
                        427
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                417,
                                451,
                                428
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        417,
                                        451,
                                        428
                                    ],
                                    "type": "text",
                                    "content": "URL 时，立即返回。当在不同的 app 目录下的 urls 中定义相同的路由别名 name 时，可能会导致 URL 反向解析错误。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        433,
                        156,
                        443
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                433,
                                157,
                                443
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        433,
                                        157,
                                        443
                                    ],
                                    "type": "text",
                                    "content": "解决：使用命名空间。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        449,
                        119,
                        458
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                449,
                                119,
                                459
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        449,
                                        119,
                                        459
                                    ],
                                    "type": "text",
                                    "content": "普通路径",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        464,
                        250,
                        473
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 21,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                465,
                                251,
                                473
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        465,
                                        251,
                                        473
                                    ],
                                    "type": "text",
                                    "content": "定义命名空间（include 里面是一个元组）格式如下：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        480,
                        211,
                        490
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 22,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                479,
                                212,
                                491
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        479,
                                        212,
                                        491
                                    ],
                                    "type": "text",
                                    "content": "include((\"app 名称：urls\"，\"app 名称\"))",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        495,
                        107,
                        504
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 23,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                494,
                                108,
                                506
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        494,
                                        108,
                                        506
                                    ],
                                    "type": "text",
                                    "content": "实例：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        510,
                        234,
                        520
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 24,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                511,
                                235,
                                522
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        511,
                                        235,
                                        522
                                    ],
                                    "type": "text",
                                    "content": "path(\"app01/\", include((\"app01.urls\",\"app01\")))",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        526,
                        234,
                        536
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 25,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                526,
                                235,
                                537
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        526,
                                        235,
                                        537
                                    ],
                                    "type": "text",
                                    "content": "path(\"app02/\", include((\"app02.urls\",\"app02\")))",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        542,
                        208,
                        551
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 26,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                542,
                                209,
                                553
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        542,
                                        209,
                                        553
                                    ],
                                    "type": "text",
                                    "content": "在 app01/urls.py 中起相同的路由别名。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        557,
                        213,
                        567
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 27,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                558,
                                214,
                                568
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        558,
                                        214,
                                        568
                                    ],
                                    "type": "text",
                                    "content": "path(\"login/\", views.login, name=\"login\")",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        573,
                        228,
                        582
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 28,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                573,
                                229,
                                583
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        573,
                                        229,
                                        583
                                    ],
                                    "type": "text",
                                    "content": "在views.py 中使用名称空间，语法格式如下：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        588,
                        185,
                        598
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 29,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                588,
                                186,
                                599
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        588,
                                        186,
                                        599
                                    ],
                                    "type": "text",
                                    "content": "reverse(\"app 名称：路由别名\")",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        604,
                        107,
                        613
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 30,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                604,
                                108,
                                615
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        604,
                                        108,
                                        615
                                    ],
                                    "type": "text",
                                    "content": "实例：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        620,
                        205,
                        629
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 31,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                619,
                                206,
                                630
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        619,
                                        206,
                                        630
                                    ],
                                    "type": "text",
                                    "content": "return redirect(reverse(\"app01:login\")",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        646,
                        363,
                        675
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 32,
                    "lines": [
                        {
                            "bbox": [
                                85,
                                643,
                                368,
                                677
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        85,
                                        643,
                                        368,
                                        677
                                    ],
                                    "type": "text",
                                    "content": "Django Admin 管理工具",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        692,
                        317,
                        709
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 33,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                690,
                                318,
                                710
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        690,
                                        318,
                                        710
                                    ],
                                    "type": "text",
                                    "content": "Django 提供了基于web 的管理工具。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        720,
                        433,
                        731
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 34,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                720,
                                435,
                                731
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        720,
                                        435,
                                        731
                                    ],
                                    "type": "text",
                                    "content": "Django 自动管理工具是 django.contrib 的一部分。你可以在项目的 settings.py 中的 INSTALLED_APPS 看到它：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        736,
                        230,
                        746
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 35,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                736,
                                231,
                                747
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        736,
                                        231,
                                        747
                                    ],
                                    "type": "text",
                                    "content": "/HelloWorld/HelloWorld/settings.py 文件代码：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [],
            "page_size": [
                595,
                841
            ],
            "page_idx": 29
        },
        {
            "para_blocks": [
                {
                    "type": "code",
                    "bbox": [
                        88,
                        80,
                        161,
                        89
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                88,
                                80,
                                161,
                                89
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        80,
                                        161,
                                        89
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                80,
                                                161,
                                                89
                                            ],
                                            "type": "text",
                                            "content": "INSTALLED_APPS = ("
                                        }
                                    ]
                                }
                            ],
                            "index": 0,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 0,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "type": "code",
                    "bbox": [
                        96,
                        96,
                        167,
                        105
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                96,
                                96,
                                167,
                                105
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        96,
                                        96,
                                        167,
                                        105
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                96,
                                                96,
                                                167,
                                                105
                                            ],
                                            "type": "text",
                                            "content": "'django.contrib_admin',"
                                        }
                                    ]
                                }
                            ],
                            "index": 1,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 1,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "type": "code",
                    "bbox": [
                        96,
                        111,
                        162,
                        121
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                96,
                                111,
                                162,
                                121
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        96,
                                        111,
                                        162,
                                        121
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                96,
                                                111,
                                                162,
                                                121
                                            ],
                                            "type": "text",
                                            "content": "'django.contrib.auth',"
                                        }
                                    ]
                                }
                            ],
                            "index": 2,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 2,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "type": "code",
                    "bbox": [
                        96,
                        127,
                        188,
                        137
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                96,
                                127,
                                188,
                                137
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        96,
                                        127,
                                        188,
                                        137
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                96,
                                                127,
                                                188,
                                                137
                                            ],
                                            "type": "text",
                                            "content": "'django.contrib.contenttypes',"
                                        }
                                    ]
                                }
                            ],
                            "index": 3,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 3,
                    "sub_type": "code",
                    "guess_lang": "python"
                },
                {
                    "type": "code",
                    "bbox": [
                        96,
                        142,
                        176,
                        152
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                96,
                                142,
                                176,
                                152
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        96,
                                        142,
                                        176,
                                        152
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                96,
                                                142,
                                                176,
                                                152
                                            ],
                                            "type": "text",
                                            "content": "'django.contrib.authenticated',"
                                        }
                                    ]
                                }
                            ],
                            "index": 4,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 4,
                    "sub_type": "code",
                    "guess_lang": "javascript"
                },
                {
                    "type": "code",
                    "bbox": [
                        96,
                        158,
                        180,
                        168
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                96,
                                158,
                                180,
                                168
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        96,
                                        158,
                                        180,
                                        168
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                96,
                                                158,
                                                180,
                                                168
                                            ],
                                            "type": "text",
                                            "content": "'django.contrib.messages',"
                                        }
                                    ]
                                }
                            ],
                            "index": 5,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 5,
                    "sub_type": "code",
                    "guess_lang": "javascript"
                },
                {
                    "type": "code",
                    "bbox": [
                        96,
                        174,
                        177,
                        183
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                96,
                                174,
                                177,
                                183
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        96,
                                        174,
                                        177,
                                        183
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                96,
                                                174,
                                                177,
                                                183
                                            ],
                                            "type": "text",
                                            "content": "'django.contrib(staticfiles',"
                                        }
                                    ]
                                }
                            ],
                            "index": 6,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 6,
                    "sub_type": "code",
                    "guess_lang": "javascript"
                },
                {
                    "bbox": [
                        87,
                        189,
                        312,
                        199
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                189,
                                313,
                                200
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        189,
                                        313,
                                        200
                                    ],
                                    "type": "text",
                                    "content": ")django.contrib 是一套庞大的功能集，它是 Django 基本代码的组成部分。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        212,
                        171,
                        228
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                87,
                                212,
                                173,
                                230
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        212,
                                        173,
                                        230
                                    ],
                                    "type": "text",
                                    "content": "激活管理工具",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        241,
                        320,
                        251
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                242,
                                320,
                                250
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        242,
                                        320,
                                        250
                                    ],
                                    "type": "text",
                                    "content": "通常我们在生成项目时会在urls.py 中自动设置好，我们只需去掉注释即可。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        256,
                        142,
                        266
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                257,
                                143,
                                266
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        257,
                                        143,
                                        266
                                    ],
                                    "type": "text",
                                    "content": "配置项如下所示：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        87,
                        272,
                        218,
                        282
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                87,
                                272,
                                218,
                                282
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        87,
                                        272,
                                        218,
                                        282
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                87,
                                                272,
                                                218,
                                                282
                                            ],
                                            "type": "text",
                                            "content": "/HelloWorld/HelloWorld/url.py文件代码："
                                        }
                                    ]
                                }
                            ],
                            "index": 11,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 11,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "type": "code",
                    "bbox": [
                        88,
                        288,
                        117,
                        297
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                88,
                                288,
                                117,
                                297
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        288,
                                        117,
                                        297
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                288,
                                                117,
                                                297
                                            ],
                                            "type": "text",
                                            "content": "urls.py"
                                        }
                                    ]
                                }
                            ],
                            "index": 12,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 12,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "type": "code",
                    "bbox": [
                        88,
                        303,
                        186,
                        312
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                88,
                                303,
                                186,
                                312
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        303,
                                        186,
                                        312
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                303,
                                                186,
                                                312
                                            ],
                                            "type": "text",
                                            "content": "from django.conf.urls import url"
                                        }
                                    ]
                                }
                            ],
                            "index": 13,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 13,
                    "sub_type": "code",
                    "guess_lang": "python"
                },
                {
                    "type": "code",
                    "bbox": [
                        88,
                        318,
                        192,
                        328
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                88,
                                318,
                                192,
                                328
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        318,
                                        192,
                                        328
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                318,
                                                192,
                                                328
                                            ],
                                            "type": "text",
                                            "content": "from django.contrib import admin"
                                        }
                                    ]
                                }
                            ],
                            "index": 14,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 14,
                    "sub_type": "code",
                    "guess_lang": "python"
                },
                {
                    "type": "code",
                    "bbox": [
                        88,
                        334,
                        133,
                        344
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                88,
                                334,
                                133,
                                344
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        334,
                                        133,
                                        344
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                334,
                                                133,
                                                344
                                            ],
                                            "type": "text",
                                            "content": "urlpatterns "
                                        },
                                        {
                                            "bbox": [
                                                88,
                                                334,
                                                133,
                                                344
                                            ],
                                            "type": "inline_equation",
                                            "content": "="
                                        },
                                        {
                                            "bbox": [
                                                88,
                                                334,
                                                133,
                                                344
                                            ],
                                            "type": "text",
                                            "content": " ["
                                        }
                                    ]
                                }
                            ],
                            "index": 15,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 15,
                    "sub_type": "algorithm"
                },
                {
                    "type": "code",
                    "bbox": [
                        96,
                        349,
                        190,
                        359
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                96,
                                349,
                                190,
                                359
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        96,
                                        349,
                                        190,
                                        359
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                96,
                                                349,
                                                190,
                                                359
                                            ],
                                            "type": "text",
                                            "content": "url(r'^admin\"', admin.site.url),"
                                        }
                                    ]
                                }
                            ],
                            "index": 16,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 16,
                    "sub_type": "code",
                    "guess_lang": "javascript"
                },
                {
                    "type": "code",
                    "bbox": [
                        88,
                        366,
                        93,
                        375
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                88,
                                366,
                                93,
                                375
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        366,
                                        93,
                                        375
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                366,
                                                93,
                                                375
                                            ],
                                            "type": "text",
                                            "content": "]"
                                        }
                                    ]
                                }
                            ],
                            "index": 17,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 17,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "bbox": [
                        88,
                        380,
                        257,
                        391
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                381,
                                257,
                                391
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        381,
                                        257,
                                        391
                                    ],
                                    "type": "text",
                                    "content": "当这一切都配置好后，Django 管理工具就可以运行了。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        396,
                        348,
                        407
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                396,
                                348,
                                407
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        396,
                                        348,
                                        407
                                    ],
                                    "type": "text",
                                    "content": "你可以通过命令 python manage.py createsuperuser 来创建超级用户，如下所示：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        88,
                        412,
                        207,
                        423
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                88,
                                412,
                                207,
                                423
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        412,
                                        207,
                                        423
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                412,
                                                207,
                                                423
                                            ],
                                            "type": "text",
                                            "content": "python manage.py createsuperuser"
                                        }
                                    ]
                                }
                            ],
                            "index": 20,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 20,
                    "sub_type": "code",
                    "guess_lang": "batch"
                },
                {
                    "type": "code",
                    "bbox": [
                        88,
                        428,
                        224,
                        438
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                88,
                                428,
                                224,
                                438
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        428,
                                        224,
                                        438
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                428,
                                                224,
                                                438
                                            ],
                                            "type": "text",
                                            "content": "Username (leave blank to use 'root'): admin"
                                        }
                                    ]
                                }
                            ],
                            "index": 21,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 21,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "type": "code",
                    "bbox": [
                        88,
                        444,
                        201,
                        453
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                88,
                                444,
                                201,
                                453
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        444,
                                        201,
                                        453
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                444,
                                                201,
                                                453
                                            ],
                                            "type": "text",
                                            "content": "Email address: admin@runoob.com"
                                        }
                                    ]
                                }
                            ],
                            "index": 22,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 22,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "type": "code",
                    "bbox": [
                        88,
                        460,
                        122,
                        468
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                88,
                                460,
                                122,
                                468
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        460,
                                        122,
                                        468
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                460,
                                                122,
                                                468
                                            ],
                                            "type": "text",
                                            "content": "Password:"
                                        }
                                    ]
                                }
                            ],
                            "index": 23,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 23,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "type": "code",
                    "bbox": [
                        88,
                        475,
                        146,
                        485
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                88,
                                475,
                                146,
                                485
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        475,
                                        146,
                                        485
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                475,
                                                146,
                                                485
                                            ],
                                            "type": "text",
                                            "content": "Password (again):"
                                        }
                                    ]
                                }
                            ],
                            "index": 24,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 24,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "type": "code",
                    "bbox": [
                        88,
                        490,
                        189,
                        500
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                88,
                                490,
                                189,
                                500
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        490,
                                        189,
                                        500
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                490,
                                                189,
                                                500
                                            ],
                                            "type": "text",
                                            "content": "Superuser created successfully."
                                        }
                                    ]
                                }
                            ],
                            "index": 25,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 25,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "type": "code",
                    "bbox": [
                        88,
                        506,
                        168,
                        516
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                88,
                                506,
                                168,
                                516
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        506,
                                        168,
                                        516
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                506,
                                                168,
                                                516
                                            ],
                                            "type": "text",
                                            "content": "[root@solar HelloWorld]#"
                                        }
                                    ]
                                }
                            ],
                            "index": 26,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 26,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "bbox": [
                        88,
                        529,
                        144,
                        544
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 27,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                528,
                                145,
                                547
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        528,
                                        145,
                                        547
                                    ],
                                    "type": "text",
                                    "content": "复杂模型",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        557,
                        275,
                        567
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 28,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                558,
                                275,
                                567
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        558,
                                        275,
                                        567
                                    ],
                                    "type": "text",
                                    "content": "管理页面的功能强大，完全有能力处理更加复杂的数据模型。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        88,
                        573,
                        200,
                        583
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                88,
                                573,
                                200,
                                583
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        573,
                                        200,
                                        583
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                573,
                                                200,
                                                583
                                            ],
                                            "type": "text",
                                            "content": "django-admin.py startproject app01"
                                        }
                                    ]
                                }
                            ],
                            "index": 29,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 29,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "bbox": [
                        88,
                        588,
                        285,
                        598
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 30,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                588,
                                286,
                                599
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        588,
                                        286,
                                        599
                                    ],
                                    "type": "text",
                                    "content": "接下来在 settings.py 中找到 INSTALLED_APPS 这一项，如下：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        88,
                        604,
                        161,
                        613
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                88,
                                604,
                                161,
                                613
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        604,
                                        161,
                                        613
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                604,
                                                161,
                                                613
                                            ],
                                            "type": "text",
                                            "content": "INSTALLED_APPS = ("
                                        }
                                    ]
                                }
                            ],
                            "index": 31,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 31,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "type": "code",
                    "bbox": [
                        96,
                        620,
                        167,
                        629
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                96,
                                620,
                                167,
                                629
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        96,
                                        620,
                                        167,
                                        629
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                96,
                                                620,
                                                167,
                                                629
                                            ],
                                            "type": "text",
                                            "content": "'django.contrib_admin',"
                                        }
                                    ]
                                }
                            ],
                            "index": 32,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 32,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "type": "code",
                    "bbox": [
                        96,
                        635,
                        162,
                        645
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                96,
                                635,
                                162,
                                645
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        96,
                                        635,
                                        162,
                                        645
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                96,
                                                635,
                                                162,
                                                645
                                            ],
                                            "type": "text",
                                            "content": "'django.contrib.auth',"
                                        }
                                    ]
                                }
                            ],
                            "index": 33,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 33,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "type": "code",
                    "bbox": [
                        96,
                        650,
                        188,
                        661
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                96,
                                650,
                                188,
                                661
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        96,
                                        650,
                                        188,
                                        661
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                96,
                                                650,
                                                188,
                                                661
                                            ],
                                            "type": "text",
                                            "content": "'django.contrib.contenttypes',"
                                        }
                                    ]
                                }
                            ],
                            "index": 34,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 34,
                    "sub_type": "code",
                    "guess_lang": "python"
                },
                {
                    "type": "code",
                    "bbox": [
                        96,
                        666,
                        176,
                        677
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                96,
                                666,
                                176,
                                677
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        96,
                                        666,
                                        176,
                                        677
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                96,
                                                666,
                                                176,
                                                677
                                            ],
                                            "type": "text",
                                            "content": "'django.contribsessions',"
                                        }
                                    ]
                                }
                            ],
                            "index": 35,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 35,
                    "sub_type": "code",
                    "guess_lang": "javascript"
                },
                {
                    "type": "code",
                    "bbox": [
                        96,
                        682,
                        180,
                        692
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                96,
                                682,
                                180,
                                692
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        96,
                                        682,
                                        180,
                                        692
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                96,
                                                682,
                                                180,
                                                692
                                            ],
                                            "type": "text",
                                            "content": "'django.contrib.messages',"
                                        }
                                    ]
                                }
                            ],
                            "index": 36,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 36,
                    "sub_type": "code",
                    "guess_lang": "javascript"
                },
                {
                    "type": "code",
                    "bbox": [
                        96,
                        698,
                        177,
                        707
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                96,
                                698,
                                177,
                                707
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        96,
                                        698,
                                        177,
                                        707
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                96,
                                                698,
                                                177,
                                                707
                                            ],
                                            "type": "text",
                                            "content": "'django.contrib(staticfiles',"
                                        }
                                    ]
                                }
                            ],
                            "index": 37,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 37,
                    "sub_type": "code",
                    "guess_lang": "javascript"
                },
                {
                    "type": "code",
                    "bbox": [
                        96,
                        713,
                        196,
                        723
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                96,
                                713,
                                196,
                                723
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        96,
                                        713,
                                        196,
                                        723
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                96,
                                                713,
                                                196,
                                                723
                                            ],
                                            "type": "text",
                                            "content": "'testmodel', # 添加此项"
                                        }
                                    ]
                                }
                            ],
                            "index": 38,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 38,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "type": "code",
                    "bbox": [
                        88,
                        729,
                        93,
                        739
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                88,
                                729,
                                93,
                                739
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        729,
                                        93,
                                        739
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                729,
                                                93,
                                                739
                                            ],
                                            "type": "text",
                                            "content": "）"
                                        }
                                    ]
                                }
                            ],
                            "index": 39,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 39,
                    "sub_type": "code",
                    "guess_lang": "txt"
                }
            ],
            "discarded_blocks": [],
            "page_size": [
                595,
                841
            ],
            "page_idx": 30
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        88,
                        85,
                        119,
                        101
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                86,
                                83,
                                121,
                                104
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        86,
                                        83,
                                        121,
                                        104
                                    ],
                                    "type": "text",
                                    "content": "建表",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        137,
                        268,
                        148
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                138,
                                267,
                                147
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        138,
                                        267,
                                        147
                                    ],
                                    "type": "text",
                                    "content": "先在 TestModel/models.py 中增加一个更复杂的数据模型：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        153,
                        227,
                        163
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                153,
                                227,
                                163
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        153,
                                        227,
                                        163
                                    ],
                                    "type": "text",
                                    "content": "HelloWorld/TestModel/models.py: 文件代码：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        168,
                        183,
                        179
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                169,
                                183,
                                179
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        169,
                                        183,
                                        179
                                    ],
                                    "type": "text",
                                    "content": "from django.db import models",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        200,
                        176,
                        210
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                200,
                                176,
                                210
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        200,
                                        176,
                                        210
                                    ],
                                    "type": "text",
                                    "content": "# Create your models here.",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        215,
                        171,
                        225
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                214,
                                171,
                                225
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        214,
                                        171,
                                        225
                                    ],
                                    "type": "text",
                                    "content": "class Test(models.Model):",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        96,
                        230,
                        231,
                        241
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                96,
                                230,
                                231,
                                241
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        96,
                                        230,
                                        231,
                                        241
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                96,
                                                230,
                                                231,
                                                241
                                            ],
                                            "type": "text",
                                            "content": "name = models.CharField(max_length=20)"
                                        }
                                    ]
                                }
                            ],
                            "index": 6,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 6,
                    "sub_type": "code",
                    "guess_lang": "python"
                },
                {
                    "bbox": [
                        88,
                        262,
                        183,
                        272
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                260,
                                183,
                                272
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        260,
                                        183,
                                        272
                                    ],
                                    "type": "text",
                                    "content": "class Contact(models.Model):",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        96,
                        277,
                        239,
                        287
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                96,
                                277,
                                239,
                                287
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        96,
                                        277,
                                        239,
                                        287
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                96,
                                                277,
                                                239,
                                                287
                                            ],
                                            "type": "text",
                                            "content": "name "
                                        },
                                        {
                                            "bbox": [
                                                96,
                                                277,
                                                239,
                                                287
                                            ],
                                            "type": "inline_equation",
                                            "content": "="
                                        },
                                        {
                                            "bbox": [
                                                96,
                                                277,
                                                239,
                                                287
                                            ],
                                            "type": "text",
                                            "content": " models.CharField(max_length=200)"
                                        }
                                    ]
                                }
                            ],
                            "index": 8,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 8,
                    "sub_type": "algorithm"
                },
                {
                    "type": "code",
                    "bbox": [
                        96,
                        293,
                        218,
                        303
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                96,
                                293,
                                218,
                                303
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        96,
                                        293,
                                        218,
                                        303
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                96,
                                                293,
                                                218,
                                                303
                                            ],
                                            "type": "text",
                                            "content": "age "
                                        },
                                        {
                                            "bbox": [
                                                96,
                                                293,
                                                218,
                                                303
                                            ],
                                            "type": "inline_equation",
                                            "content": "="
                                        },
                                        {
                                            "bbox": [
                                                96,
                                                293,
                                                218,
                                                303
                                            ],
                                            "type": "text",
                                            "content": " models.IntegerField(default=0)"
                                        }
                                    ]
                                }
                            ],
                            "index": 9,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 9,
                    "sub_type": "algorithm"
                },
                {
                    "type": "code",
                    "bbox": [
                        96,
                        309,
                        186,
                        318
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                96,
                                309,
                                186,
                                318
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        96,
                                        309,
                                        186,
                                        318
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                96,
                                                309,
                                                186,
                                                318
                                            ],
                                            "type": "text",
                                            "content": "email = models.EmailField()"
                                        }
                                    ]
                                }
                            ],
                            "index": 10,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 10,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "type": "code",
                    "bbox": [
                        96,
                        324,
                        167,
                        334
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                96,
                                324,
                                167,
                                334
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        96,
                                        324,
                                        167,
                                        334
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                96,
                                                324,
                                                167,
                                                334
                                            ],
                                            "type": "text",
                                            "content": "def __unicode__(self):"
                                        }
                                    ]
                                }
                            ],
                            "index": 11,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 11,
                    "sub_type": "code",
                    "guess_lang": "python"
                },
                {
                    "type": "code",
                    "bbox": [
                        103,
                        340,
                        157,
                        349
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                103,
                                340,
                                157,
                                349
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        103,
                                        340,
                                        157,
                                        349
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                103,
                                                340,
                                                157,
                                                349
                                            ],
                                            "type": "text",
                                            "content": "return self.name"
                                        }
                                    ]
                                }
                            ],
                            "index": 12,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 12,
                    "sub_type": "code",
                    "guess_lang": "lua"
                },
                {
                    "bbox": [
                        88,
                        370,
                        170,
                        380
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                370,
                                170,
                                381
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        370,
                                        170,
                                        381
                                    ],
                                    "type": "text",
                                    "content": "class Tag(models.Model):",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        96,
                        386,
                        316,
                        396
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                96,
                                386,
                                316,
                                396
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        96,
                                        386,
                                        316,
                                        396
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                96,
                                                386,
                                                316,
                                                396
                                            ],
                                            "type": "text",
                                            "content": "contact = models.FireignKey(Contact, on_delete=models.CASCADE,)"
                                        }
                                    ]
                                }
                            ],
                            "index": 14,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 14,
                    "sub_type": "code",
                    "guess_lang": "python"
                },
                {
                    "type": "code",
                    "bbox": [
                        96,
                        402,
                        236,
                        412
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                96,
                                402,
                                236,
                                412
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        96,
                                        402,
                                        236,
                                        412
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                96,
                                                402,
                                                236,
                                                412
                                            ],
                                            "type": "text",
                                            "content": "name "
                                        },
                                        {
                                            "bbox": [
                                                96,
                                                402,
                                                236,
                                                412
                                            ],
                                            "type": "inline_equation",
                                            "content": "="
                                        },
                                        {
                                            "bbox": [
                                                96,
                                                402,
                                                236,
                                                412
                                            ],
                                            "type": "text",
                                            "content": " models.CharField(max_length=50)"
                                        }
                                    ]
                                }
                            ],
                            "index": 15,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 15,
                    "sub_type": "algorithm"
                },
                {
                    "type": "code",
                    "bbox": [
                        96,
                        417,
                        167,
                        428
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                96,
                                417,
                                167,
                                428
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        96,
                                        417,
                                        167,
                                        428
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                96,
                                                417,
                                                167,
                                                428
                                            ],
                                            "type": "text",
                                            "content": "def __unicode__(self):"
                                        }
                                    ]
                                }
                            ],
                            "index": 16,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 16,
                    "sub_type": "code",
                    "guess_lang": "python"
                },
                {
                    "type": "code",
                    "bbox": [
                        103,
                        433,
                        157,
                        442
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                103,
                                433,
                                157,
                                442
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        103,
                                        433,
                                        157,
                                        442
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                103,
                                                433,
                                                157,
                                                442
                                            ],
                                            "type": "text",
                                            "content": "return self.name"
                                        }
                                    ]
                                }
                            ],
                            "index": 17,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 17,
                    "sub_type": "code",
                    "guess_lang": "lua"
                },
                {
                    "bbox": [
                        88,
                        449,
                        321,
                        460
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                448,
                                322,
                                460
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        448,
                                        322,
                                        460
                                    ],
                                    "type": "text",
                                    "content": "这里有两个表。Tag 以 Contact 为外部键。一个 Contact 可以对应多个 Tag。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        480,
                        344,
                        491
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                481,
                                343,
                                490
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        481,
                                        343,
                                        490
                                    ],
                                    "type": "text",
                                    "content": "我们还可以看到许多在之前没有见过的属性类型，比如 IntegerField 用于存储整数。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        514,
                        201,
                        533
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                86,
                                513,
                                202,
                                534
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        86,
                                        513,
                                        202,
                                        534
                                    ],
                                    "type": "text",
                                    "content": "用 django 创建表",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        567,
                        226,
                        577
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 21,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                567,
                                226,
                                576
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        567,
                                        226,
                                        576
                                    ],
                                    "type": "text",
                                    "content": "$ python manage.py migrate # 创建表结构",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        582,
                        319,
                        592
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 22,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                582,
                                319,
                                592
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        582,
                                        319,
                                        592
                                    ],
                                    "type": "text",
                                    "content": "python manage.py makemigrations testmodel 让模型知道我们的表有变更",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        597,
                        243,
                        608
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 23,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                598,
                                243,
                                608
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        598,
                                        243,
                                        608
                                    ],
                                    "type": "text",
                                    "content": "python manage.py migrate TestModel 创建表结构",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        613,
                        349,
                        624
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 24,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                613,
                                351,
                                624
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        613,
                                        351,
                                        624
                                    ],
                                    "type": "text",
                                    "content": "接下来我们在 app01 项目里添加 views.py 和 models.py 文件，app01 项目目录结构：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        629,
                        110,
                        639
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 25,
                    "lines": [
                        {
                            "bbox": [
                                87,
                                629,
                                110,
                                639
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        629,
                                        110,
                                        639
                                    ],
                                    "type": "text",
                                    "content": "app01",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        645,
                        117,
                        654
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 26,
                    "lines": [
                        {
                            "bbox": [
                                86,
                                644,
                                119,
                                655
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        86,
                                        644,
                                        119,
                                        655
                                    ],
                                    "type": "text",
                                    "content": "|-- app01",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        661,
                        141,
                        671
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 27,
                    "lines": [
                        {
                            "bbox": [
                                87,
                                659,
                                142,
                                671
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        659,
                                        142,
                                        671
                                    ],
                                    "type": "text",
                                    "content": "| |-- __init__.py",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        676,
                        148,
                        686
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 28,
                    "lines": [
                        {
                            "bbox": [
                                86,
                                674,
                                149,
                                687
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        86,
                                        674,
                                        149,
                                        687
                                    ],
                                    "type": "text",
                                    "content": "| |-- __pycache__",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        692,
                        129,
                        701
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 29,
                    "lines": [
                        {
                            "bbox": [
                                87,
                                690,
                                130,
                                703
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        690,
                                        130,
                                        703
                                    ],
                                    "type": "text",
                                    "content": "| |-- asgi.py",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        707,
                        139,
                        717
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 30,
                    "lines": [
                        {
                            "bbox": [
                                87,
                                706,
                                140,
                                717
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        706,
                                        140,
                                        717
                                    ],
                                    "type": "text",
                                    "content": "| |-- migrations",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        723,
                        139,
                        732
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 31,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                721,
                                139,
                                734
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        721,
                                        139,
                                        734
                                    ],
                                    "type": "text",
                                    "content": "| |-- models.py",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        738,
                        140,
                        748
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 32,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                737,
                                141,
                                749
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        737,
                                        141,
                                        749
                                    ],
                                    "type": "text",
                                    "content": "| |-- settings.py",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [],
            "page_size": [
                595,
                841
            ],
            "page_idx": 31
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        87,
                        80,
                        133,
                        121
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 3,
                    "blocks": [
                        {
                            "bbox": [
                                87,
                                80,
                                127,
                                89
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 0,
                            "lines": [
                                {
                                    "bbox": [
                                        87,
                                        79,
                                        129,
                                        92
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                87,
                                                79,
                                                129,
                                                92
                                            ],
                                            "type": "text",
                                            "content": "| |-- urls.py",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                95,
                                133,
                                105
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 1,
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        95,
                                        135,
                                        106
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                95,
                                                135,
                                                106
                                            ],
                                            "type": "text",
                                            "content": "| |-- views.py",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                111,
                                130,
                                121
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 2,
                            "lines": [
                                {
                                    "bbox": [
                                        87,
                                        109,
                                        132,
                                        123
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                87,
                                                109,
                                                132,
                                                123
                                            ],
                                            "type": "text",
                                            "content": "| `-- wsgi.py",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        88,
                        162,
                        146,
                        178
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                161,
                                147,
                                179
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        161,
                                        147,
                                        179
                                    ],
                                    "type": "text",
                                    "content": "显示模型",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        212,
                        292,
                        226
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                211,
                                293,
                                226
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        211,
                                        293,
                                        226
                                    ],
                                    "type": "text",
                                    "content": "在 TestModel/admin.py 注册多个模型并显示：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        244,
                        224,
                        254
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                245,
                                224,
                                255
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        245,
                                        224,
                                        255
                                    ],
                                    "type": "text",
                                    "content": "HelloWorld/TestModel/admin.py: 文件代码：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        260,
                        192,
                        269
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                260,
                                193,
                                271
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        260,
                                        193,
                                        271
                                    ],
                                    "type": "text",
                                    "content": "from django.contrib import admin",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        276,
                        238,
                        285
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                275,
                                238,
                                287
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        275,
                                        238,
                                        287
                                    ],
                                    "type": "text",
                                    "content": "from TestModel.models import Test,Contact,Tag",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        307,
                        180,
                        317
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                307,
                                180,
                                317
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        307,
                                        180,
                                        317
                                    ],
                                    "type": "text",
                                    "content": "# Register your models here.",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        322,
                        211,
                        333
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                322,
                                212,
                                333
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        322,
                                        212,
                                        333
                                    ],
                                    "type": "text",
                                    "content": "admin.site.register([Test, Contact, Tag])",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        357,
                        277,
                        374
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                356,
                                278,
                                375
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        356,
                                        278,
                                        375
                                    ],
                                    "type": "text",
                                    "content": "每个栏也可以定义自己的格式。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        409,
                        180,
                        419
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                409,
                                180,
                                419
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        409,
                                        180,
                                        419
                                    ],
                                    "type": "text",
                                    "content": "修改 TestModel/admin.py 为：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        440,
                        223,
                        450
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                440,
                                224,
                                450
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        440,
                                        224,
                                        450
                                    ],
                                    "type": "text",
                                    "content": "HelloWorld/TestModel/admin.py: 文件代码：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        456,
                        192,
                        465
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                456,
                                193,
                                466
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        456,
                                        193,
                                        466
                                    ],
                                    "type": "text",
                                    "content": "from django.contrib import admin",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        471,
                        238,
                        481
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                470,
                                238,
                                482
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        470,
                                        238,
                                        482
                                    ],
                                    "type": "text",
                                    "content": "from TestModel.models import Test,Contact,Tag",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        502,
                        180,
                        512
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                503,
                                180,
                                513
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        503,
                                        180,
                                        513
                                    ],
                                    "type": "text",
                                    "content": "# Register your models here.",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        518,
                        218,
                        528
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 17,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                518,
                                219,
                                528
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        518,
                                        219,
                                        528
                                    ],
                                    "type": "text",
                                    "content": "class ContactAdmin(admin.ModelAdmin):",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        87,
                        534,
                        203,
                        667
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                87,
                                534,
                                203,
                                667
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        87,
                                        534,
                                        203,
                                        667
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                87,
                                                534,
                                                203,
                                                667
                                            ],
                                            "type": "text",
                                            "content": "fieldsets = (\n    ['Main', {\n        'fields': ('name', 'email'),\n    }],\n    ['Advance', {\n        'classes': ('collapse'), # CSS\n        'fields': ('age'), }\n    }])"
                                        }
                                    ]
                                }
                            ],
                            "index": 18,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 18,
                    "sub_type": "code",
                    "guess_lang": "python"
                },
                {
                    "bbox": [
                        87,
                        690,
                        224,
                        699
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                689,
                                224,
                                699
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        689,
                                        224,
                                        699
                                    ],
                                    "type": "text",
                                    "content": "admin.site.register(Contact, ContactAdmin)",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        705,
                        184,
                        714
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                704,
                                185,
                                716
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        704,
                                        185,
                                        716
                                    ],
                                    "type": "text",
                                    "content": "admin.site.register([Test, Tag])",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        720,
                        440,
                        730
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 21,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                721,
                                440,
                                730
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        721,
                                        440,
                                        730
                                    ],
                                    "type": "text",
                                    "content": "上面的栏目分为了Main 和Advance 两部分。classes 说明它所在的部分的CSS 格式。这里让Advance 部分隐藏：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [],
            "page_size": [
                595,
                841
            ],
            "page_idx": 32
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        88,
                        85,
                        196,
                        103
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                83,
                                199,
                                105
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        83,
                                        199,
                                        105
                                    ],
                                    "type": "text",
                                    "content": "内联(Inline)显示",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        137,
                        268,
                        147
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                90,
                                138,
                                268,
                                147
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        90,
                                        138,
                                        268,
                                        147
                                    ],
                                    "type": "text",
                                    "content": "上面的Contact 是Tag 的外部键，所以有外部参考的关系。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        153,
                        504,
                        177
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                153,
                                505,
                                162
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        153,
                                        505,
                                        162
                                    ],
                                    "type": "text",
                                    "content": "而在默认的页面显示中，将两者分离开来，无法体现出两者的从属关系。我们可以使用内联显示，让 Tag 附加在Contact 的编辑页面上",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                168,
                                109,
                                179
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        168,
                                        109,
                                        179
                                    ],
                                    "type": "text",
                                    "content": "显示。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        185,
                        170,
                        193
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                184,
                                172,
                                194
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        184,
                                        172,
                                        194
                                    ],
                                    "type": "text",
                                    "content": "修改 TestModel/admin.py：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        200,
                        230,
                        209
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                200,
                                231,
                                210
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        200,
                                        231,
                                        210
                                    ],
                                    "type": "text",
                                    "content": "HelloWorld/TestModel/admin.py: 文件代码：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        215,
                        192,
                        223
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                215,
                                193,
                                225
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        215,
                                        193,
                                        225
                                    ],
                                    "type": "text",
                                    "content": "from django.contrib import admin",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        231,
                        238,
                        239
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                230,
                                238,
                                241
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        230,
                                        238,
                                        241
                                    ],
                                    "type": "text",
                                    "content": "from TestModel.models import Test,Contact,Tag",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        262,
                        179,
                        270
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                263,
                                180,
                                271
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        263,
                                        180,
                                        271
                                    ],
                                    "type": "text",
                                    "content": "# Register your models here.",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        277,
                        202,
                        285
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                277,
                                204,
                                287
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        277,
                                        204,
                                        287
                                    ],
                                    "type": "text",
                                    "content": "class TagInline(admin.TabularInline):",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        96,
                        294,
                        135,
                        302
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                95,
                                292,
                                138,
                                304
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        95,
                                        292,
                                        138,
                                        304
                                    ],
                                    "type": "text",
                                    "content": "model = Tag",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        324,
                        218,
                        333
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                324,
                                218,
                                334
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        324,
                                        218,
                                        334
                                    ],
                                    "type": "text",
                                    "content": "class ContactAdmin(admin.ModelAdmin):",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        96,
                        340,
                        183,
                        349
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                96,
                                340,
                                185,
                                349
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        96,
                                        340,
                                        117,
                                        349
                                    ],
                                    "type": "text",
                                    "content": "inlines",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        117,
                                        341,
                                        124,
                                        348
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.68
                                },
                                {
                                    "bbox": [
                                        124,
                                        340,
                                        185,
                                        349
                                    ],
                                    "type": "text",
                                    "content": "[TagInline] # Inline",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        96,
                        355,
                        134,
                        364
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                95,
                                354,
                                136,
                                365
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        95,
                                        354,
                                        136,
                                        365
                                    ],
                                    "type": "text",
                                    "content": "fieldsets = (",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        104,
                        371,
                        129,
                        380
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                102,
                                370,
                                132,
                                382
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        102,
                                        370,
                                        132,
                                        382
                                    ],
                                    "type": "text",
                                    "content": "['Main',{",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        111,
                        387,
                        182,
                        396
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                111,
                                386,
                                183,
                                396
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        111,
                                        386,
                                        183,
                                        396
                                    ],
                                    "type": "text",
                                    "content": "'fields':('name','email'),",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        104,
                        403,
                        110,
                        411
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                104,
                                402,
                                111,
                                412
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        104,
                                        402,
                                        111,
                                        412
                                    ],
                                    "type": "text",
                                    "content": "}],",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        104,
                        417,
                        141,
                        426
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                103,
                                417,
                                143,
                                428
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        103,
                                        417,
                                        143,
                                        428
                                    ],
                                    "type": "text",
                                    "content": "['Advance',{",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        111,
                        433,
                        179,
                        443
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 17,
                    "lines": [
                        {
                            "bbox": [
                                111,
                                433,
                                181,
                                444
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        111,
                                        433,
                                        181,
                                        444
                                    ],
                                    "type": "text",
                                    "content": "'classes': ('collapse',),",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        112,
                        449,
                        159,
                        458
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                111,
                                448,
                                161,
                                460
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        111,
                                        448,
                                        161,
                                        460
                                    ],
                                    "type": "text",
                                    "content": "'fields': ('age',),",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        104,
                        465,
                        110,
                        473
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                104,
                                465,
                                111,
                                475
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        104,
                                        465,
                                        111,
                                        475
                                    ],
                                    "type": "text",
                                    "content": "}]",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        94,
                        496,
                        100,
                        504
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                96,
                                497,
                                101,
                                505
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        96,
                                        497,
                                        101,
                                        505
                                    ],
                                    "type": "text",
                                    "content": ")",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        527,
                        223,
                        536
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 21,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                526,
                                224,
                                537
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        526,
                                        224,
                                        537
                                    ],
                                    "type": "text",
                                    "content": "admin.site.register(Contact, ContactAdmin)",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        543,
                        168,
                        551
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 22,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                541,
                                169,
                                553
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        541,
                                        169,
                                        553
                                    ],
                                    "type": "text",
                                    "content": "admin.site.register([Test])",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        577,
                        216,
                        593
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 23,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                576,
                                217,
                                595
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        576,
                                        217,
                                        595
                                    ],
                                    "type": "text",
                                    "content": "自定义该页面的显示",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        629,
                        338,
                        639
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 24,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                629,
                                337,
                                639
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        629,
                                        337,
                                        639
                                    ],
                                    "type": "text",
                                    "content": "比如在列表中显示更多的栏目，只需要在 ContactAdmin 中增加 list_display 属性:",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        661,
                        223,
                        669
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 25,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                660,
                                224,
                                670
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        660,
                                        224,
                                        670
                                    ],
                                    "type": "text",
                                    "content": "HelloWorld/TestModel/admin.py: 文件代码：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        677,
                        192,
                        684
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 26,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                677,
                                193,
                                685
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        677,
                                        193,
                                        685
                                    ],
                                    "type": "text",
                                    "content": "from django.contrib import admin",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        692,
                        237,
                        700
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 27,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                689,
                                238,
                                703
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        689,
                                        238,
                                        703
                                    ],
                                    "type": "text",
                                    "content": "from TestModel.models import Test,Contact,Tag",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        723,
                        179,
                        731
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 28,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                723,
                                180,
                                731
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        723,
                                        180,
                                        731
                                    ],
                                    "type": "text",
                                    "content": "# Register your models here.",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        738,
                        202,
                        747
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 29,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                738,
                                204,
                                749
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        738,
                                        204,
                                        749
                                    ],
                                    "type": "text",
                                    "content": "class TagInline(admin.TabularInline):",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [],
            "page_size": [
                595,
                841
            ],
            "page_idx": 33
        },
        {
            "para_blocks": [
                {
                    "type": "code",
                    "bbox": [
                        88,
                        79,
                        223,
                        356
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                88,
                                79,
                                223,
                                356
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        79,
                                        223,
                                        356
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                79,
                                                223,
                                                356
                                            ],
                                            "type": "text",
                                            "content": "model "
                                        },
                                        {
                                            "bbox": [
                                                88,
                                                79,
                                                223,
                                                356
                                            ],
                                            "type": "inline_equation",
                                            "content": "="
                                        },
                                        {
                                            "bbox": [
                                                88,
                                                79,
                                                223,
                                                356
                                            ],
                                            "type": "text",
                                            "content": " Tag   \nclass ContactAdmin(admin.ModelAdmin): list_display "
                                        },
                                        {
                                            "bbox": [
                                                88,
                                                79,
                                                223,
                                                356
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\equiv"
                                        },
                                        {
                                            "bbox": [
                                                88,
                                                79,
                                                223,
                                                356
                                            ],
                                            "type": "text",
                                            "content": " ('name','age'，'email')#list inlines "
                                        },
                                        {
                                            "bbox": [
                                                88,
                                                79,
                                                223,
                                                356
                                            ],
                                            "type": "inline_equation",
                                            "content": "="
                                        },
                                        {
                                            "bbox": [
                                                88,
                                                79,
                                                223,
                                                356
                                            ],
                                            "type": "text",
                                            "content": " [TagInline] # Inline fieldsets "
                                        },
                                        {
                                            "bbox": [
                                                88,
                                                79,
                                                223,
                                                356
                                            ],
                                            "type": "inline_equation",
                                            "content": "="
                                        },
                                        {
                                            "bbox": [
                                                88,
                                                79,
                                                223,
                                                356
                                            ],
                                            "type": "text",
                                            "content": " ( ['Main',{ 'fields':('name','email'), }], ['Advance',{ 'classes':('collapse'), 'fields':('age'), }]}   \n）   \nadmin.site.register(Contact,ContactAdmin)   \nadmin.site.register([Test])"
                                        }
                                    ]
                                }
                            ],
                            "index": 0,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 0,
                    "sub_type": "algorithm"
                },
                {
                    "bbox": [
                        88,
                        380,
                        147,
                        396
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                86,
                                378,
                                148,
                                399
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        86,
                                        378,
                                        148,
                                        399
                                    ],
                                    "type": "text",
                                    "content": "搜索功能",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        432,
                        207,
                        442
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                433,
                                207,
                                441
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        433,
                                        207,
                                        441
                                    ],
                                    "type": "text",
                                    "content": "search_fields 为该列表页增加搜索栏：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        88,
                        463,
                        238,
                        505
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                88,
                                463,
                                238,
                                505
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        463,
                                        238,
                                        505
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                463,
                                                238,
                                                505
                                            ],
                                            "type": "text",
                                            "content": "HelloWorld/TestModel/admin.py:文件代码：  \nfrom django.contrib import admin  \nfrom TestModel.models import Test,Contact,Tag"
                                        }
                                    ]
                                }
                            ],
                            "index": 3,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 3,
                    "sub_type": "code",
                    "guess_lang": "python"
                },
                {
                    "type": "code",
                    "bbox": [
                        88,
                        524,
                        221,
                        753
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                88,
                                524,
                                221,
                                753
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        524,
                                        221,
                                        753
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                524,
                                                221,
                                                753
                                            ],
                                            "type": "text",
                                            "content": "# Register your models here.   \nclass TagInline(admin.TabularInline): model "
                                        },
                                        {
                                            "bbox": [
                                                88,
                                                524,
                                                221,
                                                753
                                            ],
                                            "type": "inline_equation",
                                            "content": "="
                                        },
                                        {
                                            "bbox": [
                                                88,
                                                524,
                                                221,
                                                753
                                            ],
                                            "type": "text",
                                            "content": " Tag   \nclass ContactAdmin(admin.ModelAdmin): list_display "
                                        },
                                        {
                                            "bbox": [
                                                88,
                                                524,
                                                221,
                                                753
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\equiv"
                                        },
                                        {
                                            "bbox": [
                                                88,
                                                524,
                                                221,
                                                753
                                            ],
                                            "type": "text",
                                            "content": " ('name','age'，'email') #list search_fields "
                                        },
                                        {
                                            "bbox": [
                                                88,
                                                524,
                                                221,
                                                753
                                            ],
                                            "type": "inline_equation",
                                            "content": "="
                                        },
                                        {
                                            "bbox": [
                                                88,
                                                524,
                                                221,
                                                753
                                            ],
                                            "type": "text",
                                            "content": " ('name') inlines "
                                        },
                                        {
                                            "bbox": [
                                                88,
                                                524,
                                                221,
                                                753
                                            ],
                                            "type": "inline_equation",
                                            "content": "="
                                        },
                                        {
                                            "bbox": [
                                                88,
                                                524,
                                                221,
                                                753
                                            ],
                                            "type": "text",
                                            "content": " [TagInline] # Inline fieldsets "
                                        },
                                        {
                                            "bbox": [
                                                88,
                                                524,
                                                221,
                                                753
                                            ],
                                            "type": "inline_equation",
                                            "content": "="
                                        },
                                        {
                                            "bbox": [
                                                88,
                                                524,
                                                221,
                                                753
                                            ],
                                            "type": "text",
                                            "content": " ( ['Main',{ 'fields':('name','email'), }], ['Advance',{ 'classes':('collapse'), 'fields':('age'),"
                                        }
                                    ]
                                }
                            ],
                            "index": 4,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 4,
                    "sub_type": "algorithm"
                }
            ],
            "discarded_blocks": [],
            "page_size": [
                595,
                841
            ],
            "page_idx": 34
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        104,
                        81,
                        110,
                        89
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                104,
                                80,
                                111,
                                91
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        104,
                                        80,
                                        111,
                                        91
                                    ],
                                    "type": "text",
                                    "content": "}]",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        96,
                        111,
                        100,
                        120
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                95,
                                114,
                                101,
                                120
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        95,
                                        114,
                                        101,
                                        120
                                    ],
                                    "type": "text",
                                    "content": ")",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        142,
                        224,
                        152
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                142,
                                224,
                                153
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        142,
                                        224,
                                        153
                                    ],
                                    "type": "text",
                                    "content": "admin.site.register(Contact, ContactAdmin)",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        158,
                        168,
                        167
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                157,
                                169,
                                169
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        157,
                                        169,
                                        169
                                    ],
                                    "type": "text",
                                    "content": "admin.site.register([Test])",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        174,
                        500,
                        184
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                174,
                                500,
                                183
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        174,
                                        500,
                                        183
                                    ],
                                    "type": "text",
                                    "content": "在 django2.0 后，定义外键和一对一关系的时候需要加 on_delete 选项，此参数为了避免两个表里的数据不一致问题，不然会报错：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        190,
                        334,
                        199
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                188,
                                336,
                                200
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        188,
                                        336,
                                        200
                                    ],
                                    "type": "text",
                                    "content": "TypeError: __init__() missing 1 required positional argument: 'on_delete'。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        205,
                        485,
                        214
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                205,
                                485,
                                215
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        205,
                                        485,
                                        215
                                    ],
                                    "type": "text",
                                    "content": "owner=models.ForeignKey(UserProfile,on_delete=models.CASCADE) --在老版本这个参数（models.CASCADE）是默认值参数",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        221,
                        403,
                        230
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                221,
                                404,
                                230
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        221,
                                        404,
                                        230
                                    ],
                                    "type": "text",
                                    "content": "说明：on_delete 有 CASCADE、PROTECT、SET_NULL、SET_DEFAULT、SET() 五个可选择的值。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        105,
                        236,
                        417,
                        308
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 13,
                    "blocks": [
                        {
                            "bbox": [
                                105,
                                236,
                                242,
                                246
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 8,
                            "lines": [
                                {
                                    "bbox": [
                                        126,
                                        236,
                                        243,
                                        246
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                126,
                                                236,
                                                243,
                                                246
                                            ],
                                            "type": "text",
                                            "content": "CASCADE：此值设置，是级联删除。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                251,
                                262,
                                261
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 9,
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        253,
                                        262,
                                        261
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                253,
                                                111,
                                                258
                                            ],
                                            "type": "text",
                                            "content": ".",
                                            "score": 0.861
                                        },
                                        {
                                            "bbox": [
                                                126,
                                                253,
                                                262,
                                                261
                                            ],
                                            "type": "text",
                                            "content": "PROTECT：此值设置，是会报完整性错误。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                267,
                                332,
                                277
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 10,
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        268,
                                        332,
                                        277
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                269,
                                                111,
                                                274
                                            ],
                                            "type": "text",
                                            "content": ".",
                                            "score": 0.9
                                        },
                                        {
                                            "bbox": [
                                                126,
                                                268,
                                                332,
                                                277
                                            ],
                                            "type": "text",
                                            "content": "SET_NULL：此值设置，会把外键设置为null，前提是允许为null。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                282,
                                299,
                                292
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 11,
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        282,
                                        299,
                                        292
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                285,
                                                111,
                                                289
                                            ],
                                            "type": "text",
                                            "content": ".",
                                            "score": 0.658
                                        },
                                        {
                                            "bbox": [
                                                126,
                                                282,
                                                299,
                                                292
                                            ],
                                            "type": "text",
                                            "content": "SET_DEFAULT：此值设置，会把设置为外键的默认值。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                298,
                                417,
                                308
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 12,
                            "lines": [
                                {
                                    "bbox": [
                                        126,
                                        298,
                                        418,
                                        308
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                126,
                                                298,
                                                418,
                                                308
                                            ],
                                            "type": "text",
                                            "content": "SET()：此值设置，会调用外面的值，可以是一个函数。一般情况下使用CASCADE 就可以了。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        88,
                        314,
                        248,
                        323
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                315,
                                248,
                                323
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        315,
                                        248,
                                        323
                                    ],
                                    "type": "text",
                                    "content": "如果你之前还未创建表结构，可使用以下命令创建：",
                                    "score": 0.996
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        329,
                        386,
                        339
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                329,
                                387,
                                339
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        329,
                                        387,
                                        339
                                    ],
                                    "type": "text",
                                    "content": "$ python manage.py makemigrations TestModel # 让 Django 知道我们在我们的模型有一些变更",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        345,
                        259,
                        355
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                345,
                                260,
                                355
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        345,
                                        260,
                                        355
                                    ],
                                    "type": "text",
                                    "content": "$ python manage.py migrate TestModel # 创建表结构",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        380,
                        159,
                        396
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 17,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                379,
                                161,
                                398
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        379,
                                        161,
                                        398
                                    ],
                                    "type": "text",
                                    "content": "数据库添加",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        432,
                        121,
                        441
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                433,
                                122,
                                441
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        433,
                                        122,
                                        441
                                    ],
                                    "type": "text",
                                    "content": "规则配置：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        463,
                        167,
                        472
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                463,
                                168,
                                473
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        463,
                                        168,
                                        473
                                    ],
                                    "type": "text",
                                    "content": "app01/urls.py: 文件代码：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        478,
                        192,
                        487
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                478,
                                193,
                                488
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        478,
                                        193,
                                        488
                                    ],
                                    "type": "text",
                                    "content": "from django.contrib import admin",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        494,
                        177,
                        503
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 21,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                493,
                                177,
                                504
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        493,
                                        177,
                                        504
                                    ],
                                    "type": "text",
                                    "content": "from django.urls import path",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        510,
                        149,
                        518
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 22,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                510,
                                149,
                                519
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        510,
                                        149,
                                        519
                                    ],
                                    "type": "text",
                                    "content": "from . import views",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        541,
                        133,
                        550
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 23,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                540,
                                135,
                                551
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        540,
                                        135,
                                        551
                                    ],
                                    "type": "text",
                                    "content": "urlpatterns = [",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        96,
                        556,
                        207,
                        565
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 24,
                    "lines": [
                        {
                            "bbox": [
                                96,
                                556,
                                208,
                                566
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        96,
                                        556,
                                        208,
                                        566
                                    ],
                                    "type": "text",
                                    "content": "path('add_book/', views.add_book),",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        573,
                        93,
                        581
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 25,
                    "lines": [
                        {
                            "bbox": [
                                87,
                                572,
                                94,
                                583
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        572,
                                        94,
                                        583
                                    ],
                                    "type": "text",
                                    "content": "]",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        587,
                        174,
                        597
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 26,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                587,
                                174,
                                597
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        587,
                                        174,
                                        597
                                    ],
                                    "type": "text",
                                    "content": "方式一：模型类实例化对象",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        618,
                        199,
                        629
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 27,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                618,
                                201,
                                629
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        618,
                                        201,
                                        629
                                    ],
                                    "type": "text",
                                    "content": "需从 app 目录引入 models.py 文件：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        650,
                        179,
                        659
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 28,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                650,
                                180,
                                660
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        650,
                                        180,
                                        660
                                    ],
                                    "type": "text",
                                    "content": "from app 目录 import models",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        666,
                        286,
                        675
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 29,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                666,
                                286,
                                675
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        666,
                                        286,
                                        675
                                    ],
                                    "type": "text",
                                    "content": "并且实例化对象后要执行 对象.save() 才能在数据库中新增成功。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        697,
                        173,
                        706
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 30,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                697,
                                174,
                                707
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        697,
                                        174,
                                        707
                                    ],
                                    "type": "text",
                                    "content": "app01/views.py: 文件代码：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        712,
                        246,
                        721
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 31,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                712,
                                248,
                                722
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        712,
                                        248,
                                        722
                                    ],
                                    "type": "text",
                                    "content": "from django.shortcuts import render,HttpResponse",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        728,
                        171,
                        737
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 32,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                728,
                                172,
                                738
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        728,
                                        172,
                                        738
                                    ],
                                    "type": "text",
                                    "content": "from app01 import models",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        743,
                        162,
                        753
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 33,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                744,
                                163,
                                754
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        744,
                                        163,
                                        754
                                    ],
                                    "type": "text",
                                    "content": "def add_book(request):",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [],
            "page_size": [
                595,
                841
            ],
            "page_idx": 35
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        93,
                        79,
                        381,
                        89
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                95,
                                79,
                                382,
                                90
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        95,
                                        79,
                                        113,
                                        90
                                    ],
                                    "type": "text",
                                    "content": "book",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        113,
                                        82,
                                        120,
                                        89
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.68
                                },
                                {
                                    "bbox": [
                                        120,
                                        79,
                                        173,
                                        90
                                    ],
                                    "type": "text",
                                    "content": "models.Book(title",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        173,
                                        81,
                                        180,
                                        89
                                    ],
                                    "type": "inline_equation",
                                    "content": "! = \"",
                                    "score": 0.51
                                },
                                {
                                    "bbox": [
                                        181,
                                        79,
                                        382,
                                        90
                                    ],
                                    "type": "text",
                                    "content": "菜鸟教程\",price=300,publish=\"菜鸟出版社\",pub_date=\"2008-8-8\")",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        96,
                        134,
                        105
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                95,
                                94,
                                136,
                                106
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        95,
                                        94,
                                        136,
                                        106
                                    ],
                                    "type": "text",
                                    "content": "book.save()",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        111,
                        247,
                        121
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                95,
                                111,
                                248,
                                122
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        95,
                                        111,
                                        164,
                                        122
                                    ],
                                    "type": "text",
                                    "content": "return HttpResponse(",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        164,
                                        113,
                                        179,
                                        121
                                    ],
                                    "type": "inline_equation",
                                    "content": "\" < p >",
                                    "score": 0.61
                                },
                                {
                                    "bbox": [
                                        179,
                                        111,
                                        226,
                                        122
                                    ],
                                    "type": "text",
                                    "content": "数据添加成功！",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        226,
                                        112,
                                        244,
                                        121
                                    ],
                                    "type": "inline_equation",
                                    "content": "< / { \\mathsf { p } } > \"",
                                    "score": 0.56
                                },
                                {
                                    "bbox": [
                                        245,
                                        111,
                                        248,
                                        122
                                    ],
                                    "type": "text",
                                    "content": ")",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        126,
                        301,
                        136
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                126,
                                301,
                                137
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        126,
                                        301,
                                        137
                                    ],
                                    "type": "text",
                                    "content": "方式二：通过 ORM 提供的 objects 提供的方法create 来实现（推荐）",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        158,
                        173,
                        168
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                158,
                                174,
                                169
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        158,
                                        174,
                                        169
                                    ],
                                    "type": "text",
                                    "content": "app01/views.py: 文件代码：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        174,
                        246,
                        183
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                174,
                                248,
                                185
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        174,
                                        248,
                                        185
                                    ],
                                    "type": "text",
                                    "content": "from django.shortcuts import render,HttpResponse",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        190,
                        171,
                        198
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                189,
                                172,
                                200
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        189,
                                        172,
                                        200
                                    ],
                                    "type": "text",
                                    "content": "from app01 import models",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        205,
                        162,
                        214
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                204,
                                163,
                                215
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        204,
                                        163,
                                        215
                                    ],
                                    "type": "text",
                                    "content": "def add_book(request):",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        221,
                        440,
                        230
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                95,
                                221,
                                441,
                                232
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        95,
                                        221,
                                        116,
                                        232
                                    ],
                                    "type": "text",
                                    "content": "books",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        116,
                                        222,
                                        123,
                                        228
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.74
                                },
                                {
                                    "bbox": [
                                        123,
                                        221,
                                        441,
                                        232
                                    ],
                                    "type": "text",
                                    "content": "models.Book.objects.create(title=\"如来神掌\",price=200,publish=\"功夫出版社\",pub_date=\"2010-10-10\")",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        236,
                        234,
                        245
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                96,
                                236,
                                235,
                                247
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        96,
                                        236,
                                        235,
                                        247
                                    ],
                                    "type": "text",
                                    "content": "print(books, type(books)) # Book object (18)",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        252,
                        246,
                        261
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                95,
                                252,
                                248,
                                263
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        95,
                                        252,
                                        248,
                                        263
                                    ],
                                    "type": "text",
                                    "content": "return HttpResponse(\"<p>数据添加成功！</p>\")",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        285,
                        119,
                        301
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                87,
                                282,
                                121,
                                306
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        282,
                                        121,
                                        306
                                    ],
                                    "type": "text",
                                    "content": "查找",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        337,
                        231,
                        349
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                337,
                                232,
                                352
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        337,
                                        232,
                                        352
                                    ],
                                    "type": "text",
                                    "content": "使用 all() 方法来查询所有内容。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        352,
                        504,
                        380
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                352,
                                505,
                                366
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        352,
                                        505,
                                        366
                                    ],
                                    "type": "text",
                                    "content": "返回的是 QuerySet 类型数据，类似于 list，里面放的是一个个模型类的对象，可用索引下",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                369,
                                190,
                                381
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        369,
                                        190,
                                        381
                                    ],
                                    "type": "text",
                                    "content": "标取出模型类的对象。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        384,
                        160,
                        396
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                95,
                                383,
                                161,
                                398
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        95,
                                        383,
                                        161,
                                        398
                                    ],
                                    "type": "text",
                                    "content": "（for I in books）",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        401,
                        202,
                        410
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                95,
                                400,
                                203,
                                411
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        95,
                                        400,
                                        116,
                                        411
                                    ],
                                    "type": "text",
                                    "content": "books",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        116,
                                        402,
                                        123,
                                        408
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.75
                                },
                                {
                                    "bbox": [
                                        124,
                                        400,
                                        203,
                                        411
                                    ],
                                    "type": "text",
                                    "content": "models.Book.objects.all()",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        416,
                        382,
                        425
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                95,
                                417,
                                384,
                                426
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        95,
                                        417,
                                        384,
                                        426
                                    ],
                                    "type": "text",
                                    "content": "print(books,type(books)) # QuerySet 类型，类似于 list，访问 url 时数据显示在命令行窗口中。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        450,
                        221,
                        467
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 17,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                449,
                                223,
                                469
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        449,
                                        223,
                                        469
                                    ],
                                    "type": "text",
                                    "content": "查询符合条件的数据。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        503,
                        124,
                        512
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                502,
                                126,
                                513
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        502,
                                        126,
                                        513
                                    ],
                                    "type": "text",
                                    "content": "filter() 方法",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        518,
                        444,
                        528
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                518,
                                445,
                                528
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        518,
                                        445,
                                        528
                                    ],
                                    "type": "text",
                                    "content": "返回的是 QuerySet 类型数据，类似于 list，里面放的是满足条件的模型类的对象，可用索引下标取出模型类的对象。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        550,
                        240,
                        559
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                550,
                                242,
                                560
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        550,
                                        242,
                                        560
                                    ],
                                    "type": "text",
                                    "content": "pk=3 的意思是主键 primary key=3，相当于 id=3。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        581,
                        327,
                        591
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 21,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                580,
                                329,
                                591
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        580,
                                        329,
                                        591
                                    ],
                                    "type": "text",
                                    "content": "因为 id 在 pycharm 里有特殊含义，是看内存地址的内置函数 id()，因此用 pk。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        94,
                        611,
                        224,
                        621
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 22,
                    "lines": [
                        {
                            "bbox": [
                                95,
                                611,
                                224,
                                622
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        95,
                                        611,
                                        116,
                                        622
                                    ],
                                    "type": "text",
                                    "content": "books",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        116,
                                        613,
                                        123,
                                        619
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.72
                                },
                                {
                                    "bbox": [
                                        124,
                                        611,
                                        224,
                                        622
                                    ],
                                    "type": "text",
                                    "content": "models.Book.objects.filter(pk=5)",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        628,
                        135,
                        636
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 23,
                    "lines": [
                        {
                            "bbox": [
                                95,
                                627,
                                136,
                                638
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        95,
                                        627,
                                        136,
                                        638
                                    ],
                                    "type": "text",
                                    "content": "print(books)",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        643,
                        195,
                        652
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 24,
                    "lines": [
                        {
                            "bbox": [
                                96,
                                644,
                                195,
                                653
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        96,
                                        644,
                                        195,
                                        653
                                    ],
                                    "type": "text",
                                    "content": "print(\"//////////////////////////////////////\")",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        659,
                        307,
                        668
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 25,
                    "lines": [
                        {
                            "bbox": [
                                96,
                                658,
                                308,
                                669
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        96,
                                        658,
                                        116,
                                        669
                                    ],
                                    "type": "text",
                                    "content": "books",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        116,
                                        661,
                                        123,
                                        666
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.74
                                },
                                {
                                    "bbox": [
                                        124,
                                        658,
                                        308,
                                        669
                                    ],
                                    "type": "text",
                                    "content": "models.Book.objects.filter(publish='菜鸟出版社', price=300)",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        675,
                        270,
                        684
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 26,
                    "lines": [
                        {
                            "bbox": [
                                95,
                                674,
                                271,
                                684
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        95,
                                        674,
                                        271,
                                        684
                                    ],
                                    "type": "text",
                                    "content": "print(books, type(books)) # QuerySet 类型，类似于 list。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [],
            "page_size": [
                595,
                841
            ],
            "page_idx": 36
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        88,
                        85,
                        235,
                        101
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                84,
                                236,
                                104
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        84,
                                        236,
                                        104
                                    ],
                                    "type": "text",
                                    "content": "查询不符合条件的数据。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        137,
                        135,
                        147
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                137,
                                136,
                                148
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        137,
                                        136,
                                        148
                                    ],
                                    "type": "text",
                                    "content": "exclude() 方法",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        153,
                        451,
                        163
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                153,
                                452,
                                163
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        153,
                                        452,
                                        163
                                    ],
                                    "type": "text",
                                    "content": "返回的是 QuerySet 类型数据，类似于 list，里面放的是不满足条件的模型类的对象，可用索引下标取出模型类的对象。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        95,
                        168,
                        235,
                        178
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                95,
                                168,
                                235,
                                178
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        95,
                                        168,
                                        235,
                                        178
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                95,
                                                168,
                                                235,
                                                178
                                            ],
                                            "type": "text",
                                            "content": "books "
                                        },
                                        {
                                            "bbox": [
                                                95,
                                                168,
                                                235,
                                                178
                                            ],
                                            "type": "inline_equation",
                                            "content": "="
                                        },
                                        {
                                            "bbox": [
                                                95,
                                                168,
                                                235,
                                                178
                                            ],
                                            "type": "text",
                                            "content": " models.Book.objectsexclude(pk=5)"
                                        }
                                    ]
                                }
                            ],
                            "index": 3,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 3,
                    "sub_type": "algorithm"
                },
                {
                    "bbox": [
                        95,
                        184,
                        135,
                        193
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                95,
                                183,
                                136,
                                195
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        95,
                                        183,
                                        136,
                                        195
                                    ],
                                    "type": "text",
                                    "content": "print(books)",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        95,
                        200,
                        195,
                        209
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                95,
                                200,
                                195,
                                209
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        95,
                                        200,
                                        195,
                                        209
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                95,
                                                200,
                                                195,
                                                209
                                            ],
                                            "type": "text",
                                            "content": "print(\"|||||||||||||||||||||||||||||||||\")"
                                        }
                                    ]
                                }
                            ],
                            "index": 5,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 5,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "bbox": [
                        95,
                        215,
                        318,
                        225
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                96,
                                215,
                                319,
                                226
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        96,
                                        215,
                                        116,
                                        226
                                    ],
                                    "type": "text",
                                    "content": "books",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        116,
                                        217,
                                        123,
                                        223
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.74
                                },
                                {
                                    "bbox": [
                                        124,
                                        215,
                                        319,
                                        226
                                    ],
                                    "type": "text",
                                    "content": "models.Book.objects.exclude(publish='菜鸟出版社', price=300)",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        231,
                        271,
                        241
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                95,
                                231,
                                271,
                                242
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        95,
                                        231,
                                        271,
                                        242
                                    ],
                                    "type": "text",
                                    "content": "print(books, type(books)) # QuerySet 类型，类似于 list。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        265,
                        155,
                        283
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                85,
                                264,
                                158,
                                284
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        85,
                                        264,
                                        158,
                                        284
                                    ],
                                    "type": "text",
                                    "content": "get() 方法",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        317,
                        500,
                        327
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                317,
                                499,
                                327
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        317,
                                        499,
                                        327
                                    ],
                                    "type": "text",
                                    "content": "用于查询符合条件的返回模型类的对象符合条件的对象只能为一个，如果符合筛选条件的对象超过了一个或者没有一个都会抛出错误。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        95,
                        333,
                        221,
                        343
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                95,
                                333,
                                221,
                                343
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        95,
                                        333,
                                        221,
                                        343
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                95,
                                                333,
                                                221,
                                                343
                                            ],
                                            "type": "text",
                                            "content": "books "
                                        },
                                        {
                                            "bbox": [
                                                95,
                                                333,
                                                221,
                                                343
                                            ],
                                            "type": "inline_equation",
                                            "content": "="
                                        },
                                        {
                                            "bbox": [
                                                95,
                                                333,
                                                221,
                                                343
                                            ],
                                            "type": "text",
                                            "content": " models.Book.objects.get(pk=5)"
                                        }
                                    ]
                                }
                            ],
                            "index": 10,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 10,
                    "sub_type": "algorithm"
                },
                {
                    "bbox": [
                        95,
                        349,
                        318,
                        358
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                96,
                                349,
                                319,
                                359
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        96,
                                        349,
                                        116,
                                        359
                                    ],
                                    "type": "text",
                                    "content": "books",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        116,
                                        350,
                                        123,
                                        357
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.76
                                },
                                {
                                    "bbox": [
                                        124,
                                        349,
                                        201,
                                        359
                                    ],
                                    "type": "text",
                                    "content": "models.Book.objects.get",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        202,
                                        349,
                                        223,
                                        358
                                    ],
                                    "type": "inline_equation",
                                    "content": "{ \\tt p k } { = } 1 8",
                                    "score": 0.53
                                },
                                {
                                    "bbox": [
                                        223,
                                        349,
                                        319,
                                        359
                                    ],
                                    "type": "text",
                                    "content": ") # 报错，没有符合条件的对象",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        95,
                        364,
                        343,
                        374
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                95,
                                364,
                                343,
                                374
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        95,
                                        364,
                                        343,
                                        374
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                95,
                                                364,
                                                343,
                                                374
                                            ],
                                            "type": "text",
                                            "content": "books = models.Book.objects.get(price=200) # 报错，符合条件的对象超过一个"
                                        }
                                    ]
                                }
                            ],
                            "index": 12,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 12,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "bbox": [
                        95,
                        380,
                        227,
                        390
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                95,
                                380,
                                227,
                                390
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        95,
                                        380,
                                        227,
                                        390
                                    ],
                                    "type": "text",
                                    "content": "print(books, type(books)) # 模型类的对象",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        414,
                        118,
                        430
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                87,
                                413,
                                120,
                                433
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        413,
                                        120,
                                        433
                                    ],
                                    "type": "text",
                                    "content": "排序",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        466,
                        122,
                        476
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                465,
                                124,
                                477
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        465,
                                        124,
                                        477
                                    ],
                                    "type": "text",
                                    "content": "order_by()",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        481,
                        436,
                        491
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                482,
                                437,
                                491
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        482,
                                        437,
                                        491
                                    ],
                                    "type": "text",
                                    "content": "返回的是 QuerySet类型数据，类似于list，里面放的是排序后的模型类的对象，可用索引下标取出模型类的对象。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        513,
                        107,
                        522
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 17,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                512,
                                108,
                                523
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        512,
                                        108,
                                        523
                                    ],
                                    "type": "text",
                                    "content": "注意：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        544,
                        192,
                        569
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 20,
                    "blocks": [
                        {
                            "bbox": [
                                87,
                                544,
                                174,
                                553
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 18,
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        544,
                                        174,
                                        554
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                544,
                                                174,
                                                554
                                            ],
                                            "type": "text",
                                            "content": "a、参数的字段名要加引号。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                87,
                                560,
                                192,
                                569
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 19,
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        560,
                                        192,
                                        569
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                560,
                                                192,
                                                569
                                            ],
                                            "type": "text",
                                            "content": "b、降序为在字段前面加个负号-。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        95,
                        576,
                        343,
                        585
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 21,
                    "lines": [
                        {
                            "bbox": [
                                95,
                                576,
                                343,
                                585
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        95,
                                        576,
                                        116,
                                        585
                                    ],
                                    "type": "text",
                                    "content": "books",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        116,
                                        577,
                                        123,
                                        583
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.75
                                },
                                {
                                    "bbox": [
                                        124,
                                        576,
                                        343,
                                        585
                                    ],
                                    "type": "text",
                                    "content": "models.Book.objects.order_by(\"price\") # 查询所有，按照价格升序排列",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        591,
                        345,
                        601
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 22,
                    "lines": [
                        {
                            "bbox": [
                                96,
                                591,
                                345,
                                601
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        96,
                                        591,
                                        116,
                                        601
                                    ],
                                    "type": "text",
                                    "content": "books",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        116,
                                        592,
                                        123,
                                        599
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.77
                                },
                                {
                                    "bbox": [
                                        124,
                                        591,
                                        345,
                                        601
                                    ],
                                    "type": "text",
                                    "content": "models.Book.objects.order_by(\"-price\") # 查询所有，按照价格降序排列",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        626,
                        220,
                        641
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 23,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                625,
                                220,
                                644
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        625,
                                        220,
                                        644
                                    ],
                                    "type": "text",
                                    "content": "对查询结果进行反转。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        677,
                        135,
                        687
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 24,
                    "lines": [
                        {
                            "bbox": [
                                87,
                                677,
                                135,
                                687
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        677,
                                        135,
                                        687
                                    ],
                                    "type": "text",
                                    "content": "reverse() 方法",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        692,
                        438,
                        703
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 25,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                693,
                                439,
                                702
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        693,
                                        439,
                                        702
                                    ],
                                    "type": "text",
                                    "content": "返回的是 QuerySe t类型数据，类似于 list，里面放的是反转后的模型类的对象，可用索引下标取出模型类的对象。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        724,
                        202,
                        734
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 26,
                    "lines": [
                        {
                            "bbox": [
                                96,
                                725,
                                201,
                                733
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        96,
                                        725,
                                        201,
                                        733
                                    ],
                                    "type": "text",
                                    "content": "# 按照价格升序排列：降序再反转",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        740,
                        276,
                        749
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 27,
                    "lines": [
                        {
                            "bbox": [
                                95,
                                739,
                                276,
                                751
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        95,
                                        739,
                                        116,
                                        751
                                    ],
                                    "type": "text",
                                    "content": "books",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        116,
                                        741,
                                        123,
                                        747
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.76
                                },
                                {
                                    "bbox": [
                                        124,
                                        739,
                                        276,
                                        751
                                    ],
                                    "type": "text",
                                    "content": "models.Book.objects.order_by(\"-price\").reverse()",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [],
            "page_size": [
                595,
                841
            ],
            "page_idx": 37
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        88,
                        85,
                        189,
                        101
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                84,
                                189,
                                102
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        84,
                                        189,
                                        102
                                    ],
                                    "type": "text",
                                    "content": "查询数据的数量",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        136,
                        180,
                        149
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                137,
                                179,
                                148
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        137,
                                        179,
                                        148
                                    ],
                                    "type": "text",
                                    "content": "返回的数据是整数。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        153,
                        128,
                        163
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                152,
                                129,
                                163
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        152,
                                        129,
                                        163
                                    ],
                                    "type": "text",
                                    "content": "count() 方法",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        168,
                        285,
                        179
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                96,
                                169,
                                284,
                                179
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        96,
                                        169,
                                        116,
                                        179
                                    ],
                                    "type": "text",
                                    "content": "books",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        116,
                                        170,
                                        123,
                                        176
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.73
                                },
                                {
                                    "bbox": [
                                        124,
                                        169,
                                        284,
                                        179
                                    ],
                                    "type": "text",
                                    "content": "models.Book.objects.count() # 查询所有数据的数量",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        184,
                        349,
                        195
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                95,
                                185,
                                349,
                                194
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        95,
                                        185,
                                        116,
                                        194
                                    ],
                                    "type": "text",
                                    "content": "books",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        116,
                                        186,
                                        123,
                                        192
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.75
                                },
                                {
                                    "bbox": [
                                        124,
                                        185,
                                        349,
                                        194
                                    ],
                                    "type": "text",
                                    "content": "models.Book.objects.filter(price=200).count() # 查询符合条件数据的数量",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        200,
                        324,
                        210
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                200,
                                324,
                                210
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        200,
                                        324,
                                        210
                                    ],
                                    "type": "text",
                                    "content": "first() 方法返回第一条数据返回的数据是模型类的对象也可以用索引下标 [0]。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        215,
                        299,
                        225
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                96,
                                216,
                                299,
                                225
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        96,
                                        216,
                                        116,
                                        225
                                    ],
                                    "type": "text",
                                    "content": "books",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        116,
                                        217,
                                        123,
                                        223
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.75
                                },
                                {
                                    "bbox": [
                                        124,
                                        216,
                                        299,
                                        225
                                    ],
                                    "type": "text",
                                    "content": "models.Book.objects.first() # 返回所有数据的第一条数据",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        231,
                        393,
                        241
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                232,
                                393,
                                240
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        232,
                                        393,
                                        240
                                    ],
                                    "type": "text",
                                    "content": "last() 方法返回最后一条数据返回的数据是模型类的对象不能用索引下标[-1]，ORM 没有逆序索引。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        246,
                        306,
                        256
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                96,
                                247,
                                306,
                                256
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        96,
                                        247,
                                        116,
                                        256
                                    ],
                                    "type": "text",
                                    "content": "books",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        116,
                                        248,
                                        123,
                                        254
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.75
                                },
                                {
                                    "bbox": [
                                        124,
                                        247,
                                        306,
                                        256
                                    ],
                                    "type": "text",
                                    "content": "models.Book.objects.last() # 返回所有数据的最后一条数据",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        281,
                        175,
                        297
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                280,
                                176,
                                299
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        280,
                                        176,
                                        299
                                    ],
                                    "type": "text",
                                    "content": "是否存在数据",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        333,
                        284,
                        343
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                333,
                                284,
                                343
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        333,
                                        284,
                                        343
                                    ],
                                    "type": "text",
                                    "content": "exists() 方法用于判断查询的结果 QuerySet 列表里是否有数据。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        364,
                        242,
                        374
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                364,
                                242,
                                374
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        364,
                                        242,
                                        374
                                    ],
                                    "type": "text",
                                    "content": "返回的数据类型是布尔，有为 true，没有为 false。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        395,
                        336,
                        405
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                396,
                                336,
                                405
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        396,
                                        336,
                                        405
                                    ],
                                    "type": "text",
                                    "content": "注意：判断的数据类型只能为 QuerySet 类型数据，不能为整型和模型类的对象。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        426,
                        214,
                        436
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                96,
                                426,
                                214,
                                436
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        96,
                                        426,
                                        116,
                                        436
                                    ],
                                    "type": "text",
                                    "content": "books",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        116,
                                        428,
                                        123,
                                        433
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.72
                                },
                                {
                                    "bbox": [
                                        124,
                                        426,
                                        214,
                                        436
                                    ],
                                    "type": "text",
                                    "content": "models.Book.objects.exists()",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        442,
                        298,
                        452
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                95,
                                443,
                                297,
                                451
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        95,
                                        443,
                                        297,
                                        451
                                    ],
                                    "type": "text",
                                    "content": "# 报错，判断的数据类型只能为QuerySet类型数据，不能为整型",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        457,
                        238,
                        467
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                95,
                                456,
                                238,
                                469
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        95,
                                        456,
                                        116,
                                        469
                                    ],
                                    "type": "text",
                                    "content": "books",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        116,
                                        459,
                                        123,
                                        465
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.75
                                },
                                {
                                    "bbox": [
                                        124,
                                        456,
                                        238,
                                        469
                                    ],
                                    "type": "text",
                                    "content": "models.Book.objects.count().exists()",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        473,
                        318,
                        483
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                96,
                                474,
                                318,
                                482
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        96,
                                        474,
                                        318,
                                        482
                                    ],
                                    "type": "text",
                                    "content": "# 报错，判断的数据类型只能为QuerySet类型数据，不能为模型类对象",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        489,
                        232,
                        498
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 17,
                    "lines": [
                        {
                            "bbox": [
                                95,
                                488,
                                232,
                                499
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        95,
                                        488,
                                        116,
                                        499
                                    ],
                                    "type": "text",
                                    "content": "books",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        116,
                                        491,
                                        123,
                                        497
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.77
                                },
                                {
                                    "bbox": [
                                        124,
                                        488,
                                        232,
                                        499
                                    ],
                                    "type": "text",
                                    "content": "models.Book.objects.first().exists()",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        523,
                        147,
                        539
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                523,
                                147,
                                541
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        523,
                                        147,
                                        541
                                    ],
                                    "type": "text",
                                    "content": "查询数据",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        576,
                        211,
                        585
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                576,
                                211,
                                585
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        576,
                                        211,
                                        585
                                    ],
                                    "type": "text",
                                    "content": "values() 方法用于查询部分字段的数据。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        606,
                        486,
                        616
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                606,
                                487,
                                617
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        606,
                                        487,
                                        617
                                    ],
                                    "type": "text",
                                    "content": "返回的是 QuerySet 类型数据，类似于 list，里面不是模型类的对象，而是一个可迭代的字典序列，字典里的键是字段，值是数据。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        638,
                        107,
                        647
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 21,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                637,
                                108,
                                648
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        637,
                                        108,
                                        648
                                    ],
                                    "type": "text",
                                    "content": "注意：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        669,
                        160,
                        678
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 22,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                669,
                                160,
                                678
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        669,
                                        160,
                                        678
                                    ],
                                    "type": "text",
                                    "content": "参数的字段名要加引号",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        685,
                        175,
                        694
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 23,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                684,
                                176,
                                694
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        684,
                                        176,
                                        694
                                    ],
                                    "type": "text",
                                    "content": "想要字段名和数据用 values",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        700,
                        250,
                        709
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 24,
                    "lines": [
                        {
                            "bbox": [
                                96,
                                699,
                                251,
                                710
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        96,
                                        699,
                                        116,
                                        710
                                    ],
                                    "type": "text",
                                    "content": "books",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        116,
                                        702,
                                        123,
                                        708
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.74
                                },
                                {
                                    "bbox": [
                                        124,
                                        699,
                                        251,
                                        710
                                    ],
                                    "type": "text",
                                    "content": "models.Book.objects.values(\"pk\",\"price\")",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        716,
                        336,
                        725
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 25,
                    "lines": [
                        {
                            "bbox": [
                                95,
                                716,
                                337,
                                725
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        95,
                                        716,
                                        337,
                                        725
                                    ],
                                    "type": "text",
                                    "content": "print(books[0][\"price\"],type(books)) # 得到的是第一条记录的 price 字段的数据",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [],
            "page_size": [
                595,
                841
            ],
            "page_idx": 38
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        88,
                        85,
                        158,
                        101
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                86,
                                84,
                                161,
                                104
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        86,
                                        84,
                                        161,
                                        104
                                    ],
                                    "type": "text",
                                    "content": "查询数据 2",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        137,
                        227,
                        147
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                137,
                                227,
                                148
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        137,
                                        227,
                                        148
                                    ],
                                    "type": "text",
                                    "content": "values_list() 方法用于查询部分字段的数据。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        153,
                        465,
                        163
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                153,
                                466,
                                163
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        153,
                                        466,
                                        163
                                    ],
                                    "type": "text",
                                    "content": "返回的是 QuerySet 类型数据，类似于 list，里面不是模型类的对象，而是一个个元组，元组里放的是查询字段对应的数据。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        168,
                        108,
                        178
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                168,
                                109,
                                179
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        168,
                                        109,
                                        179
                                    ],
                                    "type": "text",
                                    "content": "注意：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        105,
                        184,
                        202,
                        208
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 6,
                    "blocks": [
                        {
                            "bbox": [
                                105,
                                184,
                                196,
                                193
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 4,
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        185,
                                        196,
                                        193
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                187,
                                                111,
                                                190
                                            ],
                                            "type": "text",
                                            "content": "",
                                            "score": 0.0
                                        },
                                        {
                                            "bbox": [
                                                124,
                                                185,
                                                196,
                                                193
                                            ],
                                            "type": "text",
                                            "content": "参数的字段名要加引号",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                200,
                                202,
                                208
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 5,
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        199,
                                        204,
                                        210
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                201,
                                                111,
                                                206
                                            ],
                                            "type": "text",
                                            "content": ".",
                                            "score": 0.9
                                        },
                                        {
                                            "bbox": [
                                                124,
                                                199,
                                                204,
                                                210
                                            ],
                                            "type": "text",
                                            "content": "只想要数据用 values_list",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        95,
                        215,
                        277,
                        224
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                95,
                                215,
                                279,
                                226
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        95,
                                        215,
                                        116,
                                        226
                                    ],
                                    "type": "text",
                                    "content": "books",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        116,
                                        216,
                                        123,
                                        222
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.74
                                },
                                {
                                    "bbox": [
                                        124,
                                        215,
                                        279,
                                        226
                                    ],
                                    "type": "text",
                                    "content": "models.Book.objects.values_list(\"price\",\"publish\")",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        231,
                        136,
                        240
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                95,
                                230,
                                138,
                                242
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        95,
                                        230,
                                        138,
                                        242
                                    ],
                                    "type": "text",
                                    "content": "print(books)",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        246,
                        321,
                        256
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                96,
                                247,
                                322,
                                256
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        96,
                                        247,
                                        322,
                                        256
                                    ],
                                    "type": "text",
                                    "content": "print(books[0][0],type(books)) # 得到的是第一条记录的 price 字段的数据",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        281,
                        119,
                        296
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                87,
                                279,
                                120,
                                300
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        279,
                                        120,
                                        300
                                    ],
                                    "type": "text",
                                    "content": "去重",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        333,
                        202,
                        343
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                333,
                                202,
                                343
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        333,
                                        202,
                                        343
                                    ],
                                    "type": "text",
                                    "content": "distinct() 方法用于对数据进行去重。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        349,
                        183,
                        358
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                349,
                                183,
                                359
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        349,
                                        183,
                                        359
                                    ],
                                    "type": "text",
                                    "content": "返回的是 QuerySet 类型数据。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        364,
                        108,
                        374
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                364,
                                109,
                                375
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        364,
                                        109,
                                        375
                                    ],
                                    "type": "text",
                                    "content": "注意：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        105,
                        380,
                        339,
                        405
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 16,
                    "blocks": [
                        {
                            "bbox": [
                                105,
                                380,
                                339,
                                389
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 14,
                            "lines": [
                                {
                                    "bbox": [
                                        108,
                                        381,
                                        339,
                                        389
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                108,
                                                382,
                                                111,
                                                386
                                            ],
                                            "type": "text",
                                            "content": ".",
                                            "score": 0.678
                                        },
                                        {
                                            "bbox": [
                                                125,
                                                381,
                                                339,
                                                389
                                            ],
                                            "type": "text",
                                            "content": "对模型类的对象去重没有意义，因为每个对象都是一个不一样的存在。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                395,
                                280,
                                405
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 15,
                            "lines": [
                                {
                                    "bbox": [
                                        124,
                                        395,
                                        282,
                                        406
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                124,
                                                395,
                                                282,
                                                406
                                            ],
                                            "type": "text",
                                            "content": "distinct() 一般是联合 values 或者 values_list 使用。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        87,
                        426,
                        163,
                        436
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 17,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                426,
                                164,
                                436
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        426,
                                        164,
                                        436
                                    ],
                                    "type": "text",
                                    "content": "def add_book(request):",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        442,
                        181,
                        451
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                96,
                                443,
                                181,
                                451
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        96,
                                        443,
                                        181,
                                        451
                                    ],
                                    "type": "text",
                                    "content": "# 查询一共有多少个出版社",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        94,
                        457,
                        504,
                        467
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                96,
                                457,
                                505,
                                468
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        96,
                                        457,
                                        116,
                                        468
                                    ],
                                    "type": "text",
                                    "content": "books",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        116,
                                        460,
                                        123,
                                        465
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.75
                                },
                                {
                                    "bbox": [
                                        124,
                                        457,
                                        505,
                                        468
                                    ],
                                    "type": "text",
                                    "content": "models.Book.objects.values_list(\"publish\").distinct() # 对模型类的对象去重没有意义，因为每个对象都是一个不一样的存在。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        473,
                        218,
                        482
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                95,
                                471,
                                218,
                                484
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        95,
                                        471,
                                        116,
                                        484
                                    ],
                                    "type": "text",
                                    "content": "books",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        116,
                                        475,
                                        124,
                                        481
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.76
                                },
                                {
                                    "bbox": [
                                        124,
                                        471,
                                        218,
                                        484
                                    ],
                                    "type": "text",
                                    "content": "models.Book.objects.distinct()",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        507,
                        245,
                        524
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 21,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                506,
                                246,
                                525
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        506,
                                        246,
                                        525
                                    ],
                                    "type": "text",
                                    "content": "基于双下划线的模糊查询",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        560,
                        183,
                        569
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 22,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                559,
                                184,
                                570
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        559,
                                        184,
                                        570
                                    ],
                                    "type": "text",
                                    "content": "filter() 方法（exclude 同理）。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        575,
                        368,
                        585
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 23,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                576,
                                369,
                                585
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        576,
                                        209,
                                        585
                                    ],
                                    "type": "text",
                                    "content": "注意：filter 中运算符号只能使用等于号",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        210,
                                        576,
                                        217,
                                        584
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.69
                                },
                                {
                                    "bbox": [
                                        217,
                                        576,
                                        273,
                                        585
                                    ],
                                    "type": "text",
                                    "content": "，不能使用大于号",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        273,
                                        576,
                                        280,
                                        584
                                    ],
                                    "type": "inline_equation",
                                    "content": ">",
                                    "score": 0.6
                                },
                                {
                                    "bbox": [
                                        280,
                                        576,
                                        308,
                                        585
                                    ],
                                    "type": "text",
                                    "content": "，小于号",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        309,
                                        576,
                                        315,
                                        584
                                    ],
                                    "type": "inline_equation",
                                    "content": "<",
                                    "score": 0.56
                                },
                                {
                                    "bbox": [
                                        316,
                                        576,
                                        369,
                                        585
                                    ],
                                    "type": "text",
                                    "content": "，等等其他符号。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        591,
                        207,
                        600
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 24,
                    "lines": [
                        {
                            "bbox": [
                                94,
                                591,
                                207,
                                601
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        94,
                                        591,
                                        152,
                                        601
                                    ],
                                    "type": "text",
                                    "content": "_in 用于读取区间，",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        152,
                                        592,
                                        159,
                                        599
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.74
                                },
                                {
                                    "bbox": [
                                        159,
                                        591,
                                        207,
                                        601
                                    ],
                                    "type": "text",
                                    "content": "号后面为列表 。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        606,
                        330,
                        617
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 25,
                    "lines": [
                        {
                            "bbox": [
                                93,
                                606,
                                331,
                                617
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        93,
                                        606,
                                        133,
                                        617
                                    ],
                                    "type": "text",
                                    "content": "_gt 大于号 ，",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        133,
                                        608,
                                        141,
                                        614
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.74
                                },
                                {
                                    "bbox": [
                                        141,
                                        606,
                                        243,
                                        617
                                    ],
                                    "type": "text",
                                    "content": "号后面为数字。__gte 大于等于，",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        244,
                                        608,
                                        251,
                                        614
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.76
                                },
                                {
                                    "bbox": [
                                        251,
                                        606,
                                        331,
                                        617
                                    ],
                                    "type": "text",
                                    "content": "号后面为数字。__lt,__lte",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        622,
                        291,
                        632
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 26,
                    "lines": [
                        {
                            "bbox": [
                                94,
                                622,
                                292,
                                632
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        94,
                                        622,
                                        202,
                                        632
                                    ],
                                    "type": "text",
                                    "content": "_range 在 ... 之间，左闭右闭区间，",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        203,
                                        624,
                                        210,
                                        630
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.8
                                },
                                {
                                    "bbox": [
                                        210,
                                        622,
                                        292,
                                        632
                                    ],
                                    "type": "text",
                                    "content": "号后面为两个元素的列表。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        638,
                        207,
                        647
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 27,
                    "lines": [
                        {
                            "bbox": [
                                94,
                                638,
                                208,
                                647
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        94,
                                        638,
                                        147,
                                        647
                                    ],
                                    "type": "text",
                                    "content": "_contains 包含，",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        147,
                                        639,
                                        154,
                                        645
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.65
                                },
                                {
                                    "bbox": [
                                        155,
                                        638,
                                        208,
                                        647
                                    ],
                                    "type": "text",
                                    "content": "号后面为字符串。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        653,
                        258,
                        663
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 28,
                    "lines": [
                        {
                            "bbox": [
                                95,
                                654,
                                258,
                                662
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        95,
                                        654,
                                        198,
                                        662
                                    ],
                                    "type": "text",
                                    "content": "_icontains 不区分大小写的包含，",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        198,
                                        655,
                                        205,
                                        661
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.75
                                },
                                {
                                    "bbox": [
                                        205,
                                        654,
                                        258,
                                        662
                                    ],
                                    "type": "text",
                                    "content": "号后面为字符串。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        669,
                        246,
                        678
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 29,
                    "lines": [
                        {
                            "bbox": [
                                94,
                                669,
                                248,
                                679
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        94,
                                        669,
                                        186,
                                        679
                                    ],
                                    "type": "text",
                                    "content": "_startswith 以指定字符开头，",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        186,
                                        670,
                                        193,
                                        677
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.71
                                },
                                {
                                    "bbox": [
                                        193,
                                        669,
                                        248,
                                        679
                                    ],
                                    "type": "text",
                                    "content": "号后面为字符串。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        684,
                        244,
                        694
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 30,
                    "lines": [
                        {
                            "bbox": [
                                95,
                                684,
                                245,
                                694
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        95,
                                        684,
                                        183,
                                        694
                                    ],
                                    "type": "text",
                                    "content": "_endswith 以指定字符结尾，",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        184,
                                        686,
                                        191,
                                        692
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.79
                                },
                                {
                                    "bbox": [
                                        191,
                                        684,
                                        245,
                                        694
                                    ],
                                    "type": "text",
                                    "content": "号后面为字符串。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        700,
                        314,
                        710
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 31,
                    "lines": [
                        {
                            "bbox": [
                                93,
                                699,
                                315,
                                711
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        93,
                                        699,
                                        208,
                                        711
                                    ],
                                    "type": "text",
                                    "content": "_year 是 DateField 数据类型的年份，",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        208,
                                        702,
                                        215,
                                        708
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.73
                                },
                                {
                                    "bbox": [
                                        215,
                                        699,
                                        315,
                                        711
                                    ],
                                    "type": "text",
                                    "content": "号后面为数字。__day/__month",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [],
            "page_size": [
                595,
                841
            ],
            "page_idx": 39
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        88,
                        85,
                        119,
                        101
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                87,
                                84,
                                121,
                                104
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        84,
                                        121,
                                        104
                                    ],
                                    "type": "text",
                                    "content": "删除",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        137,
                        205,
                        147
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                137,
                                205,
                                148
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        137,
                                        205,
                                        148
                                    ],
                                    "type": "text",
                                    "content": "方式一：使用模型类的 对象.delete()。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        153,
                        226,
                        162
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                153,
                                226,
                                163
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        153,
                                        226,
                                        163
                                    ],
                                    "type": "text",
                                    "content": "返回值：元组，第一个元素为受影响的行数。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        168,
                        255,
                        178
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                168,
                                257,
                                179
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        168,
                                        257,
                                        179
                                    ],
                                    "type": "text",
                                    "content": "books=models.Book.objects.filter(pk=8).first().delete()",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        184,
                        239,
                        194
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                183,
                                239,
                                195
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        183,
                                        239,
                                        195
                                    ],
                                    "type": "text",
                                    "content": "方式二：使用 QuerySet 类型数据.delete()(推荐)",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        200,
                        226,
                        209
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                200,
                                226,
                                209
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        200,
                                        226,
                                        209
                                    ],
                                    "type": "text",
                                    "content": "返回值：元组，第一个元素为受影响的行数。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        215,
                        261,
                        225
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                214,
                                261,
                                226
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        214,
                                        261,
                                        226
                                    ],
                                    "type": "text",
                                    "content": "books=models.Book.objects.filter(pk__in=[1,2]).delete()",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        104,
                        231,
                        503,
                        272
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 9,
                    "blocks": [
                        {
                            "bbox": [
                                104,
                                231,
                                503,
                                256
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 7,
                            "lines": [
                                {
                                    "bbox": [
                                        124,
                                        232,
                                        504,
                                        240
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                124,
                                                232,
                                                504,
                                                240
                                            ],
                                            "type": "text",
                                            "content": "a. Django 删除数据时，会模仿 SQL约束 ON DELETE CASCADE 的行为，也就是删除一个对象时也会删除与它相关联的",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        124,
                                        246,
                                        158,
                                        257
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                124,
                                                246,
                                                158,
                                                257
                                            ],
                                            "type": "text",
                                            "content": "外键对象。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                104,
                                262,
                                487,
                                272
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 8,
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        262,
                                        487,
                                        272
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                264,
                                                113,
                                                268
                                            ],
                                            "type": "text",
                                            "content": ".",
                                            "score": 0.702
                                        },
                                        {
                                            "bbox": [
                                                113,
                                                262,
                                                487,
                                                272
                                            ],
                                            "type": "text",
                                            "content": "b. delete() 方法是 QuerySet 数据类型的方法，但并不适用于 Manager 本身。也就是想要删除所有数据，不能不写 all。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        87,
                        278,
                        231,
                        287
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                277,
                                232,
                                288
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        277,
                                        232,
                                        288
                                    ],
                                    "type": "text",
                                    "content": "books=models.Book.objects.delete() # 报错",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        293,
                        266,
                        303
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                292,
                                267,
                                304
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        292,
                                        217,
                                        304
                                    ],
                                    "type": "text",
                                    "content": "books=models.Book.objects.all().delete()",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        230,
                                        293,
                                        267,
                                        302
                                    ],
                                    "type": "text",
                                    "content": "# 删除成功",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        327,
                        119,
                        343
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                86,
                                324,
                                121,
                                347
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        86,
                                        324,
                                        121,
                                        347
                                    ],
                                    "type": "text",
                                    "content": "修改",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        380,
                        114,
                        389
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                87,
                                379,
                                116,
                                391
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        379,
                                        116,
                                        391
                                    ],
                                    "type": "text",
                                    "content": "方式一：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        413,
                        306,
                        431
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                412,
                                307,
                                432
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        412,
                                        205,
                                        432
                                    ],
                                    "type": "text",
                                    "content": "模型类的对象.属性",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        206,
                                        415,
                                        219,
                                        428
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.85
                                },
                                {
                                    "bbox": [
                                        220,
                                        412,
                                        307,
                                        432
                                    ],
                                    "type": "text",
                                    "content": "更改的属性值",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        466,
                        154,
                        476
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                465,
                                154,
                                476
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        465,
                                        154,
                                        476
                                    ],
                                    "type": "text",
                                    "content": "模型类的对象.save()",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        482,
                        184,
                        491
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                482,
                                184,
                                491
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        482,
                                        184,
                                        491
                                    ],
                                    "type": "text",
                                    "content": "返回值：编辑的模型类的对象。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        497,
                        234,
                        507
                    ],
                    "type": "interline_equation",
                    "angle": 0,
                    "lines": [
                        {
                            "bbox": [
                                87,
                                497,
                                234,
                                507
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        497,
                                        234,
                                        507
                                    ],
                                    "type": "interline_equation",
                                    "content": "\\text {b o o k s} = \\text {m o d e l s . B o o k . o b j e c t s . f i l t e r} (\\mathrm {p k} = 7). \\text {f i r s t ()}",
                                    "image_path": "fc7d89fc8ea84557914ba9e46bca67e5d5bf02f50cd0f88b0e1ac05676caa516.jpg"
                                }
                            ]
                        }
                    ],
                    "index": 17
                },
                {
                    "bbox": [
                        87,
                        513,
                        145,
                        522
                    ],
                    "type": "interline_equation",
                    "angle": 0,
                    "lines": [
                        {
                            "bbox": [
                                87,
                                513,
                                145,
                                522
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        513,
                                        145,
                                        522
                                    ],
                                    "type": "interline_equation",
                                    "content": "\\text {b o o k s . p r i c e} = 4 0 0",
                                    "image_path": "0f917cfef6ef803be7974ce3fc37fe598f54c058b8efa1cadfe6c982686a3191.jpg"
                                }
                            ]
                        }
                    ],
                    "index": 18
                },
                {
                    "bbox": [
                        87,
                        528,
                        130,
                        538
                    ],
                    "type": "interline_equation",
                    "angle": 0,
                    "lines": [
                        {
                            "bbox": [
                                87,
                                528,
                                130,
                                538
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        528,
                                        130,
                                        538
                                    ],
                                    "type": "interline_equation",
                                    "content": "\\mathsf {b o o k s . s a v e ()}",
                                    "image_path": "db6352a8096c8c7d2fd044e72ff86e9983a034fcd5f2e297052e5d72da7ab12b.jpg"
                                }
                            ]
                        }
                    ],
                    "index": 19
                },
                {
                    "bbox": [
                        87,
                        544,
                        289,
                        554
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                544,
                                290,
                                555
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        544,
                                        222,
                                        555
                                    ],
                                    "type": "text",
                                    "content": "方式二：QuerySet 类型数据.update(字段名",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        223,
                                        545,
                                        229,
                                        552
                                    ],
                                    "type": "inline_equation",
                                    "content": "\\mathbf { \\tau } = \\mathbf { \\dot { \\tau } }",
                                    "score": 0.59
                                },
                                {
                                    "bbox": [
                                        229,
                                        544,
                                        290,
                                        555
                                    ],
                                    "type": "text",
                                    "content": "更改的数据)（推荐）",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        560,
                        181,
                        569
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 21,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                560,
                                182,
                                569
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        560,
                                        182,
                                        569
                                    ],
                                    "type": "text",
                                    "content": "返回值：整数，受影响的行数",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        576,
                        104,
                        585
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 22,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                575,
                                105,
                                586
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        575,
                                        105,
                                        586
                                    ],
                                    "type": "text",
                                    "content": "实例",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        591,
                        250,
                        600
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 23,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                590,
                                251,
                                601
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        590,
                                        251,
                                        601
                                    ],
                                    "type": "text",
                                    "content": "from django.shortcuts import render,HttpResponse",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        606,
                        175,
                        615
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 24,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                606,
                                176,
                                617
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        606,
                                        176,
                                        617
                                    ],
                                    "type": "text",
                                    "content": "from app01 import models",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        622,
                        163,
                        631
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 25,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                621,
                                164,
                                632
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        621,
                                        164,
                                        632
                                    ],
                                    "type": "text",
                                    "content": "def add_book(request):",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        638,
                        306,
                        647
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 26,
                    "lines": [
                        {
                            "bbox": [
                                95,
                                637,
                                307,
                                648
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        95,
                                        637,
                                        116,
                                        648
                                    ],
                                    "type": "text",
                                    "content": "books",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        116,
                                        640,
                                        123,
                                        645
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.76
                                },
                                {
                                    "bbox": [
                                        124,
                                        637,
                                        307,
                                        648
                                    ],
                                    "type": "text",
                                    "content": "models.Book.objects.filter(pk__in=[7,8]).update(price=888)",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        669,
                        141,
                        678
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 27,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                669,
                                141,
                                678
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        669,
                                        141,
                                        678
                                    ],
                                    "type": "text",
                                    "content": "ORM - 添加数据",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        684,
                        170,
                        694
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 28,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                682,
                                171,
                                696
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        682,
                                        171,
                                        696
                                    ],
                                    "type": "text",
                                    "content": "一对多(外键 ForeignKey)",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        700,
                        279,
                        709
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 29,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                701,
                                279,
                                709
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        701,
                                        279,
                                        709
                                    ],
                                    "type": "text",
                                    "content": "方式一: 传对象的形式，返回值的数据类型是对象，书籍对象。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        716,
                        107,
                        724
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 30,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                715,
                                108,
                                726
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        715,
                                        108,
                                        726
                                    ],
                                    "type": "text",
                                    "content": "步骤：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        104,
                        731,
                        260,
                        756
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 33,
                    "blocks": [
                        {
                            "bbox": [
                                104,
                                731,
                                183,
                                740
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 31,
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        732,
                                        183,
                                        741
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                734,
                                                112,
                                                738
                                            ],
                                            "type": "text",
                                            "content": "",
                                            "score": 0.0
                                        },
                                        {
                                            "bbox": [
                                                124,
                                                732,
                                                183,
                                                741
                                            ],
                                            "type": "text",
                                            "content": "a. 获取出版社对象",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                104,
                                746,
                                260,
                                756
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 32,
                            "lines": [
                                {
                                    "bbox": [
                                        108,
                                        746,
                                        261,
                                        756
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                108,
                                                750,
                                                111,
                                                752
                                            ],
                                            "type": "text",
                                            "content": "",
                                            "score": 0.0
                                        },
                                        {
                                            "bbox": [
                                                124,
                                                746,
                                                261,
                                                756
                                            ],
                                            "type": "text",
                                            "content": "b. 给书籍的出版社属性pulish 传出版社对象",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                }
            ],
            "discarded_blocks": [],
            "page_size": [
                595,
                841
            ],
            "page_idx": 40
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        87,
                        80,
                        174,
                        89
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                80,
                                176,
                                90
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        80,
                                        176,
                                        90
                                    ],
                                    "type": "text",
                                    "content": "app01/views.py 文件代码：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        95,
                        163,
                        105
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                95,
                                164,
                                106
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        95,
                                        164,
                                        106
                                    ],
                                    "type": "text",
                                    "content": "def add_book(request):",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        111,
                        155,
                        121
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                95,
                                112,
                                155,
                                121
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        95,
                                        112,
                                        155,
                                        121
                                    ],
                                    "type": "text",
                                    "content": "# 获取出版社对象",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        127,
                        255,
                        137
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                95,
                                126,
                                256,
                                137
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        95,
                                        126,
                                        122,
                                        137
                                    ],
                                    "type": "text",
                                    "content": "pub_ob",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        122,
                                        128,
                                        130,
                                        135
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.71
                                },
                                {
                                    "bbox": [
                                        130,
                                        126,
                                        256,
                                        137
                                    ],
                                    "type": "text",
                                    "content": "models.Publish.objects.filter(pk=1).first()",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        142,
                        236,
                        153
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                95,
                                143,
                                236,
                                152
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        95,
                                        143,
                                        236,
                                        152
                                    ],
                                    "type": "text",
                                    "content": "# 给书籍的出版社属性publish传出版社对象",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        158,
                        427,
                        169
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                95,
                                158,
                                428,
                                169
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        95,
                                        158,
                                        113,
                                        169
                                    ],
                                    "type": "text",
                                    "content": "book",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        113,
                                        160,
                                        120,
                                        166
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.69
                                },
                                {
                                    "bbox": [
                                        120,
                                        158,
                                        275,
                                        169
                                    ],
                                    "type": "text",
                                    "content": "models.Book.objects.create(title=\"菜鸟教程\", price",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        275,
                                        159,
                                        292,
                                        168
                                    ],
                                    "type": "inline_equation",
                                    "content": "\\scriptstyle \\sum 0 0",
                                    "score": 0.56
                                },
                                {
                                    "bbox": [
                                        292,
                                        158,
                                        324,
                                        169
                                    ],
                                    "type": "text",
                                    "content": ", pub_date",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        324,
                                        159,
                                        330,
                                        166
                                    ],
                                    "type": "inline_equation",
                                    "content": "\\cdot = \"",
                                    "score": 0.59
                                },
                                {
                                    "bbox": [
                                        331,
                                        158,
                                        428,
                                        169
                                    ],
                                    "type": "text",
                                    "content": "2010-10-10\", publish=pub_obj)",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        174,
                        170,
                        184
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                95,
                                174,
                                171,
                                184
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        95,
                                        174,
                                        171,
                                        184
                                    ],
                                    "type": "text",
                                    "content": "print(book, type(book))",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        190,
                        184,
                        199
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                96,
                                189,
                                185,
                                200
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        96,
                                        189,
                                        185,
                                        200
                                    ],
                                    "type": "text",
                                    "content": "return HttpResponse(book)",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        205,
                        331,
                        215
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                204,
                                332,
                                216
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        204,
                                        332,
                                        216
                                    ],
                                    "type": "text",
                                    "content": "方式二: 传对象 id 的形式(由于传过来的数据一般是 id,所以传对象 id 是常用的)。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        221,
                        351,
                        230
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                90,
                                222,
                                352,
                                230
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        90,
                                        222,
                                        352,
                                        230
                                    ],
                                    "type": "text",
                                    "content": "一对多中，设置外键属性的类(多的表)中，MySQL 中显示的字段名是:外键属性名_id。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        236,
                        205,
                        245
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                238,
                                205,
                                245
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        238,
                                        205,
                                        245
                                    ],
                                    "type": "text",
                                    "content": "返回值的数据类型是对象，书籍对象。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        252,
                        107,
                        261
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                251,
                                108,
                                263
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        251,
                                        108,
                                        263
                                    ],
                                    "type": "text",
                                    "content": "步骤：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        105,
                        267,
                        298,
                        292
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 14,
                    "blocks": [
                        {
                            "bbox": [
                                105,
                                267,
                                196,
                                276
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 12,
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        268,
                                        198,
                                        277
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                269,
                                                111,
                                                274
                                            ],
                                            "type": "text",
                                            "content": ".",
                                            "score": 0.9
                                        },
                                        {
                                            "bbox": [
                                                124,
                                                268,
                                                198,
                                                277
                                            ],
                                            "type": "text",
                                            "content": "a. 获取出版社对象的 id",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                283,
                                298,
                                292
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 13,
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        284,
                                        298,
                                        292
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                286,
                                                112,
                                                289
                                            ],
                                            "type": "text",
                                            "content": "",
                                            "score": 0.0
                                        },
                                        {
                                            "bbox": [
                                                124,
                                                284,
                                                298,
                                                292
                                            ],
                                            "type": "text",
                                            "content": "b. 给书籍的关联出版社字段pulish_id 传出版社对象的 id",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        87,
                        298,
                        267,
                        308
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                298,
                                267,
                                308
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        298,
                                        267,
                                        308
                                    ],
                                    "type": "text",
                                    "content": "多对多(ManyToManyField)：在第三张关系表中新增数据",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        314,
                        188,
                        323
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                315,
                                189,
                                323
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        315,
                                        189,
                                        323
                                    ],
                                    "type": "text",
                                    "content": "方式一: 传对象形式，无返回值。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        330,
                        107,
                        338
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 17,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                329,
                                108,
                                339
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        329,
                                        108,
                                        339
                                    ],
                                    "type": "text",
                                    "content": "步骤：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        105,
                        345,
                        287,
                        386
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 21,
                    "blocks": [
                        {
                            "bbox": [
                                105,
                                345,
                                176,
                                354
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 18,
                            "lines": [
                                {
                                    "bbox": [
                                        108,
                                        346,
                                        176,
                                        354
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                108,
                                                348,
                                                111,
                                                351
                                            ],
                                            "type": "text",
                                            "content": "",
                                            "score": 0.0
                                        },
                                        {
                                            "bbox": [
                                                124,
                                                346,
                                                176,
                                                354
                                            ],
                                            "type": "text",
                                            "content": "a. 获取作者对象",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                361,
                                176,
                                370
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 19,
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        361,
                                        176,
                                        370
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                363,
                                                111,
                                                367
                                            ],
                                            "type": "text",
                                            "content": ".",
                                            "score": 0.658
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                361,
                                                176,
                                                370
                                            ],
                                            "type": "text",
                                            "content": "b. 获取书籍对象",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                376,
                                287,
                                386
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 20,
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        377,
                                        287,
                                        386
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                379,
                                                111,
                                                382
                                            ],
                                            "type": "text",
                                            "content": "",
                                            "score": 0.0
                                        },
                                        {
                                            "bbox": [
                                                124,
                                                377,
                                                287,
                                                386
                                            ],
                                            "type": "text",
                                            "content": "c. 给书籍对象的 authors 属性用 add 方法传作者对象",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        87,
                        391,
                        196,
                        401
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 22,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                392,
                                196,
                                401
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        392,
                                        196,
                                        401
                                    ],
                                    "type": "text",
                                    "content": "方式二: 传对象id形式，无返回值。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        407,
                        107,
                        417
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 23,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                407,
                                108,
                                418
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        407,
                                        108,
                                        418
                                    ],
                                    "type": "text",
                                    "content": "步骤：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        105,
                        423,
                        301,
                        464
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 27,
                    "blocks": [
                        {
                            "bbox": [
                                105,
                                423,
                                190,
                                432
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 24,
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        423,
                                        191,
                                        433
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                426,
                                                111,
                                                428
                                            ],
                                            "type": "text",
                                            "content": "",
                                            "score": 0.0
                                        },
                                        {
                                            "bbox": [
                                                124,
                                                423,
                                                191,
                                                433
                                            ],
                                            "type": "text",
                                            "content": "a. 获取作者对象的 id",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                439,
                                176,
                                447
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 25,
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        439,
                                        176,
                                        449
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                441,
                                                112,
                                                445
                                            ],
                                            "type": "text",
                                            "content": ".",
                                            "score": 0.82
                                        },
                                        {
                                            "bbox": [
                                                124,
                                                439,
                                                176,
                                                449
                                            ],
                                            "type": "text",
                                            "content": "b. 获取书籍对象",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                454,
                                301,
                                464
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 26,
                            "lines": [
                                {
                                    "bbox": [
                                        124,
                                        454,
                                        302,
                                        465
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                124,
                                                454,
                                                302,
                                                465
                                            ],
                                            "type": "text",
                                            "content": "c. 给书籍对象的 authors 属性用 add 方法传作者对象的 id",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        87,
                        470,
                        174,
                        480
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 28,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                470,
                                176,
                                481
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        470,
                                        176,
                                        481
                                    ],
                                    "type": "text",
                                    "content": "app01/views.py 文件代码：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        486,
                        163,
                        495
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 29,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                485,
                                164,
                                496
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        485,
                                        164,
                                        496
                                    ],
                                    "type": "text",
                                    "content": "def add_book(request):",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        501,
                        148,
                        510
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 30,
                    "lines": [
                        {
                            "bbox": [
                                95,
                                502,
                                148,
                                510
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        95,
                                        502,
                                        148,
                                        510
                                    ],
                                    "type": "text",
                                    "content": "# 获取作者对象",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        517,
                        279,
                        527
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 31,
                    "lines": [
                        {
                            "bbox": [
                                95,
                                517,
                                280,
                                528
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        95,
                                        517,
                                        116,
                                        528
                                    ],
                                    "type": "text",
                                    "content": "chong",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        116,
                                        518,
                                        124,
                                        525
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.74
                                },
                                {
                                    "bbox": [
                                        124,
                                        517,
                                        280,
                                        528
                                    ],
                                    "type": "text",
                                    "content": "models.Author.objects.filter(name=\"令狐冲\").first()",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        532,
                        161,
                        541
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 32,
                    "lines": [
                        {
                            "bbox": [
                                95,
                                533,
                                162,
                                542
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        95,
                                        533,
                                        162,
                                        542
                                    ],
                                    "type": "text",
                                    "content": "# 获取作者对象的id",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        548,
                        142,
                        556
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 33,
                    "lines": [
                        {
                            "bbox": [
                                95,
                                547,
                                143,
                                558
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        95,
                                        547,
                                        105,
                                        558
                                    ],
                                    "type": "text",
                                    "content": "pk",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        105,
                                        550,
                                        112,
                                        555
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.72
                                },
                                {
                                    "bbox": [
                                        113,
                                        547,
                                        143,
                                        558
                                    ],
                                    "type": "text",
                                    "content": "chong.pk",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        564,
                        148,
                        572
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 34,
                    "lines": [
                        {
                            "bbox": [
                                95,
                                564,
                                148,
                                572
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        95,
                                        564,
                                        148,
                                        572
                                    ],
                                    "type": "text",
                                    "content": "# 获取书籍对象",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        579,
                        271,
                        588
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 35,
                    "lines": [
                        {
                            "bbox": [
                                95,
                                579,
                                272,
                                590
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        95,
                                        579,
                                        113,
                                        590
                                    ],
                                    "type": "text",
                                    "content": "book",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        113,
                                        581,
                                        120,
                                        587
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.68
                                },
                                {
                                    "bbox": [
                                        120,
                                        579,
                                        212,
                                        590
                                    ],
                                    "type": "text",
                                    "content": "models.Book.objects.filter(titl",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        213,
                                        580,
                                        218,
                                        587
                                    ],
                                    "type": "inline_equation",
                                    "content": "\\mathrel { \\mathop : } \\mathbf { \\overline { { \\mathbf { \\Lambda } } } }",
                                    "score": 0.57
                                },
                                {
                                    "bbox": [
                                        219,
                                        579,
                                        272,
                                        590
                                    ],
                                    "type": "text",
                                    "content": "\"冲灵剑法\").first()",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        594,
                        273,
                        603
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 36,
                    "lines": [
                        {
                            "bbox": [
                                95,
                                595,
                                274,
                                603
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        95,
                                        595,
                                        274,
                                        603
                                    ],
                                    "type": "text",
                                    "content": "# 给书籍对象的 authors 属性用 add 方法传作者对象的 id",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        610,
                        164,
                        619
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 37,
                    "lines": [
                        {
                            "bbox": [
                                95,
                                609,
                                164,
                                620
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        95,
                                        609,
                                        164,
                                        620
                                    ],
                                    "type": "text",
                                    "content": "book.authors.add(pk)",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        626,
                        158,
                        635
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 38,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                625,
                                158,
                                636
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        625,
                                        158,
                                        636
                                    ],
                                    "type": "text",
                                    "content": "关联管理器(对象调用)",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        641,
                        107,
                        650
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 39,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                640,
                                108,
                                652
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        640,
                                        108,
                                        652
                                    ],
                                    "type": "text",
                                    "content": "前提：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        105,
                        656,
                        311,
                        682
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 42,
                    "blocks": [
                        {
                            "bbox": [
                                105,
                                656,
                                220,
                                666
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 40,
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        657,
                                        219,
                                        666
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                660,
                                                111,
                                                662
                                            ],
                                            "type": "text",
                                            "content": "",
                                            "score": 0.0
                                        },
                                        {
                                            "bbox": [
                                                124,
                                                657,
                                                219,
                                                666
                                            ],
                                            "type": "text",
                                            "content": "多对多（双向均有关联管理器）",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                672,
                                311,
                                682
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 41,
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        673,
                                        311,
                                        682
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                675,
                                                110,
                                                678
                                            ],
                                            "type": "text",
                                            "content": "",
                                            "score": 0.0
                                        },
                                        {
                                            "bbox": [
                                                124,
                                                673,
                                                311,
                                                682
                                            ],
                                            "type": "text",
                                            "content": "一对多（只有多的那个类的对象有关联管理器，即反向才有）",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        87,
                        687,
                        121,
                        698
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 43,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                687,
                                122,
                                698
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        687,
                                        122,
                                        698
                                    ],
                                    "type": "text",
                                    "content": "语法格式：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        703,
                        132,
                        713
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 44,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                703,
                                132,
                                714
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        703,
                                        132,
                                        714
                                    ],
                                    "type": "text",
                                    "content": "正向：属性名",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        719,
                        161,
                        729
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 45,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                719,
                                162,
                                729
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        719,
                                        162,
                                        729
                                    ],
                                    "type": "text",
                                    "content": "反向：小写类名加_set",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        735,
                        160,
                        744
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 46,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                735,
                                161,
                                745
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        735,
                                        161,
                                        745
                                    ],
                                    "type": "text",
                                    "content": "注意：一对多只能反向",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        751,
                        121,
                        760
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 47,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                751,
                                123,
                                761
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        751,
                                        123,
                                        761
                                    ],
                                    "type": "text",
                                    "content": "常用方法：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [],
            "page_size": [
                595,
                841
            ],
            "page_idx": 41
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        86,
                        80,
                        314,
                        89
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                80,
                                314,
                                90
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        80,
                                        314,
                                        90
                                    ],
                                    "type": "text",
                                    "content": "add()：用于多对多，把指定的模型对象添加到关联对象集（关系表）中。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        95,
                        381,
                        105
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                95,
                                383,
                                106
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        95,
                                        383,
                                        106
                                    ],
                                    "type": "text",
                                    "content": "注意：add() 在一对多(即外键)中，只能传对象（ *QuerySet数据类型），不能传 id（*[id表]）。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        112,
                        124,
                        121
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                87,
                                111,
                                126,
                                121
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        111,
                                        126,
                                        121
                                    ],
                                    "type": "text",
                                    "content": "*[ ] 的使用:",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        127,
                        145,
                        136
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                127,
                                145,
                                136
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        127,
                                        145,
                                        136
                                    ],
                                    "type": "text",
                                    "content": "# 方式一：传对象",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        142,
                        224,
                        152
                    ],
                    "type": "interline_equation",
                    "angle": 0,
                    "lines": [
                        {
                            "bbox": [
                                87,
                                142,
                                224,
                                152
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        142,
                                        224,
                                        152
                                    ],
                                    "type": "interline_equation",
                                    "content": "\\text {b o o k} \\_ \\text {o b j} = \\text {m o d e l s . B o o k . o b j e c t s . g e t (i d = 1 0)}",
                                    "image_path": "d56ee4c86568325d864d0a31c1f11c4c5a646b8fa6a24c5508d8de83a654f01e.jpg"
                                }
                            ]
                        }
                    ],
                    "index": 4
                },
                {
                    "bbox": [
                        87,
                        158,
                        246,
                        168
                    ],
                    "type": "interline_equation",
                    "angle": 0,
                    "lines": [
                        {
                            "bbox": [
                                87,
                                158,
                                246,
                                168
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        158,
                                        246,
                                        168
                                    ],
                                    "type": "interline_equation",
                                    "content": "\\text {a u t o r} = \\text {m o d e l s . A u t o r . o b j e c t s . f i l t e r (i d \\_ g t = 2)}",
                                    "image_path": "42e44f97eabe1dc2cbe007beb2d33e8eae4f45807cb45fbd8f8a2b2323fd276b.jpg"
                                }
                            ]
                        }
                    ],
                    "index": 5
                },
                {
                    "bbox": [
                        86,
                        174,
                        362,
                        184
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                174,
                                362,
                                183
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        174,
                                        362,
                                        183
                                    ],
                                    "type": "text",
                                    "content": "book_obj.authors.add(*author_list) # 将 id 大于 2 的作者对象添加到这本书的作者集合中",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        190,
                        152,
                        198
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                190,
                                152,
                                199
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        190,
                                        152,
                                        199
                                    ],
                                    "type": "text",
                                    "content": "# 方式二：传对象id",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        205,
                        352,
                        215
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                205,
                                354,
                                215
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        205,
                                        354,
                                        215
                                    ],
                                    "type": "text",
                                    "content": "book_obj.authors.add(*[1,3]) # 将 id=1 和 id=3 的作者对象添加到这本书的作者集合中",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        221,
                        174,
                        230
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                219,
                                174,
                                231
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        219,
                                        174,
                                        231
                                    ],
                                    "type": "text",
                                    "content": "return HttpResponse(\"ok\")",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        236,
                        154,
                        246
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                235,
                                154,
                                246
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        235,
                                        154,
                                        246
                                    ],
                                    "type": "text",
                                    "content": "反向：小写表名_set",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        252,
                        265,
                        262
                    ],
                    "type": "interline_equation",
                    "angle": 0,
                    "lines": [
                        {
                            "bbox": [
                                87,
                                252,
                                265,
                                262
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        252,
                                        265,
                                        262
                                    ],
                                    "type": "interline_equation",
                                    "content": "y i n g = \\text {m o d e l s . A u t h o r . o b j e c t s . f i l t e r} (\\text {n a m e} = ^ {\\prime \\prime} \\text {任 盈 盈} ^ {\\prime \\prime}). \\text {f i r s t ()}",
                                    "image_path": "70f231bec2a80631a4c6676abfeddf00a003a605aaa3d71dd45d3338c1765795.jpg"
                                }
                            ]
                        }
                    ],
                    "index": 11
                },
                {
                    "bbox": [
                        87,
                        267,
                        263,
                        277
                    ],
                    "type": "interline_equation",
                    "angle": 0,
                    "lines": [
                        {
                            "bbox": [
                                87,
                                267,
                                263,
                                277
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        267,
                                        263,
                                        277
                                    ],
                                    "type": "interline_equation",
                                    "content": "\\text {b o o k} = \\text {m o d e l s . B o o k . o b j e c t s . f i l t e r (t i t l e = ＂ 冲 灵 剑 法 ＂) . f i r s t ()}",
                                    "image_path": "0240a07293fce298184f72d18b3ce7853709900e7b3a444043c58e6eba1a6a38.jpg"
                                }
                            ]
                        }
                    ],
                    "index": 12
                },
                {
                    "bbox": [
                        87,
                        283,
                        167,
                        292
                    ],
                    "type": "interline_equation",
                    "angle": 0,
                    "lines": [
                        {
                            "bbox": [
                                87,
                                283,
                                167,
                                292
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        283,
                                        167,
                                        292
                                    ],
                                    "type": "interline_equation",
                                    "content": "\\text {y i n g . b o o k \\_ s e t . a d d (b o o k)}",
                                    "image_path": "68223dbe76a8e10f070b148b4d74280836be2efb9a0baa4774d55c00954cbae6.jpg"
                                }
                            ]
                        }
                    ],
                    "index": 13
                },
                {
                    "bbox": [
                        87,
                        314,
                        186,
                        324
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                312,
                                186,
                                325
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        312,
                                        186,
                                        325
                                    ],
                                    "type": "text",
                                    "content": "1. 正向查询（Forward Query）",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        330,
                        105,
                        338
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                328,
                                105,
                                339
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        328,
                                        105,
                                        339
                                    ],
                                    "type": "text",
                                    "content": "定义",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        105,
                        344,
                        273,
                        370
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 18,
                    "blocks": [
                        {
                            "bbox": [
                                105,
                                344,
                                273,
                                354
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 16,
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        344,
                                        275,
                                        355
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                348,
                                                111,
                                                351
                                            ],
                                            "type": "text",
                                            "content": "",
                                            "score": 0.0
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                344,
                                                275,
                                                355
                                            ],
                                            "type": "text",
                                            "content": "从“持有外键的模型”访问“被关联的模型”。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                360,
                                223,
                                370
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 17,
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        360,
                                        224,
                                        371
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                363,
                                                111,
                                                367
                                            ],
                                            "type": "text",
                                            "content": "",
                                            "score": 0.0
                                        },
                                        {
                                            "bbox": [
                                                124,
                                                360,
                                                224,
                                                371
                                            ],
                                            "type": "text",
                                            "content": "使用属性名直接访问关联对象。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        87,
                        376,
                        186,
                        386
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                374,
                                186,
                                388
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        374,
                                        186,
                                        388
                                    ],
                                    "type": "text",
                                    "content": "2. 反向查询（Reverse Query）",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        392,
                        104,
                        401
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                391,
                                105,
                                402
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        391,
                                        105,
                                        402
                                    ],
                                    "type": "text",
                                    "content": "定义",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        105,
                        407,
                        273,
                        433
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 23,
                    "blocks": [
                        {
                            "bbox": [
                                105,
                                407,
                                273,
                                417
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 21,
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        407,
                                        275,
                                        418
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                411,
                                                111,
                                                413
                                            ],
                                            "type": "text",
                                            "content": "",
                                            "score": 0.0
                                        },
                                        {
                                            "bbox": [
                                                124,
                                                407,
                                                275,
                                                418
                                            ],
                                            "type": "text",
                                            "content": "从“被关联的模型”访问“持有外键的模型”。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                423,
                                265,
                                433
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 22,
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        423,
                                        265,
                                        433
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                426,
                                                111,
                                                429
                                            ],
                                            "type": "text",
                                            "content": "",
                                            "score": 0.0
                                        },
                                        {
                                            "bbox": [
                                                124,
                                                423,
                                                265,
                                                433
                                            ],
                                            "type": "text",
                                            "content": "默认使用小写类名_set 作为关联管理器名称。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        87,
                        439,
                        241,
                        449
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 24,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                439,
                                242,
                                449
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        439,
                                        242,
                                        449
                                    ],
                                    "type": "text",
                                    "content": "remove()：从关联对象集中移除执行的模型对象。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        454,
                        337,
                        464
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 25,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                454,
                                339,
                                465
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        454,
                                        339,
                                        465
                                    ],
                                    "type": "text",
                                    "content": "对于 ForeignKey 对象，这个方法仅在 null=True（可以为空）时存在，无返回值。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        470,
                        104,
                        479
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 26,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                469,
                                105,
                                481
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        469,
                                        105,
                                        481
                                    ],
                                    "type": "text",
                                    "content": "实例",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        486,
                        227,
                        495
                    ],
                    "type": "interline_equation",
                    "angle": 0,
                    "lines": [
                        {
                            "bbox": [
                                87,
                                486,
                                227,
                                495
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        486,
                                        227,
                                        495
                                    ],
                                    "type": "interline_equation",
                                    "content": "\\text {a u t o r} = \\text {m o d e l s . A u t h o r . o b j e c t s . g e t (i d = 1)}",
                                    "image_path": "fb270fcf57b2e290c2edb9b562db20088f0d2adae0d65c9a375938493764fa93.jpg"
                                }
                            ]
                        }
                    ],
                    "index": 27
                },
                {
                    "bbox": [
                        87,
                        501,
                        224,
                        510
                    ],
                    "type": "interline_equation",
                    "angle": 0,
                    "lines": [
                        {
                            "bbox": [
                                87,
                                501,
                                224,
                                510
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        501,
                                        224,
                                        510
                                    ],
                                    "type": "interline_equation",
                                    "content": "\\text {b o o k} \\_ \\text {o b j} = \\text {m o d e l s . B o o k . o b j e c t s . g e t (i d = 1 1)}",
                                    "image_path": "4026222efcdaca598f9a968f93e1cf4be6211422ca2110470e125dc99a7a2481.jpg"
                                }
                            ]
                        }
                    ],
                    "index": 28
                },
                {
                    "bbox": [
                        87,
                        517,
                        212,
                        526
                    ],
                    "type": "interline_equation",
                    "angle": 0,
                    "lines": [
                        {
                            "bbox": [
                                87,
                                517,
                                212,
                                526
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        517,
                                        212,
                                        526
                                    ],
                                    "type": "interline_equation",
                                    "content": "\\text {a t h o r} \\quad \\text {o b j . b o o k} \\quad \\text {s e t . r e m o v e} (\\text {b o o k} \\quad \\text {o b j})",
                                    "image_path": "82085a5b7734a85b367d97b9b65e7db3abfffb8588626a2e511204b330427821.jpg"
                                }
                            ]
                        }
                    ],
                    "index": 29
                },
                {
                    "bbox": [
                        87,
                        532,
                        296,
                        542
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 30,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                533,
                                296,
                                542
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        533,
                                        296,
                                        542
                                    ],
                                    "type": "text",
                                    "content": "clear()：从关联对象集中移除一切对象，删除关联，不会删除对象。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        548,
                        303,
                        557
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 31,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                548,
                                304,
                                558
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        548,
                                        304,
                                        558
                                    ],
                                    "type": "text",
                                    "content": "对于 ForeignKey 对象，这个方法仅在 null=True（可以为空）时存在。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        564,
                        121,
                        572
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 32,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                564,
                                122,
                                572
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        564,
                                        122,
                                        572
                                    ],
                                    "type": "text",
                                    "content": "无返回值。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        579,
                        189,
                        588
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 33,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                580,
                                188,
                                588
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        580,
                                        188,
                                        588
                                    ],
                                    "type": "text",
                                    "content": "# 清空独孤九剑关联的所有作者",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        595,
                        263,
                        604
                    ],
                    "type": "interline_equation",
                    "angle": 0,
                    "lines": [
                        {
                            "bbox": [
                                87,
                                595,
                                263,
                                604
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        595,
                                        263,
                                        604
                                    ],
                                    "type": "interline_equation",
                                    "content": "\\text {b o o k} = \\text {m o d e l s . B o o k . o b j e c t s . f i l t e r (t i t l e} = \\text {＂ 菜 鸟 教 程 ＂) . f i r s t ()}",
                                    "image_path": "7baba95449cf64632b073e8451b04d66d26a048231befdf5b1cdc6bae7659411.jpg"
                                }
                            ]
                        }
                    ],
                    "index": 34
                },
                {
                    "bbox": [
                        87,
                        610,
                        152,
                        619
                    ],
                    "type": "interline_equation",
                    "angle": 0,
                    "lines": [
                        {
                            "bbox": [
                                87,
                                610,
                                152,
                                619
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        610,
                                        152,
                                        619
                                    ],
                                    "type": "interline_equation",
                                    "content": "\\text {b o o k . a u t h o r s . c l e a r ()}",
                                    "image_path": "4016f64b976c8d90b410ec2fa430152a2b8d93b434ca2b84ea77c6344e25aa42.jpg"
                                }
                            ]
                        }
                    ],
                    "index": 35
                },
                {
                    "bbox": [
                        87,
                        626,
                        122,
                        634
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 36,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                625,
                                124,
                                635
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        625,
                                        124,
                                        635
                                    ],
                                    "type": "text",
                                    "content": "ORM 查询",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        641,
                        156,
                        650
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 37,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                641,
                                157,
                                651
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        641,
                                        157,
                                        651
                                    ],
                                    "type": "text",
                                    "content": "基于对象的跨表查询。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        657,
                        139,
                        666
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 38,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                657,
                                140,
                                666
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        657,
                                        140,
                                        666
                                    ],
                                    "type": "text",
                                    "content": "正向：属性名称",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        672,
                        152,
                        682
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 39,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                672,
                                154,
                                682
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        672,
                                        154,
                                        682
                                    ],
                                    "type": "text",
                                    "content": "反向：小写类名_set",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        688,
                        111,
                        698
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 40,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                687,
                                113,
                                699
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        687,
                                        113,
                                        699
                                    ],
                                    "type": "text",
                                    "content": "一对多",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        703,
                        247,
                        713
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 41,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                704,
                                248,
                                714
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        704,
                                        248,
                                        714
                                    ],
                                    "type": "text",
                                    "content": "查询主键为 1 的书籍的出版社所在的城市（正向）。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        719,
                        104,
                        729
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 42,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                719,
                                105,
                                729
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        719,
                                        105,
                                        729
                                    ],
                                    "type": "text",
                                    "content": "实例",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        735,
                        235,
                        760
                    ],
                    "type": "interline_equation",
                    "angle": 0,
                    "lines": [
                        {
                            "bbox": [
                                87,
                                735,
                                235,
                                760
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        735,
                                        235,
                                        760
                                    ],
                                    "type": "interline_equation",
                                    "content": "\\begin{array}{l} \\text {b o o k} = \\text {m o d e l s . B o o k . o b j e c t s . f i l t e r (p k = 1 0) . f i r s t ()} \\\\ \\mathrm {r e s} = \\text {b o o k . p u b l i s h . c i t y} \\\\ \\end{array}",
                                    "image_path": "c5b0ce11005726d00766646118865cd52ba65dd0d2671caf9660bbb808f40dff.jpg"
                                }
                            ]
                        }
                    ],
                    "index": 43
                }
            ],
            "discarded_blocks": [],
            "page_size": [
                595,
                841
            ],
            "page_idx": 42
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        87,
                        80,
                        211,
                        89
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                81,
                                212,
                                89
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        81,
                                        212,
                                        89
                                    ],
                                    "type": "text",
                                    "content": "查询明教出版社出版的书籍名（反向）。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        95,
                        312,
                        105
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                96,
                                313,
                                106
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        96,
                                        313,
                                        106
                                    ],
                                    "type": "text",
                                    "content": "反向：对象.小写类名_set(pub.book_set) 可以跳转到关联的表(书籍表)。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        111,
                        395,
                        121
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                111,
                                396,
                                121
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        111,
                                        396,
                                        121
                                    ],
                                    "type": "text",
                                    "content": "pub.book_set.all()：取出书籍表的所有书籍对象，在一个 QuerySet 里，遍历取出一个个书籍对象。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        127,
                        104,
                        136
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                126,
                                105,
                                137
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        126,
                                        105,
                                        137
                                    ],
                                    "type": "text",
                                    "content": "实例",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        142,
                        280,
                        198
                    ],
                    "type": "interline_equation",
                    "angle": 0,
                    "lines": [
                        {
                            "bbox": [
                                87,
                                142,
                                280,
                                198
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        142,
                                        280,
                                        198
                                    ],
                                    "type": "interline_equation",
                                    "content": "\\begin{array}{l} \\mathrm {p u b} = \\text {m o d e l s . P u b l i s h . o b j e c t s . f i l t e r (n a m e = \" 明 教 出 版 社\")}. \\text {f i r s t ()} \\\\ \\operatorname {r e s} = \\operatorname {p u b}. \\operatorname {b o o k} _ {\\text {s e t}}. \\operatorname {a l l} () \\\\ f o r i \\text {i n} \\\\ \\mathbf {p r i n t} (i. t i l e) \\\\ \\end{array}",
                                    "image_path": "c476199b7cd2e33749abde48bc4d596f4bb28126f6714339febc01770feffb55.jpg"
                                }
                            ]
                        }
                    ],
                    "index": 4
                },
                {
                    "bbox": [
                        88,
                        206,
                        111,
                        214
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                205,
                                112,
                                215
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        205,
                                        112,
                                        215
                                    ],
                                    "type": "text",
                                    "content": "一对一",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        220,
                        169,
                        229
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                221,
                                170,
                                230
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        221,
                                        170,
                                        230
                                    ],
                                    "type": "text",
                                    "content": "查询令狐冲的电话（正向）",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        236,
                        301,
                        246
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                235,
                                302,
                                246
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        235,
                                        302,
                                        246
                                    ],
                                    "type": "text",
                                    "content": "正向：对象.属性 (author.au_detail) 可以跳转到关联的表(作者详情表)",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        252,
                        104,
                        260
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                251,
                                105,
                                262
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        251,
                                        105,
                                        262
                                    ],
                                    "type": "text",
                                    "content": "实例",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        267,
                        271,
                        277
                    ],
                    "type": "interline_equation",
                    "angle": 0,
                    "lines": [
                        {
                            "bbox": [
                                87,
                                267,
                                271,
                                277
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        267,
                                        271,
                                        277
                                    ],
                                    "type": "interline_equation",
                                    "content": "\\text {a u t h o r} = \\text {m o d e l s . A u t h o r . o b j e c t s . f i l t e r (n a m e = \" 令 狐 冲\") . f i r s t ()}",
                                    "image_path": "caf120c07fa74354a9df98079154b8e11fb40df6efbd79131d0dc61145637437.jpg"
                                }
                            ]
                        }
                    ],
                    "index": 9
                },
                {
                    "bbox": [
                        88,
                        283,
                        167,
                        291
                    ],
                    "type": "interline_equation",
                    "angle": 0,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                283,
                                167,
                                291
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        283,
                                        167,
                                        291
                                    ],
                                    "type": "interline_equation",
                                    "content": "\\mathrm {r e s} = \\text {a u t h o r}.",
                                    "image_path": "782dc3f135a797056669a0428372934b56972148b14242407f64ed6b12bca116.jpg"
                                }
                            ]
                        }
                    ],
                    "index": 10
                },
                {
                    "bbox": [
                        88,
                        299,
                        151,
                        308
                    ],
                    "type": "interline_equation",
                    "angle": 0,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                299,
                                151,
                                308
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        299,
                                        151,
                                        308
                                    ],
                                    "type": "interline_equation",
                                    "content": "\\operatorname {p r i n t} (\\text {r e s}, \\text {t y p e} (\\text {r e s}))",
                                    "image_path": "36ea7268349795267049cad1ff91b54047aca5bad2d530728168b3d10e099d61.jpg"
                                }
                            ]
                        }
                    ],
                    "index": 11
                },
                {
                    "bbox": [
                        87,
                        314,
                        232,
                        323
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                315,
                                233,
                                323
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        315,
                                        233,
                                        323
                                    ],
                                    "type": "text",
                                    "content": "查询所有住址在黑木崖的作者的姓名（反向）。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        329,
                        252,
                        339
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                329,
                                253,
                                339
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        329,
                                        253,
                                        339
                                    ],
                                    "type": "text",
                                    "content": "一对一的反向，用对象.小写类名即可，不用加_set。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        345,
                        286,
                        354
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                345,
                                287,
                                355
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        345,
                                        287,
                                        355
                                    ],
                                    "type": "text",
                                    "content": "反向：对象.小写类名(addr.author)可以跳转到关联的表(作者表)。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        361,
                        104,
                        370
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                359,
                                105,
                                371
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        359,
                                        105,
                                        371
                                    ],
                                    "type": "text",
                                    "content": "实例",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        376,
                        280,
                        417
                    ],
                    "type": "interline_equation",
                    "angle": 0,
                    "lines": [
                        {
                            "bbox": [
                                87,
                                376,
                                280,
                                417
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        376,
                                        280,
                                        417
                                    ],
                                    "type": "interline_equation",
                                    "content": "\\begin{array}{l} \\text {a d d r} = \\text {m o d e l s . A u t h o r D e a t i l . o b j e c t s . f i l t e r} (\\text {a d d r} = ^ {\\prime \\prime} \\text {黑 木 崖}) ^ {\\prime \\prime}). \\text {f i r s t} () \\\\ \\text {r e s} = \\text {a d d r . a u t h o r . n a m e} \\\\ \\operatorname {p r i n t} (\\text {r e s}, \\text {t y p e} (\\text {r e s})) \\\\ \\end{array}",
                                    "image_path": "c6fba145eb89255591d4ccf14d3f9a2434f8c9f8433a673542ec975f0e81936f.jpg"
                                }
                            ]
                        }
                    ],
                    "index": 16
                },
                {
                    "bbox": [
                        88,
                        423,
                        111,
                        432
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 17,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                422,
                                113,
                                433
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        422,
                                        113,
                                        433
                                    ],
                                    "type": "text",
                                    "content": "多对多",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        439,
                        232,
                        448
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                439,
                                233,
                                449
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        439,
                                        233,
                                        449
                                    ],
                                    "type": "text",
                                    "content": "菜鸟教程所有作者的名字以及手机号（正向）。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        454,
                        281,
                        464
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                454,
                                282,
                                465
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        454,
                                        282,
                                        465
                                    ],
                                    "type": "text",
                                    "content": "正向：对象.属性(book.authors)可以跳转到关联的表(作者表)。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        470,
                        378,
                        480
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                470,
                                379,
                                479
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        470,
                                        379,
                                        479
                                    ],
                                    "type": "text",
                                    "content": "作者表里没有作者电话，因此再次通过对象.属性(i.au_detail)跳转到关联的表（作者详情表）。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        486,
                        104,
                        495
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 21,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                485,
                                105,
                                497
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        485,
                                        105,
                                        497
                                    ],
                                    "type": "text",
                                    "content": "实例",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        501,
                        262,
                        511
                    ],
                    "type": "interline_equation",
                    "angle": 0,
                    "lines": [
                        {
                            "bbox": [
                                87,
                                501,
                                262,
                                511
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        501,
                                        262,
                                        511
                                    ],
                                    "type": "interline_equation",
                                    "content": "\\text {b o o k} = \\text {m o d e l s . B o o k . o b j e c t s . f i l t e r (t i t l e = \" 菜 鸟 教 程 ) . f i r s t ()}",
                                    "image_path": "07aac130929d87bb15a69d9b7239a6d0182c7c386dde69f66a81ac9862e986a9.jpg"
                                }
                            ]
                        }
                    ],
                    "index": 22
                },
                {
                    "bbox": [
                        88,
                        517,
                        161,
                        526
                    ],
                    "type": "interline_equation",
                    "angle": 0,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                517,
                                161,
                                526
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        517,
                                        161,
                                        526
                                    ],
                                    "type": "interline_equation",
                                    "content": "\\mathrm {r e s} = \\text {b o o k . a u t h o r s . a l l ()}",
                                    "image_path": "cf4a473d2ad348e82a4c14c9ba50684a75aa034b27bc0828b9639a8d7e120c12.jpg"
                                }
                            ]
                        }
                    ],
                    "index": 23
                },
                {
                    "bbox": [
                        88,
                        533,
                        124,
                        541
                    ],
                    "type": "interline_equation",
                    "angle": 0,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                533,
                                124,
                                541
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        533,
                                        124,
                                        541
                                    ],
                                    "type": "interline_equation",
                                    "content": "f o r i n \\text {r e s}:",
                                    "image_path": "815d75152ece8a6590b2a48f9288bb5205311dd6de47bb30c0ed549bd6e063b8.jpg"
                                }
                            ]
                        }
                    ],
                    "index": 24
                },
                {
                    "bbox": [
                        96,
                        548,
                        184,
                        557
                    ],
                    "type": "interline_equation",
                    "angle": 0,
                    "lines": [
                        {
                            "bbox": [
                                96,
                                548,
                                184,
                                557
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        96,
                                        548,
                                        184,
                                        557
                                    ],
                                    "type": "interline_equation",
                                    "content": "\\text {p r i n t} (\\mathrm {i . n a m e}, \\mathrm {i . a u} _ {\\text {d e t a l}}. \\text {t e l})",
                                    "image_path": "80a35abcbe2d1b0045801ea23518504d19841dc95dfe3a30bea49662c5c10a29.jpg"
                                }
                            ]
                        }
                    ],
                    "index": 25
                },
                {
                    "bbox": [
                        87,
                        563,
                        226,
                        573
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 26,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                563,
                                227,
                                573
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        563,
                                        227,
                                        573
                                    ],
                                    "type": "text",
                                    "content": "查询任我行出过的所有书籍的名字（反向）。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        579,
                        104,
                        587
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 27,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                578,
                                105,
                                589
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        578,
                                        105,
                                        589
                                    ],
                                    "type": "text",
                                    "content": "实例",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        595,
                        271,
                        650
                    ],
                    "type": "interline_equation",
                    "angle": 0,
                    "lines": [
                        {
                            "bbox": [
                                87,
                                595,
                                271,
                                650
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        595,
                                        271,
                                        650
                                    ],
                                    "type": "interline_equation",
                                    "content": "\\begin{array}{l} \\text {a u t h o r} = \\text {m o d e l s . A u t h o r . o b j e c t s . f i l t e r (n a m e} = ^ {\\prime \\prime} \\text {任 我 行}) ^ {\\prime \\prime}. \\text {f i r s t ()} \\\\ \\operatorname {r e s} = \\text {a u t h o r . b o o k \\_ s e t . a l l ()} \\\\ f o r i n \\text {r e s}: \\\\ \\mathbf {p r i n t} (i. t i l e) \\\\ \\end{array}",
                                    "image_path": "027afd4c68f929d890e6680396e7ef3c74b9adcdc1d5b26b0c42e0a0490c8d21.jpg"
                                }
                            ]
                        }
                    ],
                    "index": 28
                },
                {
                    "bbox": [
                        87,
                        656,
                        303,
                        666
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 29,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                657,
                                303,
                                666
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        657,
                                        303,
                                        666
                                    ],
                                    "type": "text",
                                    "content": "正向：属性名称__跨表的属性名称反向：小写类名__跨表的属性名称",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        672,
                        111,
                        681
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 30,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                671,
                                112,
                                682
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        671,
                                        112,
                                        682
                                    ],
                                    "type": "text",
                                    "content": "一对多",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        687,
                        239,
                        698
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 31,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                689,
                                240,
                                697
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        689,
                                        240,
                                        697
                                    ],
                                    "type": "text",
                                    "content": "查询菜鸟出版社出版过的所有书籍的名字与价格。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        704,
                        104,
                        713
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 32,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                703,
                                105,
                                714
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        703,
                                        105,
                                        714
                                    ],
                                    "type": "text",
                                    "content": "实例",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        719,
                        362,
                        729
                    ],
                    "type": "interline_equation",
                    "angle": 0,
                    "lines": [
                        {
                            "bbox": [
                                87,
                                719,
                                362,
                                729
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        719,
                                        362,
                                        729
                                    ],
                                    "type": "interline_equation",
                                    "content": "\\text {r e s} = \\text {m o d e l s . B o o k . o b j e c t s . f i l t e r (p u b l i s h \\_ n a m e = \" 菜 鸟 出 版 社\") . v a l u e s \\_ l i s t (\"} t h i t e , \" p r i c e \")",
                                    "image_path": "f8b3087e0752d8c51be4dcb83795a20b5f7a15fcff3ba00d4801d215b95bbbb4.jpg"
                                }
                            ]
                        }
                    ],
                    "index": 33
                },
                {
                    "bbox": [
                        87,
                        735,
                        303,
                        744
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 34,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                735,
                                304,
                                744
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        735,
                                        304,
                                        744
                                    ],
                                    "type": "text",
                                    "content": "正向：属性名称__跨表的属性名称反向：小写类名__跨表的属性名称",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        751,
                        111,
                        760
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 35,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                750,
                                112,
                                761
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        750,
                                        112,
                                        761
                                    ],
                                    "type": "text",
                                    "content": "一对多",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [],
            "page_size": [
                595,
                841
            ],
            "page_idx": 43
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        87,
                        80,
                        240,
                        89
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                81,
                                240,
                                89
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        81,
                                        240,
                                        89
                                    ],
                                    "type": "text",
                                    "content": "查询菜鸟出版社出版过的所有书籍的名字与价格。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        95,
                        104,
                        105
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                95,
                                105,
                                106
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        95,
                                        105,
                                        106
                                    ],
                                    "type": "text",
                                    "content": "实例",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        111,
                        362,
                        121
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                111,
                                364,
                                122
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        111,
                                        99,
                                        122
                                    ],
                                    "type": "text",
                                    "content": "res",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        99,
                                        114,
                                        107,
                                        120
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.69
                                },
                                {
                                    "bbox": [
                                        107,
                                        111,
                                        364,
                                        122
                                    ],
                                    "type": "text",
                                    "content": "models.Book.objects.filter(publish__name=\"菜鸟出版社\").values_list(\"title\", \"price\")",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        127,
                        357,
                        137
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                126,
                                358,
                                137
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        126,
                                        358,
                                        137
                                    ],
                                    "type": "text",
                                    "content": "反向：通过 小写类名__跨表的属性名称（book__title，book__price）跨表获取数据。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        142,
                        104,
                        152
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                142,
                                105,
                                153
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        142,
                                        105,
                                        153
                                    ],
                                    "type": "text",
                                    "content": "实例",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        158,
                        383,
                        168
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                158,
                                385,
                                170
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        158,
                                        99,
                                        170
                                    ],
                                    "type": "text",
                                    "content": "res",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        99,
                                        160,
                                        107,
                                        167
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.68
                                },
                                {
                                    "bbox": [
                                        107,
                                        158,
                                        385,
                                        170
                                    ],
                                    "type": "text",
                                    "content": "models.Publish.objects.filter(name=\"菜鸟出版社\").values_list(\"book__title\",\"book__price\")",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        174,
                        173,
                        183
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                173,
                                174,
                                185
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        173,
                                        174,
                                        185
                                    ],
                                    "type": "text",
                                    "content": "return HttpResponse(\"ok\")",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        189,
                        111,
                        198
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                87,
                                188,
                                113,
                                199
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        188,
                                        113,
                                        199
                                    ],
                                    "type": "text",
                                    "content": "多对多",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        205,
                        198,
                        214
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                206,
                                198,
                                215
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        206,
                                        198,
                                        215
                                    ],
                                    "type": "text",
                                    "content": "查询任我行出过的所有书籍的名字。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        220,
                        312,
                        230
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                221,
                                312,
                                230
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        221,
                                        312,
                                        230
                                    ],
                                    "type": "text",
                                    "content": "正向：通过 属性名称__跨表的属性名称(authors__name) 跨表获取数据：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        236,
                        326,
                        246
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                235,
                                327,
                                247
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        235,
                                        99,
                                        247
                                    ],
                                    "type": "text",
                                    "content": "res",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        99,
                                        238,
                                        107,
                                        244
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.68
                                },
                                {
                                    "bbox": [
                                        107,
                                        235,
                                        327,
                                        247
                                    ],
                                    "type": "text",
                                    "content": "models.Book.objects.filter(authors__name=\"任我行\").values_list(\"title\")",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        252,
                        306,
                        262
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                253,
                                306,
                                261
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        253,
                                        306,
                                        261
                                    ],
                                    "type": "text",
                                    "content": "反向：通过 小写类名__跨表的属性名称（book__title） 跨表获取数据：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        267,
                        322,
                        277
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                266,
                                323,
                                278
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        266,
                                        99,
                                        278
                                    ],
                                    "type": "text",
                                    "content": "res",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        99,
                                        269,
                                        107,
                                        275
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.71
                                },
                                {
                                    "bbox": [
                                        107,
                                        266,
                                        323,
                                        278
                                    ],
                                    "type": "text",
                                    "content": "models.Author.objects.filter(name=\"任我行\").values_list(\"book__title\")",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        283,
                        111,
                        291
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                87,
                                282,
                                112,
                                292
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        282,
                                        112,
                                        292
                                    ],
                                    "type": "text",
                                    "content": "一对一",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        298,
                        155,
                        307
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                299,
                                157,
                                308
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        299,
                                        157,
                                        308
                                    ],
                                    "type": "text",
                                    "content": "查询任我行的手机号。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        313,
                        309,
                        323
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                314,
                                309,
                                323
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        314,
                                        309,
                                        323
                                    ],
                                    "type": "text",
                                    "content": "正向：通过属性名称__跨表的属性名称(au_detail__tel) 跨表获取数据。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        329,
                        332,
                        339
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                329,
                                332,
                                341
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        329,
                                        99,
                                        341
                                    ],
                                    "type": "text",
                                    "content": "res",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        99,
                                        332,
                                        107,
                                        338
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.72
                                },
                                {
                                    "bbox": [
                                        107,
                                        329,
                                        332,
                                        341
                                    ],
                                    "type": "text",
                                    "content": "models.Author.objects.filter(name=\"任我行\").values_list(\"au_detail__tel\")",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        345,
                        320,
                        354
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 17,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                345,
                                320,
                                355
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        345,
                                        320,
                                        355
                                    ],
                                    "type": "text",
                                    "content": "反向：通过小写类名__跨表的属性名称（author__name）跨表获取数据。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        360,
                        341,
                        370
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                359,
                                342,
                                372
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        359,
                                        99,
                                        372
                                    ],
                                    "type": "text",
                                    "content": "res",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        99,
                                        363,
                                        107,
                                        369
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.63
                                },
                                {
                                    "bbox": [
                                        107,
                                        359,
                                        342,
                                        372
                                    ],
                                    "type": "text",
                                    "content": "models.AuthorDetail.objects.filter(author__name=\"任我行\").values_list(\"tel\")",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        376,
                        227,
                        386
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                376,
                                227,
                                386
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        376,
                                        227,
                                        386
                                    ],
                                    "type": "text",
                                    "content": "Django ORM – 多表实例（聚合与分组查询）",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        391,
                        161,
                        401
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                391,
                                162,
                                403
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        391,
                                        162,
                                        403
                                    ],
                                    "type": "text",
                                    "content": "聚合查询（aggregate）",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        407,
                        246,
                        417
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 21,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                407,
                                247,
                                417
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        407,
                                        247,
                                        417
                                    ],
                                    "type": "text",
                                    "content": "聚合查询函数是对一组值执行计算，并返回单个值。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        423,
                        408,
                        433
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 22,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                423,
                                409,
                                433
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        423,
                                        409,
                                        433
                                    ],
                                    "type": "text",
                                    "content": "Django 使用聚合查询前要先从 django.db.models 引入 Avg、Max、Min、Count、Sum（首字母大写）。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        439,
                        303,
                        448
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 23,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                439,
                                304,
                                449
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        439,
                                        304,
                                        449
                                    ],
                                    "type": "text",
                                    "content": "from django.db.models import Avg,Max,Min,Count,Sum # 引入函数",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        454,
                        198,
                        464
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 24,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                455,
                                198,
                                464
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        455,
                                        198,
                                        464
                                    ],
                                    "type": "text",
                                    "content": "聚合查询返回值的数据类型是字典。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        470,
                        365,
                        480
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 25,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                469,
                                366,
                                481
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        469,
                                        366,
                                        481
                                    ],
                                    "type": "text",
                                    "content": "聚合函数 aggregate() 是 QuerySet 的一个终止子句， 生成的一个汇总值，相当于 count()。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        485,
                        369,
                        495
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 26,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                485,
                                371,
                                496
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        485,
                                        371,
                                        496
                                    ],
                                    "type": "text",
                                    "content": "使用 aggregate() 后，数据类型就变为字典，不能再使用 QuerySet 数据类型的一些 API 了。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        501,
                        227,
                        510
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 27,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                501,
                                228,
                                511
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        501,
                                        228,
                                        511
                                    ],
                                    "type": "text",
                                    "content": "日期数据类型(DateField)可以用 Max 和 Min。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        516,
                        367,
                        526
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 28,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                517,
                                367,
                                526
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        517,
                                        367,
                                        526
                                    ],
                                    "type": "text",
                                    "content": "返回的字典中：键的名称默认是（属性名称加上__聚合函数名），值是计算出来的聚合值。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        532,
                        240,
                        541
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 29,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                533,
                                240,
                                541
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        533,
                                        240,
                                        541
                                    ],
                                    "type": "text",
                                    "content": "如果要自定义返回字典的键的名称，可以起别名：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        548,
                        220,
                        557
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 30,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                548,
                                221,
                                558
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        548,
                                        137,
                                        558
                                    ],
                                    "type": "text",
                                    "content": "aggregate(别名",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        138,
                                        549,
                                        144,
                                        555
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.76
                                },
                                {
                                    "bbox": [
                                        145,
                                        548,
                                        221,
                                        558
                                    ],
                                    "type": "text",
                                    "content": "聚合函数名(\"属性名称\"))",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        579,
                        157,
                        588
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 31,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                579,
                                158,
                                589
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        579,
                                        158,
                                        589
                                    ],
                                    "type": "text",
                                    "content": "分组查询（annotate）",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        594,
                        447,
                        604
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 32,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                594,
                                448,
                                605
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        594,
                                        448,
                                        605
                                    ],
                                    "type": "text",
                                    "content": "分组查询一般会用到聚合函数，所以使用前要先从 django.db.models 引入 Avg,Max,Min,Count,Sum（首字母大写）。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        610,
                        303,
                        619
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 33,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                610,
                                304,
                                620
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        610,
                                        304,
                                        620
                                    ],
                                    "type": "text",
                                    "content": "from django.db.models import Avg,Max,Min,Count,Sum # 引入函数",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        625,
                        114,
                        634
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 34,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                626,
                                115,
                                635
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        626,
                                        115,
                                        635
                                    ],
                                    "type": "text",
                                    "content": "返回值：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        104,
                        641,
                        373,
                        666
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 37,
                    "blocks": [
                        {
                            "bbox": [
                                104,
                                641,
                                361,
                                651
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 35,
                            "lines": [
                                {
                                    "bbox": [
                                        124,
                                        641,
                                        361,
                                        651
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                124,
                                                641,
                                                361,
                                                651
                                            ],
                                            "type": "text",
                                            "content": "分组后，用 values 取值，则返回值是 QuerySet 数据类型里面为一个个字典；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                104,
                                656,
                                373,
                                666
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 36,
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        657,
                                        374,
                                        667
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                660,
                                                111,
                                                662
                                            ],
                                            "type": "text",
                                            "content": "",
                                            "score": 0.0
                                        },
                                        {
                                            "bbox": [
                                                124,
                                                657,
                                                374,
                                                667
                                            ],
                                            "type": "text",
                                            "content": "分组后，用 values_list 取值，则返回值是 QuerySet 数据类型里面为一个个元组。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        87,
                        672,
                        285,
                        682
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 38,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                671,
                                286,
                                682
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        671,
                                        286,
                                        682
                                    ],
                                    "type": "text",
                                    "content": "MySQL 中的 limit 相当于 ORM 中的 QuerySet 数据类型的切片。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        687,
                        107,
                        698
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 39,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                687,
                                108,
                                698
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        687,
                                        108,
                                        698
                                    ],
                                    "type": "text",
                                    "content": "注意：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        703,
                        171,
                        713
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 40,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                704,
                                171,
                                713
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        704,
                                        171,
                                        713
                                    ],
                                    "type": "text",
                                    "content": "annotate 里面放聚合函数。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        719,
                        504,
                        760
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 43,
                    "blocks": [
                        {
                            "bbox": [
                                86,
                                719,
                                504,
                                744
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 41,
                            "lines": [
                                {
                                    "bbox": [
                                        89,
                                        719,
                                        504,
                                        729
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                721,
                                                94,
                                                724
                                            ],
                                            "type": "text",
                                            "content": "",
                                            "score": 0.0
                                        },
                                        {
                                            "bbox": [
                                                106,
                                                719,
                                                504,
                                                729
                                            ],
                                            "type": "text",
                                            "content": "values 或者 values_list 放在 annotate 前面：values 或者 values_list 是声明以什么字段分组，annotate 执行分组。前者相当于",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        107,
                                        735,
                                        210,
                                        744
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                735,
                                                210,
                                                744
                                            ],
                                            "type": "text",
                                            "content": "GROUP BY,后者相当于聚合函数",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                750,
                                504,
                                760
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 42,
                            "lines": [
                                {
                                    "bbox": [
                                        89,
                                        751,
                                        505,
                                        760
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                752,
                                                94,
                                                756
                                            ],
                                            "type": "text",
                                            "content": "",
                                            "score": 0.0
                                        },
                                        {
                                            "bbox": [
                                                105,
                                                751,
                                                505,
                                                760
                                            ],
                                            "type": "text",
                                            "content": "values 或者 values_list 放在 annotate 后面： annotate 表示直接以当前表的 pk 执行分组，values 或者 values_list 表示查询哪",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                }
            ],
            "discarded_blocks": [],
            "page_size": [
                595,
                841
            ],
            "page_idx": 44
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        105,
                        80,
                        384,
                        90
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                107,
                                80,
                                386,
                                90
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        107,
                                        80,
                                        386,
                                        90
                                    ],
                                    "type": "text",
                                    "content": "些字段， 并且要将 annotate 里的聚合函数起别名，在 values 或者 values_list 里写其别名。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        96,
                        279,
                        106
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                105,
                                95,
                                280,
                                107
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        105,
                                        95,
                                        280,
                                        107
                                    ],
                                    "type": "text",
                                    "content": "annotate 里相当于聚合函数，value 相当于 groupby 了",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        87,
                        111,
                        354,
                        169
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                87,
                                111,
                                354,
                                169
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        87,
                                        111,
                                        354,
                                        169
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                87,
                                                111,
                                                354,
                                                169
                                            ],
                                            "type": "text",
                                            "content": "res "
                                        },
                                        {
                                            "bbox": [
                                                87,
                                                111,
                                                354,
                                                169
                                            ],
                                            "type": "inline_equation",
                                            "content": "="
                                        },
                                        {
                                            "bbox": [
                                                87,
                                                111,
                                                354,
                                                169
                                            ],
                                            "type": "text",
                                            "content": " models.Publish.objects.values(\"name\"). annotate(in_price "
                                        },
                                        {
                                            "bbox": [
                                                87,
                                                111,
                                                354,
                                                169
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\equiv"
                                        },
                                        {
                                            "bbox": [
                                                87,
                                                111,
                                                354,
                                                169
                                            ],
                                            "type": "text",
                                            "content": " Min(\"book_price\"))   \nprint(res)   \nres "
                                        },
                                        {
                                            "bbox": [
                                                87,
                                                111,
                                                354,
                                                169
                                            ],
                                            "type": "inline_equation",
                                            "content": "="
                                        },
                                        {
                                            "bbox": [
                                                87,
                                                111,
                                                354,
                                                169
                                            ],
                                            "type": "text",
                                            "content": " models.Book.objects annotate(c "
                                        },
                                        {
                                            "bbox": [
                                                87,
                                                111,
                                                354,
                                                169
                                            ],
                                            "type": "inline_equation",
                                            "content": "="
                                        },
                                        {
                                            "bbox": [
                                                87,
                                                111,
                                                354,
                                                169
                                            ],
                                            "type": "text",
                                            "content": " Count(\"authors_name\").values(\"title\",\"c\")   \nprint(res)"
                                        }
                                    ]
                                }
                            ],
                            "index": 2,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 2,
                    "sub_type": "algorithm"
                },
                {
                    "bbox": [
                        88,
                        174,
                        115,
                        184
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                87,
                                174,
                                116,
                                184
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        174,
                                        116,
                                        184
                                    ],
                                    "type": "text",
                                    "content": "F() 查询",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        189,
                        343,
                        199
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                190,
                                344,
                                199
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        190,
                                        344,
                                        199
                                    ],
                                    "type": "text",
                                    "content": "F() 的实例可以在查询中引用字段，来比较同一个 model 实例中两个不同字段的值。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        205,
                        411,
                        215
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                205,
                                412,
                                216
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        205,
                                        412,
                                        216
                                    ],
                                    "type": "text",
                                    "content": "之前构造的过滤器都只是将字段值与某个常量做比较，如果想要对两个字段的值做比较，就需要用到 F()。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        221,
                        213,
                        230
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                221,
                                213,
                                230
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        221,
                                        213,
                                        230
                                    ],
                                    "type": "text",
                                    "content": "使用前要先从 django.db.models 引入 F:",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        236,
                        189,
                        245
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                236,
                                190,
                                245
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        236,
                                        190,
                                        245
                                    ],
                                    "type": "text",
                                    "content": "from django.db.models import F",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        252,
                        107,
                        261
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                251,
                                108,
                                262
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        251,
                                        108,
                                        262
                                    ],
                                    "type": "text",
                                    "content": "用法：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        267,
                        132,
                        277
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                268,
                                133,
                                278
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        268,
                                        133,
                                        278
                                    ],
                                    "type": "text",
                                    "content": "F(\"字段名称\")",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        282,
                        218,
                        292
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                282,
                                218,
                                292
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        282,
                                        218,
                                        292
                                    ],
                                    "type": "text",
                                    "content": "F 动态获取对象字段的值，可以进行运算。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        298,
                        324,
                        308
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                298,
                                325,
                                309
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        298,
                                        325,
                                        309
                                    ],
                                    "type": "text",
                                    "content": "Django 支持 F() 对象之间以及 F() 对象和常数之间的加减乘除和取余的操作。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        314,
                        218,
                        323
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                313,
                                218,
                                324
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        313,
                                        218,
                                        324
                                    ],
                                    "type": "text",
                                    "content": "修改操作（update）也可以使用 F() 函数。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        329,
                        163,
                        339
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                330,
                                163,
                                339
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        330,
                                        163,
                                        339
                                    ],
                                    "type": "text",
                                    "content": "查询工资大于年龄的人：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        345,
                        104,
                        354
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                344,
                                105,
                                356
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        344,
                                        105,
                                        356
                                    ],
                                    "type": "text",
                                    "content": "实例",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        360,
                        192,
                        370
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                360,
                                193,
                                370
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        360,
                                        193,
                                        370
                                    ],
                                    "type": "text",
                                    "content": "from django.db.models import F",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        379,
                        96,
                        384
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                381,
                                95,
                                385
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        381,
                                        95,
                                        385
                                    ],
                                    "type": "text",
                                    "content": "...",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        391,
                        321,
                        401
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 17,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                391,
                                323,
                                403
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        391,
                                        323,
                                        403
                                    ],
                                    "type": "text",
                                    "content": "book=models.Emp.objects.filter(salary__gt=F(\"age\")).values(\"name\",\"age\")",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        407,
                        116,
                        417
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                407,
                                117,
                                418
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        407,
                                        117,
                                        418
                                    ],
                                    "type": "text",
                                    "content": "Q() 查询",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        423,
                        214,
                        433
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                422,
                                214,
                                434
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        422,
                                        214,
                                        434
                                    ],
                                    "type": "text",
                                    "content": "使用前要先从 django.db.models 引入 Q:",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        439,
                        190,
                        449
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                437,
                                191,
                                449
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        437,
                                        191,
                                        449
                                    ],
                                    "type": "text",
                                    "content": "from django.db.models import Q",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        454,
                        107,
                        464
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 21,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                454,
                                108,
                                465
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        454,
                                        108,
                                        465
                                    ],
                                    "type": "text",
                                    "content": "用法：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        486,
                        128,
                        496
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 22,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                485,
                                129,
                                497
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        485,
                                        129,
                                        497
                                    ],
                                    "type": "text",
                                    "content": "Q(条件判断)",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        501,
                        107,
                        510
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 23,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                501,
                                108,
                                511
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        501,
                                        108,
                                        511
                                    ],
                                    "type": "text",
                                    "content": "例如：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        533,
                        164,
                        543
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 24,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                532,
                                166,
                                543
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        532,
                                        166,
                                        543
                                    ],
                                    "type": "text",
                                    "content": "Q(title__startswith=\"菜\")",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        547,
                        432,
                        557
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 25,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                546,
                                434,
                                558
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        546,
                                        434,
                                        558
                                    ],
                                    "type": "text",
                                    "content": "之前构造的过滤器里的多个条件的关系都是 and，如果需要执行更复杂的查询（例如 or 语句），就可以使用 Q 。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        579,
                        247,
                        589
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 26,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                579,
                                248,
                                589
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        579,
                                        248,
                                        589
                                    ],
                                    "type": "text",
                                    "content": "Q 对象可以使用 & | ~ （与 或非）操作符进行组合。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        610,
                        163,
                        620
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 27,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                609,
                                164,
                                621
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        609,
                                        164,
                                        621
                                    ],
                                    "type": "text",
                                    "content": "优先级从高到低：~ & |。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        641,
                        504,
                        666
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 28,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                642,
                                505,
                                650
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        642,
                                        505,
                                        650
                                    ],
                                    "type": "text",
                                    "content": "可以混合使用 Q 对象和关键字参数，Q 对象和关键字参数是用\"and\"拼在一起的（即将逗号看成 and ），但是 Q 对象必须位于所有关键",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                657,
                                136,
                                666
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        657,
                                        136,
                                        666
                                    ],
                                    "type": "text",
                                    "content": "字参数的前面。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        687,
                        268,
                        698
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 29,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                688,
                                269,
                                698
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        688,
                                        269,
                                        698
                                    ],
                                    "type": "text",
                                    "content": "查询价格大于 350 或者名称以菜开头的书籍的名称和价格。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        703,
                        296,
                        714
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 30,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                704,
                                298,
                                713
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        704,
                                        298,
                                        713
                                    ],
                                    "type": "text",
                                    "content": "查询出版日期是 2004 或者1999 年，并且书名中包含有\"菜\"的书籍。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        719,
                        267,
                        729
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 31,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                720,
                                268,
                                729
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        720,
                                        268,
                                        729
                                    ],
                                    "type": "text",
                                    "content": "Q 对象和关键字混合使用，Q 对象要在所有关键字的前面:",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [],
            "page_size": [
                595,
                841
            ],
            "page_idx": 45
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        88,
                        85,
                        119,
                        101
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                86,
                                83,
                                121,
                                104
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        86,
                                        83,
                                        121,
                                        104
                                    ],
                                    "type": "text",
                                    "content": "总结",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        153,
                        185,
                        163
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                96,
                                153,
                                186,
                                163
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        96,
                                        153,
                                        186,
                                        163
                                    ],
                                    "type": "text",
                                    "content": "books=models.Book.objects",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        168,
                        174,
                        179
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                95,
                                169,
                                174,
                                179
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        95,
                                        169,
                                        174,
                                        179
                                    ],
                                    "type": "text",
                                    "content": "print(books,type(books))",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        181,
                        465,
                        196
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                180,
                                465,
                                197
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        180,
                                        465,
                                        197
                                    ],
                                    "type": "text",
                                    "content": "TestModel.Book.objects <class 'django.db.models.manager.Manager'>",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        200,
                        433,
                        211
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                199,
                                433,
                                211
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        199,
                                        108,
                                        211
                                    ],
                                    "type": "text",
                                    "content": "books",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        108,
                                        201,
                                        116,
                                        208
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.75
                                },
                                {
                                    "bbox": [
                                        116,
                                        199,
                                        433,
                                        211
                                    ],
                                    "type": "text",
                                    "content": "models.Book.objects.create(title=\"如来神掌\",price=200,publish=\"功夫出版社\",pub_date=\"2010-10-10\")",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        96,
                        215,
                        234,
                        225
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                95,
                                216,
                                235,
                                225
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        95,
                                        216,
                                        235,
                                        225
                                    ],
                                    "type": "text",
                                    "content": "print(books, type(books)) # Book object (18)",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        229,
                        308,
                        243
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                229,
                                308,
                                243
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        229,
                                        308,
                                        243
                                    ],
                                    "type": "text",
                                    "content": "Book object (7) <class 'TestModel.models.Book'>",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        246,
                        202,
                        256
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                95,
                                246,
                                203,
                                257
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        95,
                                        246,
                                        116,
                                        257
                                    ],
                                    "type": "text",
                                    "content": "books",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        116,
                                        248,
                                        123,
                                        254
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.74
                                },
                                {
                                    "bbox": [
                                        124,
                                        246,
                                        203,
                                        257
                                    ],
                                    "type": "text",
                                    "content": "models.Book.objects.all()",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        262,
                        174,
                        272
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                95,
                                262,
                                174,
                                272
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        95,
                                        262,
                                        174,
                                        272
                                    ],
                                    "type": "text",
                                    "content": "print(books,type(books))",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        277,
                        433,
                        287
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                277,
                                433,
                                287
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        277,
                                        188,
                                        287
                                    ],
                                    "type": "text",
                                    "content": "<QuerySet [<Book: Book object",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        189,
                                        278,
                                        203,
                                        287
                                    ],
                                    "type": "inline_equation",
                                    "content": "\\cdot",
                                    "score": 0.7
                                },
                                {
                                    "bbox": [
                                        204,
                                        277,
                                        433,
                                        287
                                    ],
                                    "type": "text",
                                    "content": "…,<Book: Book object (7)>]> <class 'django.db.models.query.QuerySet'>",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        292,
                        299,
                        303
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                96,
                                294,
                                299,
                                303
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        96,
                                        294,
                                        116,
                                        303
                                    ],
                                    "type": "text",
                                    "content": "books",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        116,
                                        295,
                                        123,
                                        301
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.73
                                },
                                {
                                    "bbox": [
                                        124,
                                        294,
                                        299,
                                        303
                                    ],
                                    "type": "text",
                                    "content": "models.Book.objects.first() # 返回所有数据的第一条数据",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        308,
                        176,
                        318
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                95,
                                309,
                                176,
                                319
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        95,
                                        309,
                                        176,
                                        319
                                    ],
                                    "type": "text",
                                    "content": "print(books, type(books))",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        324,
                        242,
                        333
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                324,
                                242,
                                334
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        324,
                                        242,
                                        334
                                    ],
                                    "type": "text",
                                    "content": "Book object (1) <class 'TestModel.models.Book'>",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        340,
                        111,
                        349
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                339,
                                113,
                                350
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        339,
                                        113,
                                        350
                                    ],
                                    "type": "text",
                                    "content": "等同于",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        355,
                        301,
                        365
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                96,
                                356,
                                301,
                                364
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        96,
                                        356,
                                        116,
                                        364
                                    ],
                                    "type": "text",
                                    "content": "books",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        116,
                                        358,
                                        123,
                                        364
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.7
                                },
                                {
                                    "bbox": [
                                        124,
                                        356,
                                        301,
                                        364
                                    ],
                                    "type": "text",
                                    "content": "models.Book.objects.filter() # 返回所有数据的第一条数据",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        370,
                        191,
                        380
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                96,
                                370,
                                191,
                                381
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        96,
                                        370,
                                        191,
                                        381
                                    ],
                                    "type": "text",
                                    "content": "print(books[0], type(books[0]))",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        386,
                        242,
                        396
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                386,
                                243,
                                396
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        386,
                                        243,
                                        396
                                    ],
                                    "type": "text",
                                    "content": "Book object (1) <class 'TestModel.models.Book'>",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        401,
                        243,
                        412
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 17,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                402,
                                243,
                                412
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        402,
                                        108,
                                        412
                                    ],
                                    "type": "text",
                                    "content": "books",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        108,
                                        404,
                                        116,
                                        410
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.7
                                },
                                {
                                    "bbox": [
                                        116,
                                        402,
                                        243,
                                        412
                                    ],
                                    "type": "text",
                                    "content": "models.Book.objects.values(\"pk\",\"price\")",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        417,
                        304,
                        428
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                95,
                                418,
                                305,
                                428
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        95,
                                        418,
                                        305,
                                        428
                                    ],
                                    "type": "text",
                                    "content": "print(books,type(books)) # 得到的是第一条记录的 price 字段的数据",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        433,
                        489,
                        443
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                433,
                                489,
                                444
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        433,
                                        489,
                                        444
                                    ],
                                    "type": "text",
                                    "content": "<QuerySet [{'pk': 1, 'price': Decimal('300.00')},… , {'pk': 7, 'price': Decimal('200.00')}]> <class 'django.db.models.query.QuerySet'>",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        449,
                        278,
                        459
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                95,
                                449,
                                279,
                                459
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        95,
                                        449,
                                        116,
                                        459
                                    ],
                                    "type": "text",
                                    "content": "books",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        116,
                                        450,
                                        123,
                                        456
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.75
                                },
                                {
                                    "bbox": [
                                        124,
                                        449,
                                        279,
                                        459
                                    ],
                                    "type": "text",
                                    "content": "models.Book.objects.values_list(\"price\",\"publish\")",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        95,
                        465,
                        174,
                        474
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 21,
                    "lines": [
                        {
                            "bbox": [
                                95,
                                465,
                                174,
                                475
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        95,
                                        465,
                                        174,
                                        475
                                    ],
                                    "type": "text",
                                    "content": "print(books,type(books))",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        480,
                        505,
                        491
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 22,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                480,
                                506,
                                491
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        480,
                                        506,
                                        491
                                    ],
                                    "type": "text",
                                    "content": "<QuerySet [(Decimal('300.00'), ' 菜 鸟 出 版 社 '), …. (Decimal('200.00'), ' 功 夫 出 版 社 '), (Decimal('200.00'), ' 功 夫 出 版 社 ')]> <class",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        495,
                        202,
                        505
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 23,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                496,
                                203,
                                506
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        496,
                                        203,
                                        506
                                    ],
                                    "type": "text",
                                    "content": "'django.db.models.query.QuerySet'>",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        511,
                        252,
                        521
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 24,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                511,
                                253,
                                521
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        511,
                                        253,
                                        521
                                    ],
                                    "type": "text",
                                    "content": "1. Book 对象（<class 'TestModel.models.Book'>）",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        105,
                        527,
                        369,
                        582
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 29,
                    "blocks": [
                        {
                            "bbox": [
                                105,
                                527,
                                369,
                                537
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 25,
                            "lines": [
                                {
                                    "bbox": [
                                        124,
                                        527,
                                        370,
                                        537
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                124,
                                                527,
                                                370,
                                                537
                                            ],
                                            "type": "text",
                                            "content": "含义：Book 是 Django 模型（Model）的一个实例，对应数据库中的一行记录。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                542,
                                358,
                                552
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 26,
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        542,
                                        359,
                                        553
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                545,
                                                111,
                                                548
                                            ],
                                            "type": "text",
                                            "content": "",
                                            "score": 0.0
                                        },
                                        {
                                            "bbox": [
                                                124,
                                                542,
                                                359,
                                                553
                                            ],
                                            "type": "text",
                                            "content": "作用：表示单个数据对象，可以访问其字段（如book.title、book.price）。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                558,
                                143,
                                568
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 27,
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        558,
                                        145,
                                        569
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                560,
                                                112,
                                                565
                                            ],
                                            "type": "text",
                                            "content": ".",
                                            "score": 0.89
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                558,
                                                145,
                                                569
                                            ],
                                            "type": "text",
                                            "content": "示例：",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                573,
                                143,
                                582
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 28,
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        573,
                                        145,
                                        583
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                576,
                                                112,
                                                580
                                            ],
                                            "type": "text",
                                            "content": ".",
                                            "score": 0.804
                                        },
                                        {
                                            "bbox": [
                                                124,
                                                573,
                                                145,
                                                583
                                            ],
                                            "type": "text",
                                            "content": "特点：",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        141,
                        588,
                        308,
                        614
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 32,
                    "blocks": [
                        {
                            "bbox": [
                                141,
                                588,
                                283,
                                598
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 30,
                            "lines": [
                                {
                                    "bbox": [
                                        142,
                                        588,
                                        285,
                                        599
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                142,
                                                588,
                                                285,
                                                599
                                            ],
                                            "type": "text",
                                            "content": "o 是 TestModel.models.Book 类的实例。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                141,
                                603,
                                308,
                                614
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 31,
                            "lines": [
                                {
                                    "bbox": [
                                        143,
                                        605,
                                        309,
                                        615
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                143,
                                                606,
                                                151,
                                                613
                                            ],
                                            "type": "text",
                                            "content": "o",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                156,
                                                605,
                                                309,
                                                615
                                            ],
                                            "type": "text",
                                            "content": "可以直接修改并保存到数据库（book.save()）。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        87,
                        635,
                        304,
                        646
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 33,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                635,
                                305,
                                646
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        635,
                                        305,
                                        646
                                    ],
                                    "type": "text",
                                    "content": "2. Book.objects（<class 'django.db.models.manager.Manager'>）",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        104,
                        651,
                        392,
                        692
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 37,
                    "blocks": [
                        {
                            "bbox": [
                                104,
                                651,
                                392,
                                661
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 34,
                            "lines": [
                                {
                                    "bbox": [
                                        124,
                                        651,
                                        393,
                                        662
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                124,
                                                651,
                                                393,
                                                662
                                            ],
                                            "type": "text",
                                            "content": "含义：objects 是 Django 模型的默认管理器（Manager），用于执行数据库查询操作。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                666,
                                355,
                                677
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 35,
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        667,
                                        356,
                                        678
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                670,
                                                111,
                                                673
                                            ],
                                            "type": "text",
                                            "content": "",
                                            "score": 0.0
                                        },
                                        {
                                            "bbox": [
                                                124,
                                                667,
                                                356,
                                                678
                                            ],
                                            "type": "text",
                                            "content": "作用：提供查询方法（如 all(), filter(), get(), create()），用于操作数据库。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                682,
                                143,
                                692
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 36,
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        682,
                                        145,
                                        692
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                685,
                                                112,
                                                689
                                            ],
                                            "type": "text",
                                            "content": "",
                                            "score": 0.0
                                        },
                                        {
                                            "bbox": [
                                                124,
                                                682,
                                                145,
                                                692
                                            ],
                                            "type": "text",
                                            "content": "示例：",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        141,
                        698,
                        369,
                        740
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 41,
                    "blocks": [
                        {
                            "bbox": [
                                141,
                                698,
                                232,
                                708
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 38,
                            "lines": [
                                {
                                    "bbox": [
                                        142,
                                        697,
                                        233,
                                        708
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                142,
                                                697,
                                                233,
                                                708
                                            ],
                                            "type": "text",
                                            "content": "o 是 Manager 类的实例。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                141,
                                713,
                                355,
                                723
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 39,
                            "lines": [
                                {
                                    "bbox": [
                                        141,
                                        712,
                                        356,
                                        724
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                141,
                                                712,
                                                356,
                                                724
                                            ],
                                            "type": "text",
                                            "content": "o 不直接返回数据，而是返回QuerySet（查询集）或单个Book。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                141,
                                729,
                                369,
                                740
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 40,
                            "lines": [
                                {
                                    "bbox": [
                                        143,
                                        728,
                                        370,
                                        740
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                143,
                                                728,
                                                370,
                                                740
                                            ],
                                            "type": "text",
                                            "content": "o 可以自定义管理器（如 class BookManager(models.Manager)）。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                }
            ],
            "discarded_blocks": [],
            "page_size": [
                595,
                841
            ],
            "page_idx": 46
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        86,
                        80,
                        283,
                        90
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                79,
                                284,
                                91
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        79,
                                        284,
                                        91
                                    ],
                                    "type": "text",
                                    "content": "3. QuerySet（<class 'django.db.models.query.QuerySet'>）",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        104,
                        95,
                        418,
                        136
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 4,
                    "blocks": [
                        {
                            "bbox": [
                                104,
                                95,
                                418,
                                105
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 1,
                            "lines": [
                                {
                                    "bbox": [
                                        123,
                                        95,
                                        418,
                                        106
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                123,
                                                95,
                                                418,
                                                106
                                            ],
                                            "type": "text",
                                            "content": "含义：QuerySet 是 Django 查询数据库返回的结果集，可以包含0 个、1 个或多个Book 对象。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                111,
                                388,
                                121
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 2,
                            "lines": [
                                {
                                    "bbox": [
                                        124,
                                        111,
                                        389,
                                        121
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                124,
                                                111,
                                                389,
                                                121
                                            ],
                                            "type": "text",
                                            "content": "作用：用于链式查询（如过滤、排序、聚合等），但不会立即执行查询（惰性加载）。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                127,
                                143,
                                136
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 3,
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        126,
                                        145,
                                        137
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                129,
                                                111,
                                                133
                                            ],
                                            "type": "text",
                                            "content": "",
                                            "score": 0.0
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                126,
                                                145,
                                                137
                                            ],
                                            "type": "text",
                                            "content": "示例：",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        141,
                        142,
                        441,
                        183
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 8,
                    "blocks": [
                        {
                            "bbox": [
                                141,
                                142,
                                441,
                                152
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 5,
                            "lines": [
                                {
                                    "bbox": [
                                        141,
                                        141,
                                        443,
                                        153
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                141,
                                                141,
                                                443,
                                                153
                                            ],
                                            "type": "text",
                                            "content": "o 是惰性的，只有在真正使用时（如遍历、list(queryset)、len(queryset)）才会查询数据库。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                141,
                                158,
                                370,
                                168
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 6,
                            "lines": [
                                {
                                    "bbox": [
                                        141,
                                        157,
                                        371,
                                        169
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                141,
                                                157,
                                                371,
                                                169
                                            ],
                                            "type": "text",
                                            "content": "o 可以进一步过滤（filter()）、排序（order_by()）、切片（[:5]）等。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                141,
                                174,
                                389,
                                183
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 7,
                            "lines": [
                                {
                                    "bbox": [
                                        141,
                                        172,
                                        390,
                                        185
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                141,
                                                172,
                                                390,
                                                185
                                            ],
                                            "type": "text",
                                            "content": "o 如果只返回一个对象（如 get()），则返回 Book 对象，而不是 QuerySet。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        86,
                        189,
                        242,
                        199
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                189,
                                242,
                                200
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        189,
                                        242,
                                        200
                                    ],
                                    "type": "text",
                                    "content": "2. 为什么 QuerySet 类型不变，但数据形式不同？",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        104,
                        205,
                        458,
                        215
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                117,
                                205,
                                459,
                                216
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        117,
                                        205,
                                        459,
                                        216
                                    ],
                                    "type": "text",
                                    "content": "QuerySet 是 Django 的惰性查询集，它只是生成 SQL 查询的容器，具体返回的数据形式由调用的方法决定：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        141,
                        220,
                        272,
                        261
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 14,
                    "blocks": [
                        {
                            "bbox": [
                                141,
                                220,
                                230,
                                229
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 11,
                            "lines": [
                                {
                                    "bbox": [
                                        142,
                                        220,
                                        231,
                                        231
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                142,
                                                220,
                                                231,
                                                231
                                            ],
                                            "type": "text",
                                            "content": "o all() → 返回模型实例。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                141,
                                236,
                                230,
                                244
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 12,
                            "lines": [
                                {
                                    "bbox": [
                                        142,
                                        235,
                                        230,
                                        245
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                142,
                                                235,
                                                230,
                                                245
                                            ],
                                            "type": "text",
                                            "content": "o values() → 返回字典。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                141,
                                251,
                                272,
                                261
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 13,
                            "lines": [
                                {
                                    "bbox": [
                                        142,
                                        251,
                                        273,
                                        262
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                142,
                                                251,
                                                273,
                                                262
                                            ],
                                            "type": "text",
                                            "content": "o values_list() → 返回元组或单个值。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        104,
                        267,
                        504,
                        292
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                112,
                                266,
                                506,
                                278
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        112,
                                        266,
                                        506,
                                        278
                                    ],
                                    "type": "text",
                                    "content": "但 QuerySet 本身的类型始终是 django.db.models.query.QuerySet，因为它代表的是“查询能力”，而不是具体的数据",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                123,
                                280,
                                145,
                                294
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        123,
                                        280,
                                        145,
                                        294
                                    ],
                                    "type": "text",
                                    "content": "形式。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        313,
                        164,
                        323
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                313,
                                166,
                                323
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        313,
                                        166,
                                        323
                                    ],
                                    "type": "text",
                                    "content": "3. 如何选择合适的方法？",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "table",
                    "bbox": [
                        86,
                        335,
                        505,
                        498
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                86,
                                335,
                                505,
                                498
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        86,
                                        335,
                                        505,
                                        498
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                86,
                                                335,
                                                505,
                                                498
                                            ],
                                            "type": "table",
                                            "html": "<table><tr><td>方法</td><td>返回的数据形式</td><td>适用场景</td></tr><tr><td>all()</td><td>QuerySet[Model 实例]</td><td>需要完整模型对象（如调用 save()、访问关联字段）</td></tr><tr><td>values(&quot;field1&quot;, &quot;field2&quot;)</td><td>QuerySet[dict]</td><td>只需要部分字段，且希望用字段名访问</td></tr><tr><td>values_list(&quot;field1&quot;, &quot;field2&quot;)</td><td>QuerySet[tuple]</td><td>只需要字段值，不关心字段名</td></tr><tr><td>values_list(&quot;field&quot;, flat=True)</td><td>QuerySet[单值]</td><td>只需要一个字段的列表（如 [1, 2, 3])</td></tr></table>",
                                            "image_path": "325e9eead8dd4eb708f6b6ae0407571b2100f9723cb4103acdda3536fd974f7f.jpg"
                                        }
                                    ]
                                }
                            ],
                            "index": 17,
                            "angle": 0,
                            "type": "table_body"
                        }
                    ],
                    "index": 17
                },
                {
                    "bbox": [
                        86,
                        500,
                        505,
                        527
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                501,
                                506,
                                511
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        501,
                                        136,
                                        511
                                    ],
                                    "type": "text",
                                    "content": "是的！authors",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        137,
                                        502,
                                        144,
                                        508
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.7
                                },
                                {
                                    "bbox": [
                                        145,
                                        501,
                                        506,
                                        511
                                    ],
                                    "type": "text",
                                    "content": "models.ManyToManyField(\"Author\") 这一行代码会自动创建一个中间表（关联表）来存储多对多关系，但不会直",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                517,
                                267,
                                526
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        517,
                                        267,
                                        526
                                    ],
                                    "type": "text",
                                    "content": "接修改Author 表或当前模型表的结构。以下是详细解释：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        547,
                        154,
                        556
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                548,
                                154,
                                557
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        548,
                                        154,
                                        557
                                    ],
                                    "type": "text",
                                    "content": "1. 自动创建的中间表",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        562,
                        505,
                        587
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                563,
                                505,
                                572
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        563,
                                        505,
                                        572
                                    ],
                                    "type": "text",
                                    "content": "Django 会为你生成一个名为<当前模型表名>_authors 的中间表（例如，如果当前模型是 Book，则表名为book_authors），其结构",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                577,
                                109,
                                589
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        577,
                                        109,
                                        589
                                    ],
                                    "type": "text",
                                    "content": "如下：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        87,
                        594,
                        299,
                        682
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                87,
                                594,
                                299,
                                682
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        87,
                                        594,
                                        299,
                                        682
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                87,
                                                594,
                                                299,
                                                682
                                            ],
                                            "type": "text",
                                            "content": "CREATE TABLE book_authors (\nid INTEGER PRIMARY KEY AUTOINCREMENT, -- SQLite 示例\nbook_id INTEGER NOT NULL, -- 外键指向Book表\nauthor_id INTEGER NOT NULL, -- 外键指向Author表\nFOREIGN KEY (book_id) REFERENCES book(id),\nFOREIGN KEY (author_id) REFERENCES author(id)"
                                        }
                                    ]
                                }
                            ],
                            "index": 21,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 21,
                    "sub_type": "code",
                    "guess_lang": "sql"
                },
                {
                    "bbox": [
                        87,
                        688,
                        95,
                        697
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 22,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                687,
                                95,
                                699
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        687,
                                        95,
                                        699
                                    ],
                                    "type": "text",
                                    "content": ");",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        104,
                        703,
                        394,
                        729
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 25,
                    "blocks": [
                        {
                            "bbox": [
                                104,
                                703,
                                362,
                                713
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 23,
                            "lines": [
                                {
                                    "bbox": [
                                        108,
                                        703,
                                        363,
                                        714
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                108,
                                                706,
                                                111,
                                                708
                                            ],
                                            "type": "text",
                                            "content": "一",
                                            "score": 0.54
                                        },
                                        {
                                            "bbox": [
                                                124,
                                                703,
                                                363,
                                                714
                                            ],
                                            "type": "text",
                                            "content": "这个表只有 3 个字段：id（主键）、book_id（外键）、author_id（外键）。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                719,
                                394,
                                729
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 24,
                            "lines": [
                                {
                                    "bbox": [
                                        124,
                                        719,
                                        395,
                                        729
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                124,
                                                719,
                                                395,
                                                729
                                            ],
                                            "type": "text",
                                            "content": "你不需要手动定义这个表，Django 在运行makemigrations 和migrate 时会自动创建。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        87,
                        734,
                        127,
                        744
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 26,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                734,
                                126,
                                744
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        734,
                                        126,
                                        744
                                    ],
                                    "type": "text",
                                    "content": "5. 注意事项",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        105,
                        750,
                        157,
                        759
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 27,
                    "lines": [
                        {
                            "bbox": [
                                106,
                                750,
                                157,
                                760
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        106,
                                        750,
                                        157,
                                        760
                                    ],
                                    "type": "text",
                                    "content": "1. 表名规则：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [],
            "page_size": [
                595,
                841
            ],
            "page_idx": 47
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        141,
                        79,
                        401,
                        105
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 2,
                    "blocks": [
                        {
                            "bbox": [
                                141,
                                79,
                                401,
                                89
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 0,
                            "lines": [
                                {
                                    "bbox": [
                                        142,
                                        79,
                                        402,
                                        90
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                142,
                                                79,
                                                323,
                                                90
                                            ],
                                            "type": "text",
                                            "content": "o 自动生成的中间表名格式：<当前模型表名>_<字段名",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                324,
                                                81,
                                                330,
                                                89
                                            ],
                                            "type": "inline_equation",
                                            "content": ">",
                                            "score": 0.74
                                        },
                                        {
                                            "bbox": [
                                                330,
                                                79,
                                                402,
                                                90
                                            ],
                                            "type": "text",
                                            "content": "（如 book_authors）。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                141,
                                95,
                                375,
                                105
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 1,
                            "lines": [
                                {
                                    "bbox": [
                                        142,
                                        95,
                                        376,
                                        106
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                142,
                                                95,
                                                376,
                                                106
                                            ],
                                            "type": "text",
                                            "content": "o 如果当前模型表名是 app_book，则中间表名为 app_book_authors。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        105,
                        111,
                        157,
                        121
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                105,
                                111,
                                158,
                                121
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        105,
                                        111,
                                        158,
                                        121
                                    ],
                                    "type": "text",
                                    "content": "2. 迁移顺序：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        141,
                        126,
                        324,
                        136
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                142,
                                126,
                                324,
                                136
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        142,
                                        126,
                                        324,
                                        136
                                    ],
                                    "type": "text",
                                    "content": "o 确保Author 模型已正确定义并先迁移，否则会报错。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        105,
                        142,
                        171,
                        152
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                105,
                                142,
                                171,
                                153
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        105,
                                        142,
                                        171,
                                        153
                                    ],
                                    "type": "text",
                                    "content": "3. 数据库一致性：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        141,
                        158,
                        396,
                        168
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                141,
                                157,
                                398,
                                169
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        141,
                                        157,
                                        398,
                                        169
                                    ],
                                    "type": "text",
                                    "content": "o 不要手动修改中间表，始终通过 Django ORM 操作（如 add()、remove()）。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        189,
                        104,
                        199
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                188,
                                105,
                                200
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        188,
                                        105,
                                        200
                                    ],
                                    "type": "text",
                                    "content": "总结",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        212,
                        195,
                        222
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                86,
                                211,
                                196,
                                223
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        86,
                                        211,
                                        105,
                                        223
                                    ],
                                    "type": "text",
                                    "content": "行为",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        177,
                                        211,
                                        196,
                                        223
                                    ],
                                    "type": "text",
                                    "content": "结果",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        243,
                        254,
                        253
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                243,
                                254,
                                254
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        243,
                                        167,
                                        254
                                    ],
                                    "type": "text",
                                    "content": "定义 ManyToManyField",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        177,
                                        243,
                                        254,
                                        253
                                    ],
                                    "type": "text",
                                    "content": "Django 自动创建中间表",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        274,
                        294,
                        285
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                275,
                                294,
                                285
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        275,
                                        139,
                                        285
                                    ],
                                    "type": "text",
                                    "content": "默认中间表字段",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        178,
                                        275,
                                        294,
                                        285
                                    ],
                                    "type": "text",
                                    "content": "id、<当前模型>_id、<关联模型>_id",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        306,
                        271,
                        316
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                305,
                                271,
                                316
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        305,
                                        132,
                                        316
                                    ],
                                    "type": "text",
                                    "content": "自定义中间表",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        179,
                                        306,
                                        271,
                                        316
                                    ],
                                    "type": "text",
                                    "content": "使用 through= 参数指定模型",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        336,
                        301,
                        347
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                87,
                                336,
                                301,
                                348
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        336,
                                        119,
                                        347
                                    ],
                                    "type": "text",
                                    "content": "操作关系",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        179,
                                        336,
                                        301,
                                        348
                                    ],
                                    "type": "text",
                                    "content": "通过 add()、remove()、clear() 等方法",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        360,
                        265,
                        370
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                359,
                                267,
                                371
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        359,
                                        267,
                                        371
                                    ],
                                    "type": "text",
                                    "content": "在 Django 中，当你定义一个 ForeignKey 字段时，例如：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        376,
                        111,
                        386
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                87,
                                376,
                                113,
                                385
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        376,
                                        113,
                                        385
                                    ],
                                    "type": "text",
                                    "content": "python",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        391,
                        104,
                        401
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                391,
                                105,
                                402
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        391,
                                        105,
                                        402
                                    ],
                                    "type": "text",
                                    "content": "复制",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        407,
                        104,
                        416
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                407,
                                105,
                                417
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        407,
                                        105,
                                        417
                                    ],
                                    "type": "text",
                                    "content": "下载",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        423,
                        310,
                        432
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 17,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                422,
                                311,
                                433
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        422,
                                        111,
                                        433
                                    ],
                                    "type": "text",
                                    "content": "publish",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        112,
                                        424,
                                        119,
                                        430
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.71
                                },
                                {
                                    "bbox": [
                                        119,
                                        422,
                                        311,
                                        433
                                    ],
                                    "type": "text",
                                    "content": "models.ForeignKey(\"Publish\", on_delete=models.CASCADE)",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        438,
                        474,
                        448
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                437,
                                475,
                                449
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        437,
                                        475,
                                        449
                                    ],
                                    "type": "text",
                                    "content": "Django 实际上会在数据库中创建一个名为publish_id 的列，而不是publish。这是由 Django 的设计机制决定的，原因如下：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        469,
                        236,
                        479
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                470,
                                236,
                                480
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        470,
                                        236,
                                        480
                                    ],
                                    "type": "text",
                                    "content": "1. 为什么字段名是 publish_id 而不是 publish？",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        485,
                        171,
                        494
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                486,
                                171,
                                495
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        486,
                                        171,
                                        495
                                    ],
                                    "type": "text",
                                    "content": "(1) 数据库层面的外键存储",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        104,
                        500,
                        504,
                        571
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 25,
                    "blocks": [
                        {
                            "bbox": [
                                104,
                                500,
                                454,
                                510
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 21,
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        501,
                                        455,
                                        511
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                503,
                                                111,
                                                506
                                            ],
                                            "type": "text",
                                            "content": "",
                                            "score": 0.0
                                        },
                                        {
                                            "bbox": [
                                                124,
                                                501,
                                                455,
                                                511
                                            ],
                                            "type": "text",
                                            "content": "在关系型数据库（如 MySQL、PostgreSQL、SQLite）中，外键关系是通过存储目标表的主键值来实现的。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                104,
                                516,
                                487,
                                526
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 22,
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        516,
                                        488,
                                        527
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                518,
                                                111,
                                                522
                                            ],
                                            "type": "text",
                                            "content": ".",
                                            "score": 0.751
                                        },
                                        {
                                            "bbox": [
                                                124,
                                                516,
                                                488,
                                                527
                                            ],
                                            "type": "text",
                                            "content": "例如，如果 Publish 表的主键是 id，那么 Book 表会有一个 publish_id 列，存储的是 Publish 表中某条记录的 id 值。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                532,
                                214,
                                541
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 23,
                            "lines": [
                                {
                                    "bbox": [
                                        124,
                                        532,
                                        215,
                                        542
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                124,
                                                532,
                                                215,
                                                542
                                            ],
                                            "type": "text",
                                            "content": "1. 为什么列名不同也能关联？",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                104,
                                547,
                                504,
                                571
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 24,
                            "lines": [
                                {
                                    "bbox": [
                                        123,
                                        548,
                                        505,
                                        556
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                123,
                                                548,
                                                505,
                                                556
                                            ],
                                            "type": "text",
                                            "content": "在关系型数据库（如 MySQL、PostgreSQL、SQLite）中，外键关联的本质是值匹配，而不是列名匹配。只要满足以下条件",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        124,
                                        562,
                                        145,
                                        573
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                124,
                                                562,
                                                145,
                                                573
                                            ],
                                            "type": "text",
                                            "content": "即可：",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        105,
                        578,
                        113,
                        586
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 26,
                    "lines": []
                },
                {
                    "bbox": [
                        87,
                        594,
                        167,
                        604
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 27,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                593,
                                168,
                                604
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        593,
                                        168,
                                        604
                                    ],
                                    "type": "text",
                                    "content": "(2) Django 的 ORM 抽象",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        104,
                        609,
                        506,
                        650
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 31,
                    "blocks": [
                        {
                            "bbox": [
                                104,
                                609,
                                506,
                                619
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 28,
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        610,
                                        508,
                                        620
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                613,
                                                111,
                                                616
                                            ],
                                            "type": "text",
                                            "content": "",
                                            "score": 0.0
                                        },
                                        {
                                            "bbox": [
                                                124,
                                                610,
                                                508,
                                                620
                                            ],
                                            "type": "text",
                                            "content": "虽然数据库列名是publish_id，但 Django 在Python 模型层面提供了一个名为publish 的属性，用于方便地访问关联对象。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                625,
                                376,
                                635
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 29,
                            "lines": [
                                {
                                    "bbox": [
                                        124,
                                        625,
                                        377,
                                        635
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                124,
                                                625,
                                                377,
                                                635
                                            ],
                                            "type": "text",
                                            "content": "当你访问 book.publish 时，Django 会自动执行查询，获取对应的 Publish 对象。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                640,
                                383,
                                650
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 30,
                            "lines": [
                                {
                                    "bbox": [
                                        124,
                                        640,
                                        384,
                                        650
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                124,
                                                640,
                                                384,
                                                650
                                            ],
                                            "type": "text",
                                            "content": "而 book.publish_id 则直接返回数据库中存储的原始外键值（即 Publish 表的 id）。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        87,
                        656,
                        183,
                        666
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 32,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                656,
                                184,
                                666
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        656,
                                        184,
                                        666
                                    ],
                                    "type": "text",
                                    "content": "2. Django 如何实现这种关联？",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        92,
                        672,
                        143,
                        682
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 33,
                    "lines": [
                        {
                            "bbox": [
                                93,
                                671,
                                143,
                                682
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        93,
                                        671,
                                        143,
                                        682
                                    ],
                                    "type": "text",
                                    "content": "（1）数据库层面",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        105,
                        687,
                        282,
                        697
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 34,
                    "lines": [
                        {
                            "bbox": [
                                123,
                                687,
                                283,
                                698
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        123,
                                        687,
                                        283,
                                        698
                                    ],
                                    "type": "text",
                                    "content": "Django 生成的 SQL 会明确指定外键关联的目标列：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        703,
                        99,
                        712
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 35,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                703,
                                101,
                                714
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        703,
                                        101,
                                        714
                                    ],
                                    "type": "text",
                                    "content": "sql",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        719,
                        104,
                        728
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 36,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                719,
                                105,
                                729
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        719,
                                        105,
                                        729
                                    ],
                                    "type": "text",
                                    "content": "复制",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        735,
                        104,
                        743
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 37,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                734,
                                105,
                                745
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        734,
                                        105,
                                        745
                                    ],
                                    "type": "text",
                                    "content": "下载",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        750,
                        260,
                        759
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 38,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                749,
                                261,
                                760
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        749,
                                        261,
                                        760
                                    ],
                                    "type": "text",
                                    "content": "FOREIGN KEY (publish_id) REFERENCES Publish(id)",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [],
            "page_size": [
                595,
                841
            ],
            "page_idx": 48
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        87,
                        80,
                        278,
                        89
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                81,
                                279,
                                89
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        81,
                                        279,
                                        89
                                    ],
                                    "type": "text",
                                    "content": "这里显式声明了 publish_id 关联到 Publish.id，与列名无关。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        92,
                        95,
                        141,
                        105
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                92,
                                95,
                                142,
                                106
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        92,
                                        95,
                                        142,
                                        106
                                    ],
                                    "type": "text",
                                    "content": "（2）ORM 层面",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        105,
                        111,
                        326,
                        121
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                124,
                                111,
                                327,
                                121
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        124,
                                        111,
                                        327,
                                        121
                                    ],
                                    "type": "text",
                                    "content": "当你访问 book.publish 时，Django 会自动执行类似以下的查询：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        126,
                        264,
                        137
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                126,
                                264,
                                137
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        126,
                                        204,
                                        137
                                    ],
                                    "type": "text",
                                    "content": "SELECT * FROM Publish WHERE id",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        205,
                                        128,
                                        211,
                                        135
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.58
                                },
                                {
                                    "bbox": [
                                        212,
                                        126,
                                        264,
                                        137
                                    ],
                                    "type": "text",
                                    "content": "book.publish_id;",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        142,
                        237,
                        153
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                142,
                                238,
                                153
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        142,
                                        238,
                                        153
                                    ],
                                    "type": "text",
                                    "content": "通过 publish_id 的值找到对应的 Publish 记录。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        160,
                        140,
                        169
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                160,
                                140,
                                169
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        160,
                                        140,
                                        169
                                    ],
                                    "type": "text",
                                    "content": "3. 核心区别对比",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "table",
                    "bbox": [
                        86,
                        182,
                        418,
                        374
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                86,
                                182,
                                418,
                                374
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        86,
                                        182,
                                        418,
                                        374
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                86,
                                                182,
                                                418,
                                                374
                                            ],
                                            "type": "table",
                                            "html": "<table><tr><td>特性</td><td>.add()</td><td>.create()</td></tr><tr><td>作用</td><td>关联已存在的对象</td><td>创建新对象并关联</td></tr><tr><td>是否创建新对象</td><td>□否</td><td>□是</td></tr><tr><td>适用关系类型</td><td>ManyToManyField, ForeignKey</td><td>ManyToManyField, ForeignKey的反向查询</td></tr><tr><td>参数类型</td><td>对象或ID</td><td>新对象的字段键值对</td></tr><tr><td>返回值</td><td>无</td><td>新创建的对象</td></tr></table>",
                                            "image_path": "253ad5b303793ce0d4769c6b4c028e01ed1cc3015c9f13cf55d54a3c3ee543c6.jpg"
                                        }
                                    ]
                                }
                            ],
                            "index": 6,
                            "angle": 0,
                            "type": "table_body"
                        }
                    ],
                    "index": 6
                },
                {
                    "bbox": [
                        88,
                        405,
                        298,
                        433
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                85,
                                401,
                                302,
                                435
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        85,
                                        401,
                                        302,
                                        435
                                    ],
                                    "type": "text",
                                    "content": "Django Form 组件",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        444,
                        458,
                        454
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                444,
                                460,
                                455
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        444,
                                        460,
                                        455
                                    ],
                                    "type": "text",
                                    "content": "Django Form 组件用于对页面进行初始化，生成 HTML 标签，此外还可以对用户提交的数据进行校验（显示错误信息）。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        476,
                        149,
                        485
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                476,
                                149,
                                486
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        476,
                                        149,
                                        486
                                    ],
                                    "type": "text",
                                    "content": "报错信息显示顺序：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        507,
                        289,
                        516
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                507,
                                289,
                                516
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        507,
                                        289,
                                        516
                                    ],
                                    "type": "text",
                                    "content": "先显示字段属性中的错误信息，然后再显示局部钩子的错误信息。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        523,
                        289,
                        532
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                523,
                                289,
                                532
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        523,
                                        289,
                                        532
                                    ],
                                    "type": "text",
                                    "content": "若显示了字段属性的错误信息，就不会显示局部钩子的错误信息。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        538,
                        428,
                        548
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                539,
                                429,
                                548
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        539,
                                        429,
                                        548
                                    ],
                                    "type": "text",
                                    "content": "若有全局钩子，则全局钩子是等所有的数据都校验完，才开始进行校验，并且全局钩子的错误信息一定会显示。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        565,
                        432,
                        593
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                86,
                                560,
                                436,
                                596
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        86,
                                        560,
                                        436,
                                        596
                                    ],
                                    "type": "text",
                                    "content": "Django 用户认证（Auth）组件",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        605,
                        467,
                        615
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                605,
                                468,
                                616
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        605,
                                        468,
                                        616
                                    ],
                                    "type": "text",
                                    "content": "Django 用户认证（Auth）组件一般用在用户的登录注册上，用于判断当前的用户是否合法，并跳转到登陆成功或失败页面。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        621,
                        246,
                        630
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                620,
                                246,
                                631
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        620,
                                        246,
                                        631
                                    ],
                                    "type": "text",
                                    "content": "Django 用户认证（Auth）组件需要导入 auth 模块:",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        637,
                        124,
                        645
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                637,
                                124,
                                646
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        637,
                                        124,
                                        646
                                    ],
                                    "type": "text",
                                    "content": "# 认证模块",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        652,
                        186,
                        661
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 17,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                652,
                                188,
                                662
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        652,
                                        188,
                                        662
                                    ],
                                    "type": "text",
                                    "content": "from django.contrib import auth",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        683,
                        131,
                        692
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                684,
                                131,
                                692
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        684,
                                        131,
                                        692
                                    ],
                                    "type": "text",
                                    "content": "# 对应数据库",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        699,
                        228,
                        708
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                699,
                                229,
                                708
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        699,
                                        229,
                                        708
                                    ],
                                    "type": "text",
                                    "content": "from django.contrib.auth.models import User",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        714,
                        149,
                        724
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                715,
                                149,
                                724
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        715,
                                        149,
                                        724
                                    ],
                                    "type": "text",
                                    "content": "返回值是用户对象。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        730,
                        170,
                        740
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 21,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                730,
                                171,
                                740
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        730,
                                        171,
                                        740
                                    ],
                                    "type": "text",
                                    "content": "创建用户对象的三种方法：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        105,
                        745,
                        266,
                        755
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 22,
                    "lines": [
                        {
                            "bbox": [
                                107,
                                745,
                                267,
                                756
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        107,
                                        749,
                                        110,
                                        751
                                    ],
                                    "type": "text",
                                    "content": "",
                                    "score": 0.0
                                },
                                {
                                    "bbox": [
                                        124,
                                        745,
                                        267,
                                        756
                                    ],
                                    "type": "text",
                                    "content": "create()：创建一个普通用户，密码是明文的。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [],
            "page_size": [
                595,
                841
            ],
            "page_idx": 49
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        104,
                        80,
                        393,
                        105
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 2,
                    "blocks": [
                        {
                            "bbox": [
                                105,
                                80,
                                285,
                                89
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 0,
                            "lines": [
                                {
                                    "bbox": [
                                        124,
                                        80,
                                        285,
                                        90
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                124,
                                                80,
                                                285,
                                                90
                                            ],
                                            "type": "text",
                                            "content": "create_user()：创建一个普通用户，密码是密文的。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                104,
                                96,
                                393,
                                105
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 1,
                            "lines": [
                                {
                                    "bbox": [
                                        124,
                                        96,
                                        395,
                                        106
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                124,
                                                96,
                                                395,
                                                106
                                            ],
                                            "type": "text",
                                            "content": "create_superuser()：创建一个超级用户，密码是密文的，要多传一个邮箱email 参数。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        88,
                        111,
                        370,
                        121
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                111,
                                371,
                                121
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        111,
                                        371,
                                        121
                                    ],
                                    "type": "text",
                                    "content": "验证用户的用户名和密码使用 authenticate() 方法，从需要auth_user 表中过滤出用户对象。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        142,
                        135,
                        153
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                142,
                                136,
                                152
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        142,
                                        136,
                                        152
                                    ],
                                    "type": "text",
                                    "content": "使用前要导入：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        174,
                        187,
                        184
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                174,
                                188,
                                184
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        174,
                                        188,
                                        184
                                    ],
                                    "type": "text",
                                    "content": "from django.contrib import auth",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        190,
                        107,
                        198
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                188,
                                108,
                                200
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        188,
                                        108,
                                        200
                                    ],
                                    "type": "text",
                                    "content": "参数：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        221,
                        149,
                        230
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                221,
                                149,
                                230
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        221,
                                        149,
                                        230
                                    ],
                                    "type": "text",
                                    "content": "username：用户名",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        237,
                        141,
                        245
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                236,
                                142,
                                246
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        236,
                                        142,
                                        246
                                    ],
                                    "type": "text",
                                    "content": "password：密码",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        252,
                        279,
                        261
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                252,
                                279,
                                262
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        252,
                                        279,
                                        262
                                    ],
                                    "type": "text",
                                    "content": "返回值：如果验证成功，就返回用户对象，反之，返回 None。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        267,
                        286,
                        276
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                267,
                                287,
                                277
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        267,
                                        287,
                                        277
                                    ],
                                    "type": "text",
                                    "content": "给验证成功的用户加 session，将 request.user 赋值为用户对象。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        283,
                        158,
                        292
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                283,
                                158,
                                293
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        283,
                                        158,
                                        293
                                    ],
                                    "type": "text",
                                    "content": "登陆使用 login() 方法。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        299,
                        135,
                        307
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                299,
                                136,
                                308
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        299,
                                        136,
                                        308
                                    ],
                                    "type": "text",
                                    "content": "使用前要导入：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        314,
                        186,
                        323
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                314,
                                188,
                                324
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        314,
                                        188,
                                        324
                                    ],
                                    "type": "text",
                                    "content": "from django.contrib import auth",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        330,
                        107,
                        338
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                329,
                                108,
                                340
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        329,
                                        108,
                                        340
                                    ],
                                    "type": "text",
                                    "content": "参数：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        105,
                        345,
                        185,
                        354
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                345,
                                185,
                                355
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        348,
                                        111,
                                        350
                                    ],
                                    "type": "text",
                                    "content": "",
                                    "score": 0.0
                                },
                                {
                                    "bbox": [
                                        124,
                                        345,
                                        185,
                                        355
                                    ],
                                    "type": "text",
                                    "content": "request：用户对象",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        360,
                        357,
                        370
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                360,
                                358,
                                370
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        360,
                                        358,
                                        370
                                    ],
                                    "type": "text",
                                    "content": "注销用户使用 logout() 方法，需要清空 session 信息，将 request.user 赋值为匿名用户。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        376,
                        135,
                        386
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 17,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                376,
                                136,
                                386
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        376,
                                        136,
                                        386
                                    ],
                                    "type": "text",
                                    "content": "使用前要导入：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        392,
                        187,
                        401
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                392,
                                188,
                                401
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        392,
                                        188,
                                        401
                                    ],
                                    "type": "text",
                                    "content": "from django.contrib import auth",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        408,
                        107,
                        416
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                407,
                                108,
                                418
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        407,
                                        108,
                                        418
                                    ],
                                    "type": "text",
                                    "content": "参数：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        105,
                        423,
                        185,
                        433
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                123,
                                423,
                                185,
                                433
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        123,
                                        423,
                                        185,
                                        433
                                    ],
                                    "type": "text",
                                    "content": "request：用户对象",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        439,
                        135,
                        448
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 21,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                438,
                                136,
                                449
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        438,
                                        136,
                                        449
                                    ],
                                    "type": "text",
                                    "content": "返回值：None",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        454,
                        281,
                        463
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 22,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                454,
                                282,
                                464
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        454,
                                        282,
                                        464
                                    ],
                                    "type": "text",
                                    "content": "设置装饰器，给需要登录成功后才能访问的页面统一加装饰器。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        470,
                        135,
                        479
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 23,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                470,
                                136,
                                480
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        470,
                                        136,
                                        480
                                    ],
                                    "type": "text",
                                    "content": "使用前要导入：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        486,
                        268,
                        495
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 24,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                485,
                                269,
                                496
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        485,
                                        269,
                                        496
                                    ],
                                    "type": "text",
                                    "content": "from django.contrib.auth.decorators import login_required",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        502,
                        104,
                        510
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 25,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                501,
                                105,
                                511
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        501,
                                        105,
                                        511
                                    ],
                                    "type": "text",
                                    "content": "实例",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        517,
                        326,
                        526
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 26,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                516,
                                326,
                                526
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        516,
                                        273,
                                        526
                                    ],
                                    "type": "text",
                                    "content": "from django.contrib.auth.decorators import login_required",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        273,
                                        518,
                                        280,
                                        525
                                    ],
                                    "type": "inline_equation",
                                    "content": "@",
                                    "score": 0.51
                                },
                                {
                                    "bbox": [
                                        281,
                                        516,
                                        326,
                                        526
                                    ],
                                    "type": "text",
                                    "content": "login_required",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        533,
                        149,
                        541
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 27,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                531,
                                150,
                                543
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        531,
                                        150,
                                        543
                                    ],
                                    "type": "text",
                                    "content": "def index(request):",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        91,
                        549,
                        223,
                        557
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 28,
                    "lines": [
                        {
                            "bbox": [
                                92,
                                547,
                                224,
                                559
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        92,
                                        547,
                                        224,
                                        559
                                    ],
                                    "type": "text",
                                    "content": "return HttpResponse(\"index 页面。。。\")",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        564,
                        246,
                        572
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 29,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                563,
                                248,
                                573
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        563,
                                        248,
                                        573
                                    ],
                                    "type": "text",
                                    "content": "设置从哪个页面访问，登录成功后就返回哪个页面。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        579,
                        107,
                        588
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 30,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                578,
                                108,
                                590
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        578,
                                        108,
                                        590
                                    ],
                                    "type": "text",
                                    "content": "解析：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        595,
                        333,
                        603
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 31,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                595,
                                334,
                                604
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        595,
                                        334,
                                        604
                                    ],
                                    "type": "text",
                                    "content": "django 在用户访问页面时，如果用户是未登录的状态，就给用户返回登录页面。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        610,
                        304,
                        619
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 32,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                610,
                                305,
                                620
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        610,
                                        305,
                                        620
                                    ],
                                    "type": "text",
                                    "content": "此时，该登录页面的 URL 后面有参数：next=用户访问的页面的 URL。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        626,
                        281,
                        635
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 33,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                626,
                                281,
                                635
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        626,
                                        281,
                                        635
                                    ],
                                    "type": "text",
                                    "content": "因此，设置在用户登录成功后重定向的 URL 为 next 参数的值。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        641,
                        482,
                        650
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 34,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                641,
                                483,
                                651
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        641,
                                        483,
                                        651
                                    ],
                                    "type": "text",
                                    "content": "但是，若用户一开始就输入登录页面 logi，request.GET.get(\"next\") 就取不到值，所以在后面加or，可以设置自定义返回的页面。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        669,
                        384,
                        697
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 35,
                    "lines": [
                        {
                            "bbox": [
                                84,
                                664,
                                389,
                                699
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        84,
                                        664,
                                        389,
                                        699
                                    ],
                                    "type": "text",
                                    "content": "Django cookie 与 session",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        708,
                        306,
                        718
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 36,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                709,
                                306,
                                718
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        709,
                                        306,
                                        718
                                    ],
                                    "type": "text",
                                    "content": "Cookie 是存储在客户端计算机上的文本文件，并保留了各种跟踪信息。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        724,
                        177,
                        734
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 37,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                725,
                                177,
                                733
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        725,
                                        177,
                                        733
                                    ],
                                    "type": "text",
                                    "content": "识别返回用户包括三个步骤：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        105,
                        740,
                        348,
                        749
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 38,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                740,
                                348,
                                749
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        742,
                                        111,
                                        745
                                    ],
                                    "type": "text",
                                    "content": "",
                                    "score": 0.0
                                },
                                {
                                    "bbox": [
                                        124,
                                        740,
                                        348,
                                        749
                                    ],
                                    "type": "text",
                                    "content": "服务器脚本向浏览器发送一组Cookie。例如：姓名、年龄或识别号码等。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [],
            "page_size": [
                595,
                841
            ],
            "page_idx": 50
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        104,
                        80,
                        504,
                        120
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 2,
                    "blocks": [
                        {
                            "bbox": [
                                104,
                                80,
                                297,
                                89
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 0,
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        80,
                                        297,
                                        89
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                83,
                                                111,
                                                86
                                            ],
                                            "type": "text",
                                            "content": "",
                                            "score": 0.0
                                        },
                                        {
                                            "bbox": [
                                                124,
                                                80,
                                                297,
                                                89
                                            ],
                                            "type": "text",
                                            "content": "浏览器将这些信息存储在本地计算机上，以备将来使用。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                104,
                                95,
                                504,
                                120
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 1,
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        96,
                                        506,
                                        105
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                99,
                                                111,
                                                102
                                            ],
                                            "type": "text",
                                            "content": "",
                                            "score": 0.0
                                        },
                                        {
                                            "bbox": [
                                                124,
                                                96,
                                                506,
                                                105
                                            ],
                                            "type": "text",
                                            "content": "当下一次浏览器向 Web 服务器发送任何请求时，浏览器会把这些 Cookie 信息发送到服务器，服务器将使用这些信息来识别",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        123,
                                        111,
                                        145,
                                        122
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                123,
                                                111,
                                                145,
                                                122
                                            ],
                                            "type": "text",
                                            "content": "用户。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        86,
                        126,
                        504,
                        152
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                127,
                                504,
                                136
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        127,
                                        504,
                                        136
                                    ],
                                    "type": "text",
                                    "content": "HTTP 是一种\"无状态\"协议，这意味着每次客户端检索网页时，客户端打开一个单独的连接到 Web 服务器，服务器会自动不保留之前客",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                143,
                                157,
                                152
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        143,
                                        157,
                                        152
                                    ],
                                    "type": "text",
                                    "content": "户端请求的任何记录。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        158,
                        337,
                        168
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                158,
                                337,
                                168
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        158,
                                        337,
                                        168
                                    ],
                                    "type": "text",
                                    "content": "但是仍然有以下三种方式来维持 Web 客户端和 Web 服务器之间的 session 会话：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        174,
                        117,
                        182
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                173,
                                119,
                                183
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        173,
                                        119,
                                        183
                                    ],
                                    "type": "text",
                                    "content": "Cookies",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        189,
                        503,
                        214
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                188,
                                505,
                                200
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        188,
                                        505,
                                        200
                                    ],
                                    "type": "text",
                                    "content": "一个 Web 服务器可以分配一个唯一的 session 会话 ID 作为每个 Web 客户端的 cookie，对于客户端的后续请求可以使用接收到的",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                206,
                                138,
                                215
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        206,
                                        138,
                                        215
                                    ],
                                    "type": "text",
                                    "content": "cookie 来识别。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        220,
                        336,
                        230
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                221,
                                336,
                                230
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        221,
                                        336,
                                        230
                                    ],
                                    "type": "text",
                                    "content": "在 Web 开发中，使用 session 来完成会话跟踪，session 底层依赖 Cookie 技术。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "image",
                    "bbox": [
                        88,
                        232,
                        390,
                        384
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                88,
                                232,
                                390,
                                384
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        232,
                                        390,
                                        384
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                232,
                                                390,
                                                384
                                            ],
                                            "type": "image",
                                            "image_path": "9a48075248f18fba9020fddb11e4edfdde6582563e4eadd68f5b3ee2169d2f8d.jpg"
                                        }
                                    ]
                                }
                            ],
                            "index": 8,
                            "angle": 0,
                            "type": "image_body"
                        }
                    ],
                    "index": 8
                },
                {
                    "bbox": [
                        86,
                        391,
                        227,
                        403
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                391,
                                229,
                                404
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        391,
                                        229,
                                        404
                                    ],
                                    "type": "text",
                                    "content": "Session(保存在服务端的键值对)",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        406,
                        509,
                        466
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                407,
                                498,
                                419
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        407,
                                        498,
                                        419
                                    ],
                                    "type": "text",
                                    "content": "服务器在运行时可以为每一个用户的浏览器创建一个其独享的 session 对象，由于 session 为用",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                423,
                                510,
                                433
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        423,
                                        510,
                                        433
                                    ],
                                    "type": "text",
                                    "content": "户浏览器独享，所以用户在访问服务器的 web 资源时，可以把各自的数据放在各自的 session 中，",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                438,
                                496,
                                450
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        438,
                                        496,
                                        450
                                    ],
                                    "type": "text",
                                    "content": "当用户再去访问该服务器中的其它web 资源时，其它web 资源再从用户各自的 session 中取出",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                454,
                                165,
                                466
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        454,
                                        165,
                                        466
                                    ],
                                    "type": "text",
                                    "content": "数据为用户服务。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "image",
                    "bbox": [
                        91,
                        480,
                        477,
                        736
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                91,
                                480,
                                477,
                                736
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        91,
                                        480,
                                        477,
                                        736
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                91,
                                                480,
                                                477,
                                                736
                                            ],
                                            "type": "image",
                                            "image_path": "13016cbec949f6ef478321a5634a2c0188ff9b392a433e44d44ca4da2df9e845.jpg"
                                        }
                                    ]
                                }
                            ],
                            "index": 11,
                            "angle": 0,
                            "type": "image_body"
                        }
                    ],
                    "index": 11
                },
                {
                    "bbox": [
                        88,
                        749,
                        130,
                        761
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                749,
                                130,
                                763
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        749,
                                        130,
                                        763
                                    ],
                                    "type": "text",
                                    "content": "工作原理",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [],
            "page_size": [
                595,
                841
            ],
            "page_idx": 51
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        104,
                        79,
                        502,
                        138
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 3,
                    "blocks": [
                        {
                            "bbox": [
                                104,
                                79,
                                303,
                                92
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 0,
                            "lines": [
                                {
                                    "bbox": [
                                        115,
                                        77,
                                        304,
                                        95
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                115,
                                                77,
                                                304,
                                                95
                                            ],
                                            "type": "text",
                                            "content": "a. 浏览器第一次请求获取登录页面 login。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                104,
                                95,
                                502,
                                123
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 1,
                            "lines": [
                                {
                                    "bbox": [
                                        110,
                                        95,
                                        502,
                                        106
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                110,
                                                95,
                                                502,
                                                106
                                            ],
                                            "type": "text",
                                            "content": " b. 浏览器输入账号密码第二次请求，若输入正确，服务器响应浏览器一个 index 页面和",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        124,
                                        109,
                                        500,
                                        124
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                124,
                                                109,
                                                500,
                                                124
                                            ],
                                            "type": "text",
                                            "content": "一个键为 sessionid，值为随机字符串的 cookie，即 set_cookie (\"sessionid\",随机字符串)。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                104,
                                126,
                                343,
                                138
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 2,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        126,
                                        344,
                                        140
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                126,
                                                344,
                                                140
                                            ],
                                            "type": "text",
                                            "content": " c. 服务器内部在 django.session 表中记录一条数据。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        86,
                        142,
                        226,
                        154
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                142,
                                226,
                                155
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        142,
                                        226,
                                        155
                                    ],
                                    "type": "text",
                                    "content": "django.session 表中有三个字段。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        140,
                        157,
                        502,
                        232
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 8,
                    "blocks": [
                        {
                            "bbox": [
                                140,
                                157,
                                502,
                                185
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 5,
                            "lines": [
                                {
                                    "bbox": [
                                        140,
                                        156,
                                        503,
                                        170
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                140,
                                                156,
                                                503,
                                                170
                                            ],
                                            "type": "text",
                                            "content": "o session_key：存的是随机字符串，即响应给浏览器的 cookie 的 sessionid 键对应",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        158,
                                        171,
                                        189,
                                        187
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                158,
                                                171,
                                                189,
                                                187
                                            ],
                                            "type": "text",
                                            "content": "的值。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                140,
                                188,
                                501,
                                216
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 6,
                            "lines": [
                                {
                                    "bbox": [
                                        141,
                                        188,
                                        503,
                                        203
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                141,
                                                188,
                                                503,
                                                203
                                            ],
                                            "type": "text",
                                            "content": "o session_data：存的是用户的信息，即多个 request.session[\"key\"]=value，且是密",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        158,
                                        203,
                                        179,
                                        218
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                158,
                                                203,
                                                179,
                                                218
                                            ],
                                            "type": "text",
                                            "content": "文。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                140,
                                219,
                                397,
                                232
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 7,
                            "lines": [
                                {
                                    "bbox": [
                                        141,
                                        219,
                                        397,
                                        233
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                141,
                                                219,
                                                397,
                                                233
                                            ],
                                            "type": "text",
                                            "content": "o expire_date：存的是该条记录的过期时间（默认 14 天）",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        104,
                        235,
                        492,
                        264
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                106,
                                236,
                                479,
                                247
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        106,
                                        236,
                                        479,
                                        247
                                    ],
                                    "type": "text",
                                    "content": " d. 浏览器第三次请求其他资源时，携带cookie :{sessionid:随机字符串}，服务器从",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                123,
                                250,
                                493,
                                264
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        123,
                                        250,
                                        493,
                                        264
                                    ],
                                    "type": "text",
                                    "content": "django.session 表中根据该随机字符串取出该用户的数据，供其使用（即保存状态）。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        266,
                        501,
                        294
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                265,
                                501,
                                280
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        265,
                                        501,
                                        280
                                    ],
                                    "type": "text",
                                    "content": "注意: django.session 表中保存的是浏览器的信息，而不是每一个用户的信息。 因此， 同一浏览",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                282,
                                457,
                                295
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        282,
                                        457,
                                        295
                                    ],
                                    "type": "text",
                                    "content": "器多个用户请求只保存一条记录（后面覆盖前面）,多个浏览器请求才保存多条记录。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        297,
                        498,
                        341
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                297,
                                499,
                                310
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        297,
                                        499,
                                        310
                                    ],
                                    "type": "text",
                                    "content": "cookie 弥补了 http 无状态的不足，让服务器知道来的人是\"谁\"，但是 cookie 以文本的形式保存",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                314,
                                496,
                                325
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        314,
                                        496,
                                        325
                                    ],
                                    "type": "text",
                                    "content": "在浏览器端，安全性较差，且最大只支持 4096 字节，所以只通过 cookie 识别不同的用户，然",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                329,
                                383,
                                342
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        329,
                                        383,
                                        342
                                    ],
                                    "type": "text",
                                    "content": "后，在对应的 session 里保存私密的信息以及超过 4096 字节的文本。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        344,
                        145,
                        356
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                86,
                                344,
                                148,
                                357
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        86,
                                        344,
                                        148,
                                        357
                                    ],
                                    "type": "text",
                                    "content": "session 设置：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        359,
                        212,
                        372
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                359,
                                213,
                                374
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        359,
                                        179,
                                        374
                                    ],
                                    "type": "text",
                                    "content": "request.session[\"key\"]",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        180,
                                        362,
                                        188,
                                        370
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.77
                                },
                                {
                                    "bbox": [
                                        189,
                                        359,
                                        213,
                                        374
                                    ],
                                    "type": "text",
                                    "content": "value",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        375,
                        135,
                        387
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                375,
                                136,
                                389
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        375,
                                        136,
                                        389
                                    ],
                                    "type": "text",
                                    "content": "执行步骤：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        104,
                        391,
                        498,
                        450
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 18,
                    "blocks": [
                        {
                            "bbox": [
                                104,
                                391,
                                205,
                                403
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 15,
                            "lines": [
                                {
                                    "bbox": [
                                        121,
                                        391,
                                        206,
                                        404
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                121,
                                                391,
                                                206,
                                                404
                                            ],
                                            "type": "text",
                                            "content": "a. 生成随机字符串",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                104,
                                407,
                                498,
                                434
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 16,
                            "lines": [
                                {
                                    "bbox": [
                                        105,
                                        406,
                                        499,
                                        421
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                105,
                                                406,
                                                499,
                                                421
                                            ],
                                            "type": "text",
                                            "content": " b. 把随机字符串和设置的键值对保存到 django_session 表的 session_key 和 session_data",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        124,
                                        421,
                                        138,
                                        436
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                124,
                                                421,
                                                138,
                                                436
                                            ],
                                            "type": "text",
                                            "content": "里",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                104,
                                438,
                                409,
                                450
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 17,
                            "lines": [
                                {
                                    "bbox": [
                                        105,
                                        438,
                                        409,
                                        452
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                105,
                                                438,
                                                409,
                                                452
                                            ],
                                            "type": "text",
                                            "content": " c. 设置 cookie：set_cookie(\"sessionid\",随机字符串) 响应给浏览器",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        86,
                        454,
                        145,
                        465
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                86,
                                452,
                                148,
                                466
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        86,
                                        452,
                                        148,
                                        466
                                    ],
                                    "type": "text",
                                    "content": "session 获取：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        469,
                        190,
                        481
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                87,
                                467,
                                191,
                                484
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        467,
                                        191,
                                        484
                                    ],
                                    "type": "text",
                                    "content": "request.session.get('key')",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        484,
                        135,
                        497
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 21,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                484,
                                136,
                                498
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        484,
                                        136,
                                        498
                                    ],
                                    "type": "text",
                                    "content": "执行步骤：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        104,
                        500,
                        352,
                        544
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 25,
                    "blocks": [
                        {
                            "bbox": [
                                104,
                                500,
                                352,
                                512
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 22,
                            "lines": [
                                {
                                    "bbox": [
                                        108,
                                        499,
                                        354,
                                        513
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                108,
                                                499,
                                                354,
                                                513
                                            ],
                                            "type": "text",
                                            "content": " a. 从 cookie 中获取 sessionid 键的值，即随机字符串。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                104,
                                515,
                                346,
                                528
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 23,
                            "lines": [
                                {
                                    "bbox": [
                                        105,
                                        515,
                                        347,
                                        529
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                105,
                                                515,
                                                347,
                                                529
                                            ],
                                            "type": "text",
                                            "content": " b. 根据随机字符串从 django_session 表过滤出记录。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                531,
                                264,
                                544
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 24,
                            "lines": [
                                {
                                    "bbox": [
                                        105,
                                        530,
                                        266,
                                        545
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                105,
                                                530,
                                                266,
                                                545
                                            ],
                                            "type": "text",
                                            "content": " c. 取出 session_data 字段的数据。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        86,
                        546,
                        465,
                        560
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 26,
                    "lines": [
                        {
                            "bbox": [
                                86,
                                545,
                                468,
                                560
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        86,
                                        545,
                                        468,
                                        560
                                    ],
                                    "type": "text",
                                    "content": "session 删除，删除整条记录（包括 session_key、session_data、expire_date 三个字段）：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        562,
                        179,
                        575
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 27,
                    "lines": [
                        {
                            "bbox": [
                                87,
                                560,
                                181,
                                577
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        560,
                                        181,
                                        577
                                    ],
                                    "type": "text",
                                    "content": "request.session.flush()",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        577,
                        259,
                        591
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 28,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                577,
                                261,
                                591
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        577,
                                        261,
                                        591
                                    ],
                                    "type": "text",
                                    "content": "删除 session_data 里的其中一组键值对：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        593,
                        194,
                        606
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 29,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                592,
                                196,
                                608
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        592,
                                        196,
                                        608
                                    ],
                                    "type": "text",
                                    "content": "del request.session[\"key\"]",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        608,
                        135,
                        621
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 30,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                608,
                                136,
                                622
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        608,
                                        136,
                                        622
                                    ],
                                    "type": "text",
                                    "content": "执行步骤：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        104,
                        624,
                        348,
                        667
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 34,
                    "blocks": [
                        {
                            "bbox": [
                                104,
                                624,
                                348,
                                637
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 31,
                            "lines": [
                                {
                                    "bbox": [
                                        105,
                                        624,
                                        349,
                                        637
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                105,
                                                624,
                                                349,
                                                637
                                            ],
                                            "type": "text",
                                            "content": " a. 从 cookie 中获取 sessionid 键的值，即随机字符串",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                104,
                                640,
                                342,
                                652
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 32,
                            "lines": [
                                {
                                    "bbox": [
                                        105,
                                        640,
                                        342,
                                        654
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                105,
                                                640,
                                                342,
                                                654
                                            ],
                                            "type": "text",
                                            "content": " b. 根据随机字符串从 django_session 表过滤出记录",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                655,
                                226,
                                667
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 33,
                            "lines": [
                                {
                                    "bbox": [
                                        110,
                                        655,
                                        226,
                                        668
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                110,
                                                655,
                                                226,
                                                668
                                            ],
                                            "type": "text",
                                            "content": " c. 删除过滤出来的记录",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        86,
                        671,
                        154,
                        684
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 35,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                671,
                                155,
                                685
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        671,
                                        155,
                                        685
                                    ],
                                    "type": "text",
                                    "content": "Django 中间件",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        687,
                        499,
                        715
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 36,
                    "lines": [
                        {
                            "bbox": [
                                87,
                                686,
                                501,
                                702
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        686,
                                        501,
                                        702
                                    ],
                                    "type": "text",
                                    "content": "Django 中间件是修改 Django request 或者 response 对象的钩子，可以理解为是介于 HttpRequest",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                702,
                                276,
                                715
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        702,
                                        276,
                                        715
                                    ],
                                    "type": "text",
                                    "content": "与 HttpResponse 处理之间的一道处理过程。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        718,
                        476,
                        731
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 37,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                718,
                                476,
                                731
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        718,
                                        476,
                                        731
                                    ],
                                    "type": "text",
                                    "content": "浏览器从请求到响应的过程中，Django 需要通过很多中间件来处理，可以看如下图所示：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [],
            "page_size": [
                595,
                841
            ],
            "page_idx": 52
        },
        {
            "para_blocks": [
                {
                    "type": "image",
                    "bbox": [
                        88,
                        80,
                        485,
                        306
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                88,
                                80,
                                485,
                                306
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        80,
                                        485,
                                        306
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                80,
                                                485,
                                                306
                                            ],
                                            "type": "image",
                                            "image_path": "eff2575789a078e5215193fc6d91fb3d590196cf4b9a4bc9c76cfb08807856a7.jpg"
                                        }
                                    ]
                                }
                            ],
                            "index": 0,
                            "angle": 0,
                            "type": "image_body"
                        }
                    ],
                    "index": 0
                },
                {
                    "bbox": [
                        87,
                        328,
                        176,
                        341
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                328,
                                179,
                                342
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        328,
                                        179,
                                        342
                                    ],
                                    "type": "text",
                                    "content": "Django 中间件作用：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        105,
                        344,
                        339,
                        373
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 4,
                    "blocks": [
                        {
                            "bbox": [
                                105,
                                344,
                                339,
                                358
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 2,
                            "lines": [
                                {
                                    "bbox": [
                                        106,
                                        342,
                                        340,
                                        359
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                106,
                                                342,
                                                340,
                                                359
                                            ],
                                            "type": "text",
                                            "content": " 修改请求，即传送到 view 中的 HttpRequest 对象。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                360,
                                325,
                                373
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 3,
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        358,
                                        326,
                                        375
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                358,
                                                326,
                                                375
                                            ],
                                            "type": "text",
                                            "content": " 修改响应，即 view 返回的 HttpResponse 对象。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        86,
                        375,
                        375,
                        388
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                374,
                                376,
                                389
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        374,
                                        376,
                                        389
                                    ],
                                    "type": "text",
                                    "content": "中间件组件配置在 settings.py 文件的 MIDDLEWARE 选项列表中。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        391,
                        343,
                        403
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                391,
                                344,
                                404
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        391,
                                        344,
                                        404
                                    ],
                                    "type": "text",
                                    "content": "配置中的每个字符串选项都是一个类，也就是一个中间件。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        406,
                        151,
                        418
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                407,
                                151,
                                421
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        407,
                                        151,
                                        421
                                    ],
                                    "type": "text",
                                    "content": "自定义中间件",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        422,
                        244,
                        434
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                422,
                                246,
                                435
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        422,
                                        246,
                                        435
                                    ],
                                    "type": "text",
                                    "content": "中间件可以定义四个方法，分别是：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        454,
                        207,
                        465
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                86,
                                454,
                                207,
                                469
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        86,
                                        454,
                                        207,
                                        469
                                    ],
                                    "type": "text",
                                    "content": "process_request(self,request)",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        469,
                        351,
                        481
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                86,
                                468,
                                352,
                                483
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        86,
                                        468,
                                        352,
                                        483
                                    ],
                                    "type": "text",
                                    "content": "process_view(self, request, view_func, view_args, view_kwargs)",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        485,
                        262,
                        497
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                86,
                                483,
                                264,
                                500
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        86,
                                        483,
                                        264,
                                        500
                                    ],
                                    "type": "text",
                                    "content": "process_exception(self, request, exception)",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        501,
                        255,
                        513
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                87,
                                499,
                                257,
                                517
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        499,
                                        257,
                                        517
                                    ],
                                    "type": "text",
                                    "content": "process_response(self, request, response)",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [],
            "page_size": [
                595,
                841
            ],
            "page_idx": 53
        }
    ],
    "_backend": "hybrid",
    "_ocr_enable": false,
    "_vlm_ocr_enable": false,
    "_version_name": "2.7.5"
}