Django Part 2 Tutorial Name not defined

I follow what was written in this tutrial (https://docs.djangoproject.com/en/3.0/intro/tutorial02/)
and after typing the command line of q.was_published_recently()
and then I got the error message.

What am I lacking?