示例#1
0
def qsinger():
    for f in ['lang', 'gender']:
        qval = request.GET.get( f , '').strip()
        if qval:
            break
    singers = systemdb.qsingers( f, qval)
    if len(singers)==0:
        return 'Error: not found'
        #raise HTTPError(code=403)
    return json.dumps( singers, True, False, indent=4)
示例#2
0
 def func( self, d):
     gs=['M', 'F']
     singers = systemdb.qsingers( 'gender', gs[d])
     return { 'rtype':'singer', 'rdata':singers}