Django使用模板引擎开发web应用
1.在项目里拷贝一个App,取名为App02
APP需要在settings里的INSTALLED_APPS注册
用locals()把 users = [{‘username’:‘admin’},{‘username’:‘hello’}]字典传入到index.html文件中
1.在项目里拷贝一个App,取名为App02
APP需要在settings里的INSTALLED_APPS注册
用locals()把 users = [{‘username’:‘admin’},{‘username’:‘hello’}]字典传入到index.html文件中