Conversion reponse JSON en dictionnaire
This commit is contained in:
parent
15f8fa5e13
commit
4e346d6151
|
@ -1,4 +1,5 @@
|
|||
import os
|
||||
import json
|
||||
from django.shortcuts import render, redirect
|
||||
from django.http import HttpResponse
|
||||
from django.views.decorators.csrf import csrf_exempt
|
||||
|
@ -26,7 +27,10 @@ def wcs(request, slug="", wcs_entry_id=0):
|
|||
#res = ldap_init() #OK
|
||||
#return HttpResponse("Querying w.c.s "+str(res))
|
||||
#return HttpResponse(str(wcs_entry_id))
|
||||
return HttpResponse(str(json_response))
|
||||
#return HttpResponse(str(json.dumps(json_response)))
|
||||
dict = json.loads(json_response)
|
||||
return HttpResponse(str(dict['fields']))
|
||||
#return HttpResponse(str("foo"))
|
||||
|
||||
class LDAPView(View, SingleObjectMixin):
|
||||
def get(self, request, *args, **kwargs):
|
||||
|
|
Reference in New Issue