讲到的通用视图系-maxwell多目标优化

时间:2021-06-30 19:32:50
【文件属性】:
文件名称:讲到的通用视图系-maxwell多目标优化
文件大小:2.33MB
文件格式:PDF
更新时间:2021-06-30 19:32:50
Delphi 录中,这非常好。 事实上,我们推荐这样做;一些Django的高级特性(例如将在第十一章讲到的通用视图系 统)的缺省约定就是期望使用这种模板布局。 把模板存放于模板目录的子目录中是件很轻松的事情。 只需在调用 get_template() 时,把子目录名和一条斜 杠添加到模板名称之前,如: t = get_template('dateapp/current_datetime.html') 由于 render_to_response() 只是对 get_template() 的简单封装, 你可以对 render_to_response() 的第一个 参数做相同处理。 return render_to_response('dateapp/current_datetime.html', {'current_date': now}) 对子目录树的深度没有限制,你想要多少层都可以。 只要你喜欢,用多少层的子目录都无所谓。 注意 2010-5-5 第四章:模版 djangobook.py3k.cn/2.0/chapter04/ 20/25

网友评论