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 trialKevin Mai
8,049 PointsHow do I do this question?
Help!
from peewee import *
db = SqliteDatabase('challenges.db')
class clanghe
1 Answer
Stephen Bone
12,359 PointsHi Kevin
So it looks like you've completed the first two challenge tasks and must be stuck on the third?
You need to create a class called Challenge and pass in the Model class so it inherits from it. You then need to give it two fields of the specified type and length.
So your code should look something like below:
class Challenge(Model):
name = CharField(max_length=100)
language = CharField(max_length=100)
Hope it helps!
Stephen
Kevin Mai
8,049 PointsKevin Mai
8,049 PointsThanks you very much:) I got it.