How can I store history of ManyToManyField using django-simple-history.

后端 未结 2 1604
走了就别回头了
走了就别回头了 2021-01-24 06:14

How can I store history of ManyToManyField using django-simple-history. I used HistoricalRecords with attribute m2m_filds but it is throwing error: unexpected keyword ar

2条回答
  •  暖寄归人
    2021-01-24 06:49

    As the author of django-simple-history says this isn't possible to detect change in only specific fields because

    As you already know simple-history doesn't look at the values being saved at all. It blindly saves a new historical version on every save or delete signal.

    He also says it may be possible Field Tracker do this job.

提交回复
热议问题