I'm upgrading an old Django 1.1 project to a clean Django 1.5 installation. The Django upgrade itself has gone very well; {% url %}
changes, settings, some class-based generic views, some core patches replaced with a custom User model, others done with nicer middleware, and so on, hooray.
What I didn't expect to stop working, but has, is a model creation form that lets someone add a related object at the same time. In the code, this is done using a MultiValueField subclass:
class AutoCompleteMultiValueField(forms.MultiValueField):
def __init__(self, model, column, *args, **kwargs):
self.model = model
self.column = column
super(AutoCompleteMultiValueField, self).__init__(*args, **kwargs)