carljm/django-model-utils — pull request #95 by kezabelle (2013-11-24 12:53:29+00:00)
Title: Fixed #25 - 3-tuple choices on a StatusModel should use the python identifier.

If a 3-tuple Choices variant is used in a StatusModel, rather than use the db representation as the attribute on the Model, use the given python identifier.

Up for discussion:
- I've had to opt for using `isinstance` (or alternatively, `hasattr`) to get the required data out of the Choices instance, as there is no way I can see of treating it like a tuple. It always returns either the display representation or the the db & display representation, depending on what you're doing (iterating, getting via [0], etc). I'm open to suggestions.
- I'm not sure of the backwards compatibility ramifications of essentially pulling a switcheroo on existent code, and what could/should be done about it.