Hi,

Well it seems that you have understood things a bit incorrectly.

First at all, only logged in user is the one accessing some page (a view) from 
Django system.

After that there is nobody logged in traditional sense - there is no simple way 
to detect that user closed browser and was "logged out" nor there is no simple 
way to tell that who is actually even logged in. Most "logged in" counters do 
rely on "less than X time from last action" means active user, whether or not 
that is true.

So what you asked is not possible to do that way. 

That doesn't mean that you can't do it - it would just require a bit more work.

You need two things for that - first you need means to actually store message 
somewhere and secondly you need some mechanism that you check unread messages 
per user return messages in some proper format if there are unread messages and 
mark them read somehow.

That covers serverside work pretty well. Nothing magic just a bit of coding 
work.

In a client you have few options - as you asked for live update you would have 
to have (timed) piece of javascript that in certain intervals pulls messages 
(if any) from server.

There exists other techniques (server push, BOSH, Comet, websockets) as well 
but that is pretty much simplest one to implement.

If you're lucky you can find good examples by gooling for "django web chat" or 
similiar.

On Mon, 19 Aug 2013 06:48:33 -0700 (PDT)
Gerd Koetje <deonlinefotogr...@gmail.com> wrote:

> but can it also update a message on a page where that user is without 
> reloading the page?
> 
> lets say user 1 is on page http://www.domain.com/acertainview/
> 
> and at that moment i start a signal as admin with the text hello there
> Can i update the text on his page to that text (live)
> 
> 
> Op maandag 19 augustus 2013 06:29:45 UTC+2 schreef Gerd Koetje:
> >
> > Is is possible to start an event at all connected users with signals?
> > If this is possible can someone show me an example of it.
> >
> >
> > Greetz
> > Gerd
> >
> >
> 
> -- 
> 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.
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to