创建模型, 然后页面中使用实例化的对象
class User: def __init__(self, name, sex, phone, address): self.name= name self.sex= sex self.phone= phone self.address= address def foo(request): user = User(u'小敏', u'男’, '18055008888', '中都大道xxx号') ... <body> {{user.name}}: {{user.sex}} ... </body>