Exemplo n.º 1
0
def get_object_by_data29(obj, usr, max_purposes):
    lay = mdTb.get_object_by_data2(obj, obj, True)
    rattings = 0
    for ds1 in lay.topicos:
        for d in ds1.dt:
            for d in max_purposes:
                if TOP.lower() == d.lower():
                    rattings += 1
                    break
    #===============================================
    return [lay, rattings]
Exemplo n.º 2
0
def get_object_by_data223(obj, usr, plus):
    #-----------
    lay = mdTb.get_object_by_data2(obj, obj, True)
    plus_fnd = 0
    for tps in lay.topicos:
        TOP = tps.dt[0]
        for s1 in tps.sinapses:
            DT = s1.nr.dt[0]
            if True:
                plusf = False
                for sd in plus:
                    if TOP == 'need' and DT == sd:
                        plusf = True
                if plusf:
                    plus_fnd += 1
    #-----------
    return [lay, plus_fnd]
Exemplo n.º 3
0
def get_object_by_data23(obj, usr):
    return mdTb.get_object_by_data2(obj, obj, True)