My code in Django is:
from django.shortcuts import render
from django.http import HttpResponse
from .models import Post
# Create your views here.
def index(request):
list_posts = Post.objects.order_by('-publish')[:5]
output = ',\n'.join([p.slug for p in list_posts])
return HttpResponse(output)
The view runs without errors, but I do not see the newlines in the browser.