web2py comes with a realime messaging engine in 
gluon/contrib/comet_messaging.py. It requires tornado installed. read the 
docstrings in the file for more info. It is not well documented but there 
is a video about it http://vimeo.com/18399381.

On Tuesday, 7 August 2012 23:58:33 UTC-5, shartha wrote:
>
>
> Hi, I'd like to implement a messaging system (between the users of the 
> website), and I need help to implement it. The way I've done it is to 
> create a message table that has fields for the sender, receiver, subject, 
> body, two boolean fields that shows whether the sender or the receiver have 
> deleted the message (such that it's not shown to them). This is not quite 
> working. I am thinking there must be a better way to do it, or somebody 
> might have already implemented something. The table is defined as:
>
> db.define_table('messages',
>     Field('recipient_id',db.auth_user, label='To'),
>     Field('subject','string'),
>     Field('body','string'),
>     Field('date','datetime'),
>     Field('sender_id',db.auth_user),
>     Field('sender_deleted','boolean'),
>     Field('recipient_deleted','boolean'),
> )
>
> and as it obvious, some of the fields are values from the user database. 
> Could somebody tell me if I am on the right track or if changes need to be 
> made to my structure?
>
> Thanks!
>

-- 



Reply via email to