You can create records and the the auth_group to create a group give a look
at it in the database admin, it is simple.

For example:
form = crud.create(db.auth_group)

with this line you can create a form where the user will insert a record,
so creating a new group.

To put someone in a group simply add a record in auth_membership.
Something like this:
form = crud.crate(db.auth_membership)

User must fill group and the user to add.

For setting preferences you can create another table that references a
group.
Put fields in this table for the preferences.
Something like this.

db.define_table('group_preferences'),
                       Field('group',db.auth_group),
                       Field('chat'),boolean), .......... # other fields as
need
)

To verify if a user can chat with another you can do something like this:

can_chat = db(db.auth_group.user==userid_to_chat &&
db.group_preferences.group==db.auth_group.id &&
db.group_preferences.chat).select()
if len(can_chat) > 0:
  # if you got some record in the query the you can chat
























2013/3/2 sasogeek <sasog...@yahoo.com>

> Help...
>
>  --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
Att.

Carlos J. Costa
Cientista da Computação
Esp. Gestão em Telecom

EL MELECH NEEMAN!
אָמֵן

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to