def home(request):
context = {
'title': 'Главная'
}
if request.is_ajax():
data = {
"url": "/",
"title": "Главная",
"content": render_to_string("articles/list_ajax.html"),
}
return JsonResponse(data)
return render(request, "articles/feed.html", context)