I’ve only been working with django for 6 months, and I’m not really clear on the flow of the login process.
I have a client that has a customized login screen created by a template. It has a submit button with:
In their urls file they have:
(r’^accounts/login/$’, login)
In their views file they call login(request)
What they want is, after the user has successfully logged in, I need to detect which browser they are using, and depending on which it is, potentially pop up a dialog box. I can’t figure out where that code would live. I’m not asking how to detect the browser type, but rather, where that javascript code would go, and how I would cause it to get invoked after the login.
I could detect the browser type in the login screen and pass that back to the server, but then how would I give control back to the browser after the login if I do need to pop up the dialog?
In your login-view use the request-object to get the browser type.
You could create your own login-view or manipulate (you should not do this – but it is posible) the django-default.