Objects are created using shell while using the same command, but object is not created while I post the data using Angular from another port. I didn't get any errors. I have tried by giving values manually also.
def insertCompany_type(request, *args, **kwargs):
if request.is_ajax() and request.method == 'POST':
data = json.loads(request.body)
c_type = data["subject"]
user = request.user
Company_Type.objects.create(user=user, type=c_type)
return HttpResponse('ok')