コード例 #1
0
 def data(self, dbconn):
     form = self.form
     ajax = [
         E.oper(E.group(group_info, id=str(r.group_id)),
                E.auth_name(r.auth_name),
                E.lastname(r.lastname),
                E.firstname(r.firstname),
                E.middlename(r.middlename),
                E.email(r.email),
                E.phones(r.phones),
                E.info(r.info),
                id=str(r.oper_id)) for r, group_info in dbconn.query(
                    Distrib_oper, Admin_group.group_info).filter(
                        Distrib_oper.group_id == Admin_group.group_id)
     ]
     return E.ajax(*ajax)
コード例 #2
0
 def data(self, dbconn):
     form = self.form
     group_kwds = dict(((r.group_kw, '1')
                        for r in dbconn.query(Admin_groupkw).filter(
                            Admin_groupkw.group_id == form['group_id'])))
     oper_kwds = dict(((r.group_kw, r.group_include)
                       for r in dbconn.query(Admin_operkw).filter(
                           Admin_operkw.oper_id == form['oper_id'])))
     ajax = []
     for kw, kw_info, kw_help in dbconn.query(
             Urlmapkw_info.url_kw,
             Urlmapkw_info.kw_info,
             Urlmapkw_info.kw_help,
     ).order_by(Urlmapkw_info.url_kw):
         ajax.append(
             E.kw(E.info(kw_info),
                  E.comment(kw_help),
                  E.group(group_kwds.pop(kw, '0')),
                  E.oper(oper_kwds.pop(kw, 'default')),
                  name=kw))
     return E.ajax(*ajax)