Exemple #1
0
 def POST(self, identity):
     i = web.input(realName=None , identity=None , water=0 , electric=0)
     if i.realName and i.identity and i.water and i.electric:
         u = web.ctx.orm.query(User).filter_by(identity=identity).first()
         u.realName = i.realName
         u.identity = i.identity
         u.water = i.water
         u.electric = i.electric
         d['infos'] = Infos.userinfoUpdateSuccess
         d['user'] = u
     else:
         d['user'] = u
         d['errors'] = Errors.userinfoNotBeNull
         
     return user_render.edit(**d)    
Exemple #2
0
 def GET(self, identity):
     d['identity'] = identity
     d['user'] = web.ctx.orm.query(User).filter_by(identity=identity).first()
     d['infos'] = Infos.identityNotBeModify
     return user_render.edit(**d)