AndrewIngram/django-extra-views — pull request #27 by dekkers (2012-11-23 22:46:10+00:00)
Title: Use the new ContextMixin from Django 1.5

Django 1.5 introduces the ContextMixin to solve problems with multiple mixins defining get_context_data. It also sets the 'view' variable that points to the View which is quite handy. For more information, see the documentation: https://docs.djangoproject.com/en/dev/ref/class-based-views/mixins-simple/#contextmixin and the ticket that introduced it: https://code.djangoproject.com/ticket/16074

This patch adds support for using ContextMixin. I also modified the get_context_data methods to be all in the same style as the mixins in Django 1.5, so that it is clear what is going on and overriding variables will always work in the same way.

For earlier Django versions I added our own version of ContextMixin. I tested with both 1.4 and 1.5 and all tests pass with both versions.