def d_items group is_order True settings SLV group po Dictionary objec

1
2
3
4
5
6
def d_items(group, is_order=True):
g = settings.SLV[group]
r = po.Dictionary.objects.filter(slvcode=g)
if is_order:
r = r.order_by('text')
return [(a.code, a.text) for a in r]