Пример #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)