good to know I'm being useful! :) thanks

On Tue, Apr 14, 2015 at 1:33 AM, Roh Codeur <behl.ro...@gmail.com> wrote:

> I ended up going with Avraham's response in this.
>
>
> On Thursday, 9 April 2015 01:53:35 UTC+1, Roh Codeur wrote:
>>
>> Hi
>>
>> I have a django app which has certain sections which are reserved for
>> registered users. I have the views annotated with login_required decorator
>> which redirects the user to a login page.
>>
>> However, I would like to keep the user on the same page and open up a
>> modal dialog prompting user to sign in(like on the website: http://www.
>> fashiolista.com/). To achieve this, I thought I could setup a
>> middleware(instead of using login_required) and return a response like
>> below:
>>
>>    return HttpResponse("<script>"
>>        "showLogin()"
>>        "</script>")
>>
>> When I try to do this, I realised that this renders a page with only the
>> script tag, which obviously doesnt work.
>>
>> I am using Bootstrap for showing modal dialogs.
>>
>> Middleware link: http://onecreativeblog.com/post/59051248/django-
>> login-required-middleware
>>
>> Any ideas?
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/5c3278b0-4688-4784-8a1f-7b037a6d1519%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/5c3278b0-4688-4784-8a1f-7b037a6d1519%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFWa6tJ_r%2Bf3wLfQQ43%2BEG8z1SN%3D_XWun2akAj1QbpT72xH6kA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to