Django Book 翻译
菜单>:
TOC
返回
原文:
The most interesting line here is ``{{ form.as_table }}`` . ``form`` is our ContactForm instance, as passed to ``render_to_response`` . ``as_table`` is a method on that object that renders the form as a sequence of table rows (``as_ul`` and ``as_p`` can also be used). The generated HTML looks like this:
翻译:
最有意思的一行是 {{ form.as_table }}。form是ContactForm的一个实例,我们通过render_to_response方法把它传递给模板。as_table是form的一个方法,它把form渲染成一系列的表格行(as_ul和as_p也是起着相似的作用)。生成的HTML像这样:
备注:
译者: