2022年7月27日

Django---inclusion_tag的使用

摘要: Django当中的inclusion_tag,来源于 from django.template import Library 属于Library下的一个方法。 主要作用:通过渲染一个模板来显示一些数据。属于自定义标签的一种。 项目实现:为了能够在页面中一栏上显示一级菜单 1.templatetags 阅读全文

posted @ 2022-07-27 16:49 一先生94 阅读(156) 评论(0) 推荐(0) 编辑

Django当中request.path, request.path_info, get_full_path方法的区别

摘要: url : http://127.0.0.1:8001/rbac/role/edit/?page=2 1.request.path: request.path仅提供相对于根目录的url相对路径,不包含参数。它的输出是一个字符串,结果如下所示:/rbac/role/edit/ 2.request.pa 阅读全文

posted @ 2022-07-27 13:37 一先生94 阅读(571) 评论(0) 推荐(0) 编辑

导航