Django框架-模板系统

  来看一段代码 def current_datetime(request): now = datetime.datetime.now() html = "<html><body>It is now %s.</body></html>" % now return HttpResponse(html) 直接把HTML页面嵌套在视图函数里返回给浏览器并不是一个好主意; 原因:
相关文章
相关标签/搜索