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