Django doesn't call model clean method

前端 未结 4 1136
后悔当初
后悔当初 2020-12-29 03:00

I have a view, which creates models from CSV file. I\'ve added clean method to the model class definition, but it isn\'t called when model is created.

Here is exampl

4条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-29 03:16

    Apparently model.clean() is never called to ensure backward compatibility. For more information on this: https://code.djangoproject.com/ticket/13100

提交回复
热议问题