ambitioninc/django-activatable-model — pull request #5 by wesleykendall (2014-10-15 20:34:06+00:00)
Title: Added configurable is_active field to Activatable Models

@Wilduck this updates django activatable model so that users can define what field on their model constitutes the activatable field.

Previously, the BaseActivatableModel defined an is_active boolean field. The trouble with this is that it was difficult for the user to override the default values of this field and other properties such as if it is indexed.

In this newer version, the user must define a boolean field on their model that has the same name as ACTIVATABLE_FIELD_NAME in their model. This name defaults to 'is_active' in order to achieve semi-backwards compatibility.

I have not added docs yet because I wanted to do a PR to make sure this is a good thinking in design first. I thought about making the user override a function on their model to get the activatable field name, but I also had to make the assumption that the user would know to make it a classmethod. I don't really like that design and thought it was better to just allow the user to define a constant attribute on their model.

Thoughts? If you are good with this, I'll finish the rest of the tests and update the docs / add release notes