django升级问题

从1.7到1.8变化:

1、渲染html页面函数request的应用,如:

request.user获取当前登录用户的对象(obj)信息

request.user扩展:

如使用orm建表userprofile表时,如列:

username 单对应user表时建立了与user表关联,html前端可通过request.user.userprofile.id获取当前id,

request.user.userprofile.name可获取到用户名。

2、settings里的templates模板的设置

原文地址:https://www.cnblogs.com/fengzaoye/p/5887326.html