rbarrois/django_xworkflows — pull request #7 by nicolas-DH (2012-11-27 15:01:04+00:00)
Title: Enable multiple inheritance of abstract Models that contains ForeinKeys

Hi,

I 'm trying to use my own TransitionLog Model for some workflows and in the same time, I would like to use django_xworkflows.xworkflow_log as a default TransitionLog Model for all workflows.

But Django doesn't allow me to do that because of GenericTransitionLog.content_type field.

The related_name is hardcoded as 'workflow_object', so once it has been registered for default TransitionLog, my own Model can not reuse it.

According to django documentation https://docs.djangoproject.com/en/dev/topics/db/models/#be-careful-with-related-name , we can compute this related_name dynamically.

I quickly wrote a patch and run the test suite without detecting regression.

This PR miss also the south migration, can you explain me how can I generate it ?

Thanks,
Nicolas