Does a model's save() method get called when using loaddata for fixtures?

前端 未结 1 1601
我寻月下人不归
我寻月下人不归 2021-01-15 03:47

I\'m trying to generate an automatic slug for a model whenever it is empty, from another field. This is the code:

class Position(RichText):
    name = models         


        
相关标签:
1条回答
  • 2021-01-15 04:29

    This is normal behavior, from the documentation:

    When fixture files are processed, the data is saved to the database as is. Model defined save methods and pre_save signals are not called

    .

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