Fix import order for django < 1.7