예제 #1
0
파일: people.py 프로젝트: drew/seddit
 def POST(self):
     f = signupform()
     
     if f.validates():
         if(people.personexists(f.d.email)):
             print config.base.layout(view.signup(f, exists=True))
         else:
             password = auth.h(f.d.password)
             people.createperson(f.d.name, f.d.email, password)
             web.seeother('/login/')
     else:
         print config.base.layout(view.signup(f))
예제 #2
0
파일: people.py 프로젝트: drew/seddit
 def POST(self):
     f = loginform()
     
     if f.validates():
         password = auth.h(f.d.password)
         person = people.authenticate(f.d.email, password)
         
         if person:
             auth.setcookie(person)
             web.seeother('/dashboard/')
         else:
             print config.base.layout(view.login(f, error=True))
     else:
         print config.base.layout(view.login(f))