Django Book 翻译
菜单>:
TOC
返回
原文:
Well start by adding adding ``(r'^contact/$', 'mysite.books.views.contact')`` to the URLconf, then defining our form. Forms in Django are created in a similar way to models: declaratively, using a Python class. Heres the class for our simple form. By convention, well insert it into a new ``forms.py`` file within our application directory:
翻译:
开始,在URLconf里添加 ``(r'^contact/$', 'mysite.books.views.contact')`` ,然后定义表单。 在Django中表单的创建类似MODEL:使用Python类来声明。这里是我们简单表单的类。为了方便,把它写到新的 ``forms.py`` 文件中,这个文件在app目录下。
备注:
译者: