Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.Start your free trial
David Durst784 Points
I believe your valdiator is incorrect, I have submitted multiple answers are correct to this question and they all fail.
I believe your validator is incorrect for this answer. This is my 3rd solution, first one is much more compact see below
def article_list(request): return HttpResponse('There are '+len(Article.objects.all())+' articles')
from django.http import HttpResponse from .models import Article def article_list(request): articles = Article.objects.all() output = 'There are '+len(articles)+' articles.' return HttpResponse(output)
Chris FreemanTreehouse Moderator 68,389 Points
You are very close! The
len() function returns an integer. To concatenate it with a string, convert using