Ejemplo n.º 1
0
 def POST(self):
     i = web.input()
     email = i.get('email')
     form = forms.loadcontactsform()
     if form.validates(i):
         session.email = email
         session.pid = i.pid
         if i.provider == 'Yahoo':
             ylogin_url = yahooLoginURL(email, '/WSLogin/V1/wslogin')
             raise web.seeother(ylogin_url)
         elif i.provider == 'Google': 
             glogin_url = gmailLoginURL(email)
             raise web.seeother(glogin_url)
     else:
         import petition
         share_obj = petition.share()
         return share_obj.GET(form)
Ejemplo n.º 2
0
 def POST(self):
     i = web.input()
     email, url, title = i.get('email', ''), i.get('url', '/'), i.get('title', '')
     form = forms.loadcontactsform()
     if form.validates(i):
         if i.provider == 'yahoo':
             ylogin_url = yahooLoginURL(email, '/WSLogin/V1/wslogin', share_url=url, title=title)
             raise web.seeother(ylogin_url)
         elif i.provider == 'google':
             glogin_url = gmailLoginURL(email, url, title)
             raise web.seeother(glogin_url)
         elif i.provider == 'msn':
             mlogin_url = msnLoginURL(email, url, title)
             raise web.seeother(mlogin_url)
     else:
         import petition
         share_obj = petition.share()
         emailform = forms.emailform()
         return share_obj.GET(emailform, form)
Ejemplo n.º 3
0
 def POST(self):
     i = web.input()
     email, url, title = i.get('email', ''), i.get('url',
                                                   '/'), i.get('title', '')
     form = forms.loadcontactsform()
     if form.validates(i):
         if i.provider == 'yahoo':
             ylogin_url = yahooLoginURL(email,
                                        '/WSLogin/V1/wslogin',
                                        share_url=url,
                                        title=title)
             raise web.seeother(ylogin_url)
         elif i.provider == 'google':
             glogin_url = gmailLoginURL(email, url, title)
             raise web.seeother(glogin_url)
         elif i.provider == 'msn':
             mlogin_url = msnLoginURL(email, url, title)
             raise web.seeother(mlogin_url)
     else:
         import petition
         share_obj = petition.share()
         emailform = forms.emailform()
         return share_obj.GET(emailform, form)