From fa6862a79dae94403d033c15af0cb7308c8f0907 Mon Sep 17 00:00:00 2001 From: James Osgood Date: Tue, 23 Sep 2014 16:50:39 -0600 Subject: [PATCH] Added m2m support to register. See treyhunner/django-simple-history#16 and Kyruus/django-simple-history@5ba8d2b --- simple_history/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/simple_history/__init__.py b/simple_history/__init__.py index 00fbc2b8a..40f1bb6a1 100755 --- a/simple_history/__init__.py +++ b/simple_history/__init__.py @@ -19,6 +19,8 @@ def register(model, app=None, manager_name='history', **records_config): records = models.HistoricalRecords(**records_config) records.manager_name = manager_name records.module = app and ("%s.models" % app) or model.__module__ + records.cls = model records.add_extra_methods(model) + records.setup_m2m_history(model) records.finalize(model) models.registered_models[model._meta.db_table] = model