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! While you're at it, check out some resources Treehouse students have shared here.
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
stage1 meet PEEWEE
Now, create a variable named all_challenges. It should select all of the available challenges from the database
from models import Challenge
all_challenges = challenges.select
There are a couple of issues with your code that you need to solve.
First, on line 2 you reference a variable
challenges that doesn't exist. Look at what you imported on line 1 and update line 2 accordingly.
Secondly, if you look at the Teacher's Notes section on http://teamtreehouse.com/library/using-databases-in-python/meet-peewee/queries-are-your-friend you will see the method call you need to use on the class you imported and how to call it.
all_challenges = Challenge.select()