On Wed, Aug 1, 2012 at 1:52 PM, Larry Martell <larry.mart...@gmail.com> wrote: > On Wed, Aug 1, 2012 at 1:38 PM, Kurtis Mullins <kurtis.mull...@gmail.com> > wrote: >> Sorry for the double-message. Anyways, if you do want to do what that other >> person recommended, simply find the View that the user is redirected to >> after logging in. Then, modify the "context data" of that view to dump >> whatever data to the template. And then do some magic in the template based >> upon that context data. In short, put this logic in the view the user is >> sent to after they've logged in. > > What view they are redirected to is not consistent. It depends on what > the user is permissioned for and what features the customer has paid > for. But I may be able to do this in some common part of the code. > Thanks.
Another issue with this is that I only want to display the pop up once, immediately after they login. I don't think I can tell if that's the case in the view, only in the code that is called after login(). > > >> On Wed, Aug 1, 2012 at 3:36 PM, Kurtis Mullins <kurtis.mull...@gmail.com> >> wrote: >>> >>> Is the "Dialog Box" going to be presented using Javascript? If so, why not >>> use Javascript for this functionality? I'd typically only use this type of >>> functionality to serve pages when javascript isn't enabled or you need to >>> show various templates based upon the type of browser (for example, a Mobile >>> browser). Just a suggestion. >>> >>> >>> On Wed, Aug 1, 2012 at 3:11 PM, Larry Martell <larry.mart...@gmail.com> >>> wrote: >>>> >>>> On Tue, Jul 31, 2012 at 8:05 PM, Larry Martell <larry.mart...@gmail.com> >>>> wrote: >>>> > I've only been working with django for 6 months, and I'm not really >>>> > clear on how the login process works. >>>> > >>>> > I have a client that has a login screen created by a template. It has >>>> > a submit button with: >>>> > >>>> > <form id="login" action="/accounts/login/" method="POST"> >>>> > >>>> > 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. >>>> >>>> Someone suggested getting the browser type on the server side, and >>>> then adding a variable to my response and check it in the template. I >>>> like this solution, however I cannot figure out how to add the >>>> variable to the response. After the successful login, the code calls >>>> HttpResponseRedirect. How can I can I add a variable to that? >>>> >>>> -- >>>> You received this message because you are subscribed to the Google Groups >>>> "Django users" group. >>>> To post to this group, send email to django-users@googlegroups.com. >>>> To unsubscribe from this group, send email to >>>> django-users+unsubscr...@googlegroups.com. >>>> For more options, visit this group at >>>> http://groups.google.com/group/django-users?hl=en. >>>> >>> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To post to this group, send email to django-users@googlegroups.com. >> To unsubscribe from this group, send email to >> django-users+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/django-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.