I haven't tested the patch, but it makes sense to me.
Note that my earlier patch was really just mimicking what django is doing: https://github.com/django/django/blob/master/django/contrib/auth/views.py#L49
So if we go for this more solid version, we might want to add that to django_openstack_auth for Folsom (or even better, to fix this in django upstream).
I haven't tested the patch, but it makes sense to me.
Note that my earlier patch was really just mimicking what django is doing: https:/ /github. com/django/ django/ blob/master/ django/ contrib/ auth/views. py#L49
So if we go for this more solid version, we might want to add that to django_ openstack_ auth for Folsom (or even better, to fix this in django upstream).