模版语法 传值 视图函数向前端html页面传值,基本上所有的数据类型都可以渲染在前端页面上. views.py from django.shortcuts import render, redirect, HttpResponse # Create your views here. def index(request): int_1 = 123 str_2 = '测试' list_3 = [1, 2, 3] dict_4 = {'a': 1, 'b': 2} set_5 = {1, 2, 3,…