def edit(self, id): c.user = meta.Session.query(model.Users).get(id) c.bases_q = [(p.id, p.prefix) for p in meta.Session.query(model.Prefix)] c.password = "" c.user_ids = [p.prefix.id for p in c.user.base] return render('/remarks/edit.mako')
def new(self): c.bases_q = [ (p.id, p.prefix) for p in meta.Session.query(model.Prefix) ] c.user = model.Users() c.user.name = "" # c.user.id = None c.user.real_name = "" c.user_ids = [] c.password = "" return render('/remarks/edit.mako')
def new(self): c.bases_q = [(p.id, p.prefix) for p in meta.Session.query(model.Prefix)] c.user = model.Users() c.user.name = "" # c.user.id = None c.user.real_name = "" c.user_ids = [] c.password = "" return render('/remarks/edit.mako')
def index(self): c.users_q = meta.Session.query(model.Users).order_by('real_name') return render('/remarks/index.mako')
def edit(self, id): c.user = meta.Session.query(model.Users).get(id) c.bases_q = [ (p.id, p.prefix) for p in meta.Session.query(model.Prefix) ] c.password = "" c.user_ids = [ p.prefix.id for p in c.user.base ] return render('/remarks/edit.mako')