开发者

django form based on model

In http://docs.djangoproject.com/en/1.2/topics/forms/modelforms/#a-full-example can anyone tell me the step by step process to map the AuthorForm and Bookform in my views.py开发者_如何学运维 and to render it in my template.


The process is the same as with a regular Form (http://docs.djangoproject.com/en/dev/topics/forms/), a ModelForm is basically just a shortcut and more DRY approach than creating a regular Form when that form's purpose is to create or edit a model instance.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜