in opbeans/views.py [0:0]
def product_types(request): types = m.ProductType.objects.values('id', 'name') return JsonResponse(list(types), safe=False)