def create_subject(request, subject):
    subject, created = Subjects.objects.get_or_create(name=subject, user=
        request.user, created_by=request.user)
return HttpResponse(simplejson.dumps(list(models.Subject.objects.filter(id=
    subject.id).values()), indent=4))
Django. Get values for all fields in one object