def _store_form_data(self, request, form): """ Stores filter form data in the session :param form: :return: """ request.session[self._get_session_key()] = dict_to_json(form.cleaned_data)
def render_to_json_response(context, **response_kwargs): # returns a JSON response, transforming 'context' to make the payload response_kwargs['content_type'] = 'application/json' return HttpResponse(dict_to_json(context), **response_kwargs)