예제 #1
0
 def __init__(self, data):
     HttpResponse.__init__(
         self,
         content=json.dumps(data, cls=LazyEncoder),
         content_type="application/json",
     )
예제 #2
0
 def __init__(self, obj):
     data = json.dumps(obj)
     HttpResponse.__init__(self, data, content_type='application/json')
예제 #3
0
 def __init__(self, obj):
     data = json.dumps(obj)
     HttpResponse.__init__(self, data, content_type='application/json')
예제 #4
0
 def __init__(self, data):
     HttpResponse.__init__(
         self, content=json.dumps(data, cls=LazyEncoder),
         content_type="application/json",
     )
예제 #5
0
 def __init__(self, json_object):
     HttpResponse.__init__(self, json.dumps(json_object), content_type="application/json")
예제 #6
0
 def __init__(self, text, **kwargs):
     return HttpResponse.__init__(self,
                                  text,
                                  content_type='application/json',
                                  **kwargs)
예제 #7
0
 def __init__(self, text, **kwargs):
     return HttpResponse.__init__(self,
                                  text,
                                  content_type='text/plain',
                                  **kwargs)