Yes,
I believe the url ('/_ah/xmpp/message/chat/') is significant
what about:
app='_ah'
controller='xmpp'
action='message'
then handle the rest as args and call other controller functions?
Robin
On Sep 23, 2:57 pm, mdipierro <[email protected]> wrote:
> Then it should be possible to rewrite the entire example as a web2py
> application. Is there specific significance it the URL names ('/_ah/
> xmpp/message/chat/') used in the example? Because preserving those
> would require roots.
>
> Massimo
>
> On Sep 23, 2:25 pm, Robin B <[email protected]> wrote:
>
> > looks like a string property that validates as an instant messaging
> > handle.
>
> >http://ru.ly/Nb
>
> > class IM(object):
> > """An instant messaging handle. Includes both an address and its
> > protocol.
> > The protocol value is either a standard IM scheme or a URL
> > identifying the
> > IM network for the protocol. Possible values include:
>
> > Value Description
> > sip SIP/SIMPLE
> > unknown Unknown or unspecified
> > xmpp XMPP/Jabber
> > http://aim.com/ AIM
> > http://icq.com/ ICQ
> > http://talk.google.com/ Google Talk
> > http://messenger.msn.com/ MSN Messenger
> > http://messenger.yahoo.com/ Yahoo Messenger
> > http://sametime.com/ Lotus Sametime
> > http://gadu-gadu.pl/ Gadu-Gadu
>
> > This is the gd:im element. In XML output, the address and protocol
> > are
> > provided as the address and protocol attributes, respectively. See:
> > http://code.google.com/apis/gdata/common-elements.html#gdIm
>
> > Serializes to '<protocol> <address>'. Raises BadValueError if tag is
> > not a
> > standard IM scheme or a URL.
> > """
>
> > Robin
>
> > On Sep 23, 8:01 am, mdipierro <[email protected]> wrote:
>
> > > What's a IM field?
>
> > > On Sep 22, 10:13 pm, Robin B <[email protected]> wrote:
>
> > > > You can edit app.yaml to dispatch requests to those xmpp handlers
> > > > based on prefix (/_ah/*), and let web2py handle everything that's left
> > > > (/*)
>
> > > > Or you can rewrite those handlers as web2py controller/functions and
> > > > use routes.py to map the specific urls to app/controller/function
>
> > > > Robin
>
> > > > On Sep 22, 5:44 pm, murray3 <[email protected]> wrote:
>
> > > > > I am interested in the way we can convert GAE sample web apps to
> > > > > web2py, in particular the xmpp tutorial
> > > > > :http://code.google.com/appengine/articles/using_xmpp.html
>
> > > > > Seems straight forward to import the modules etc.
>
> > > > > How should the following be ported to web2py to handle the xmpp stuff?
> > > > > def main():
> > > > > app = webapp.WSGIApplication([
> > > > > ('/', LatestHandler),
> > > > > ('/_ah/xmpp/message/chat/', XmppHandler),
> > > > > ], debug=True)
> > > > > wsgiref.handlers.CGIHandler().run(app)
>
> > > > > the tutorial states the following:
>
> > > > > " There's one last thing we need to do to get this all working, of
> > > > > course - hook it up to the serving infrastructure so it can serve
> > > > > requests. Fortunately, a CommandHandler is a standard webapp
> > > > > RequestHandler subclass, so we can set it up as we would any other
> > > > > handler. Modify the lines where the application variable is defined to
> > > > > read like this:
>
> > > > > application = webapp.WSGIApplication([
> > > > > ('/_ah/xmpp/message/chat/', XmppHandler)], debug=True)
>
> > > > > The URL path here - /_ah/xmpp/message/chat - is a 'reserved' one that
> > > > > all XMPP messages get sent to. "
>
> > > > > any pointers to get me started.
> > > > > regards
> > > > > chrism
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---