Django 模板(templates)引擎的使用

Django 模板引擎的使用 1.首先在项目下建立一个文件夹templates,储存各种模板 2.然后在settings.py 下添加模板 3.然后进入view.py 使用Django自带的模板渲染引擎 from django.shortcuts import render # 渲染模板 构建response对象  response = render(request,'index.html',co
相关文章
相关标签/搜索