stephenmcd/mezzanine — pull request #1065 by rockymeza (2014-07-08 09:46:22+00:00)
Title: Support custom User model in AdminLoginInterfaceSelectorMiddleware.

Hi,

I upgraded Mezzanine on one of our projects and ran into an error with the AdminLoginInterfaceSelectorMiddleware. I know that you want to continue to support the Django 1.4 LTS, so I made sure that this code supports both the new Custom User Model contract and the old User model interface.

I realize that I could just turn off the AdminLoginInterfaceSelectorMiddleware, but then logging in at /admin/ redirects to /accounts/profile/ while I'd much rather it redirect back to the /admin/ center.