示例#1
0
 def get_context_data(self, **kwargs):
     return ContextSerializer.as_dict(self.request)
示例#2
0
 def setUp(self):
     response = self.client.get(reverse("django_js_context"))
     self.result = json.loads(ContextSerializer.as_json(response.request))
示例#3
0
 def get_context_data(self, **kwargs):
     context = super(JsInitView, self).get_context_data(**kwargs)
     context['urls'] = urls_as_json()
     context['context'] = ContextSerializer.as_json(self.request)
     return context
示例#4
0
 def get_result(self, request):
     return json.loads(ContextSerializer.as_json(request))
示例#5
0
 def get_result(self, request):
     return ContextSerializer.as_dict(request)
示例#6
0
 def get_result(self, request):
     return json.loads(ContextSerializer.as_json(request))
示例#7
0
 def get_result(self, request):
     return ContextSerializer.as_dict(request)