Пример #1
0
 def POST(self):
     form = user_form()
     if not form.validates():
         groups = get_groups()
         req = web.ctx.req
         req.update({
             'form': form,
             'groups': groups,
             'user_groups': [],
             })
         return render.user_edit(**req)
     data = web.input(groups=[])
     form_data = form.d
     form_data.gids = data.groups
     save_user(-1, form_data)
     raise web.seeother('/user/index')
Пример #2
0
 def POST(self):
     data = web.input()
     save_user(-1, data)
     raise web.seeother('/')