On Thu, Aug 2, 2012 at 8:15 PM, Melvyn Sopacua <m.r.sopa...@gmail.com> wrote:
> On 1-8-2012 21:52, Larry Martell 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.
>
> Add a UserProfile field "just_logged_in", type Boolean.
> The only place that field gets set to True is in the login view. Don't
> forget to save the profile in that view.
> Create a small that sets the field back to False and saves the profile
> that can be invoked by an AJAX call.
> In your base_site.html template use:
>  {% if user.get_user_profile.just_logged_in %}
> to include a javascript bit, that generates the popup /and/ calls the
> view that resets the just_logged_in field.

Thanks for the reply Melvyn. But after all this work and research
they've decided now that they want the popup displayed before the user
logs in. This greatly simplifies things, as I can do it all from the
login template. Thanks all for the help.

-- 
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.

Reply via email to