https://code.djangoproject.com/ticket/23315