Add support for different modes, particularly for django foreign key widget
Dist subtree commit