Ticket 20234 20236

Resolved: https://code.djangoproject.com/ticket/20234 and https://code.djangoproject.com/ticket/20236