Answer the question
In order to leave comments, you need to log in
Python Django, why not serialize python dictionary to object JSON?
There is such a view:
def lazy_ajax(request):
if request.is_ajax():
news = {}
query = request.GET.get('value', 14)
news['news'] = News.objects.all()[query:]
return JsonResponse(json.dumps(news, ensure_ascii=False), content_type='application/json', safe=False)
TypeError: <QuerySet [<News: В Челябинске эксперты обсудят и т.д.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question