You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a questions regarding History management in a ModelAdmin that includes an One to Many Inline:
How do you set these up so that History of the Many side model is also shown on the main Model, in a similary way to ManyToMany Models?
I have two related Models: One for Reports, one for the E-Mail Addresses the Reports are to be sent to.
Basically they are set up like this:
class DeliveryByEmailRecipient(TimestampMixin, models.Model):
report = HistoricForeignKey(
"Report",
related_name="delivery_by_email_recipients",
)
history = HistoricalRecords()
class Report(TimestampMixin, CloneMixin, models.Model):
name = models.CharField(max_length=255)
history = HistoricalRecords()
I've integrated the DeliveryByEmailRecipient Model into the Reports Admin page using an InlineAdmin.
Administration of the E-Mails works as intended, but changes are not tracked by simple-history.
I've probably an error in my setup, so I would be grateful if somebody could give me some hints.
I'm actually not even sure if I need to use HistoricForeignKey here.
Best regards
The text was updated successfully, but these errors were encountered:
Hello,
I have a questions regarding History management in a ModelAdmin that includes an One to Many Inline:
How do you set these up so that History of the Many side model is also shown on the main Model, in a similary way to ManyToMany Models?
I have two related Models: One for Reports, one for the E-Mail Addresses the Reports are to be sent to.
Basically they are set up like this:
I've integrated the DeliveryByEmailRecipient Model into the Reports Admin page using an InlineAdmin.
Administration of the E-Mails works as intended, but changes are not tracked by simple-history.
I've probably an error in my setup, so I would be grateful if somebody could give me some hints.
I'm actually not even sure if I need to use HistoricForeignKey here.
Best regards
The text was updated successfully, but these errors were encountered: