I have a few questions on the code.

1) The "myfriends" table is defined as :

  myfriends = db(Link.source==me)(Link.accepted==True)

But if someone asks for my friendship and I accept, then he won't be
in "myfriends" until I ask myself for his friendship (and he accepts).
Am I right ?
Maybe we could do two queries and unite them with "lambda a,b:a&b" ?

2) There are many functions which end with :

  return locals()

Does it return all the local variables defined in the function ?

3) Although I know what the result is, I don't understand the logic of
this query :

  # list all friendship requests we received
  friends = db(User.id==Link.source)
(Link.target==me).select(orderby=alphabetical)

What I don't understand is that the query deals with two different
tables.

4) Then all that ajax is Chinese for me ;)

<button
onclick="ajax('{{=URL('friendship',args=('request',user.id))}}',
[,null);$(this).parent().html('pending')">request friendship</button>

Where was the 'friendship' of the URL defined ?

Thanks to anybody who answers part of these questions,
François


On 2 juin, 23:03, Massimo Di Pierro <massimo.dipie...@gmail.com>
wrote:
> I have it somewhere. I will post it on web2py appliances asap.
>
> On Jun 2, 3:06 pm, François <gustave5...@gmail.com> wrote:
>
>
>
> > Thank you, this is nice and impressive !
>
> > Is there a place where I can download the code ?
>
> > François
>
> > On 2 juin, 17:57, Massimo Di Pierro <massimo.dipie...@gmail.com>
> > wrote:
>
> > > Something like this?http://vimeo.com/21364178
>
> > > On Jun 2, 10:09 am, François <gustave5...@gmail.com> wrote:
>
> > > > Hello everybody,
>
> > > > Is there a social network plug-in for Web2py, which for example allows
> > > > users to send messages to each other ?
>
> > > > Thank you very much,
> > > > François- Masquer le texte des messages précédents -
>
> > > - Afficher le texte des messages précédents -- Masquer le texte des 
> > > messages précédents -
>
> - Afficher le texte des messages précédents -

Reply via email to