The "next" parameter, redirect, django.contrib.auth.login
create your own view for logging in, with it's own url, don't use the admin's one.
you can store the next page in the session, or pass it as a GET parameter to the login view
(i.e. /login?next=gallery) just don't forget to sanitize and validate that value before redirecting to it.
I'm trying to redirect users to custom url "/gallery/(username)/" after successfully logging in.  It currently redirects to the default "/account/profile/" url  While I know what I can override the redirect url in my settings.py, my url is dynamic thus it will not work.
Documentation states that I need to use the "next" parameter and context processors.  I have the {{next}} in my template, but I'm confused on how to actually pass the "/gallery/(username)".  Any help would be greatly appreciated.
p.s: I'm trying to steer away from writing my own login view.