'module' object has no attribute 'form_for_model'

后端 未结 1 956
一个人的身影
一个人的身影 2021-01-28 11:32

When I am using attribute

form_for_model

I am getting an error module object has not attribute form_for_model..

I created the project from this http://ww

相关标签:
1条回答
  • 2021-01-28 11:56

    The post you are referring to is fairly old (2007) and a few things have changed since then: form_for_model is deprecated.

    I'd say you are better off looking at the official tutorial to get started with django.

    The current way for creating forms based on models is explained in this part of the docs: http://docs.djangoproject.com/en/1.8/topics/forms/modelforms/

    0 讨论(0)
提交回复
热议问题