Hello!
Help me please with 3rd part of the tutorial on official Django site.
I’ve finished 2 first lesson with no problem, but in the part 3 on step of writing function “index” Pycharm says that attribute “objects” is unknown.
-------------- My code ----------------
def index(request):
latest_question_list = Question.objects.order_by(‘-pud_date’)[:5]
output = ', '.join([q.question_text for q in latest_question_list])
return output
Message from computer Unresolved attribute reference “objects” for class Question.
How could I fix this?
PS I’m using Pycharm Community version.