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 trialmichaelangelo owildeberry
18,173 PointsCreate a function named create_challenge() that takes name, language, and steps arguments. Steps should be optional,
Create a function named create_challenge() that takes name, language, and steps arguments. Steps should be optional, so give it a default value of 1. Create a Challenge from the arguments. create_challenge should not return anything. ... how is it missing arguments? please help =)
from models import Challenge
def create_challenge(Challenge):
name = CharField(max_length=100)
language = CharField(max_length=100)
steps = IntegerField(default=1)
8 Answers
shezazr
8,275 Pointsmaybe watch the video again? charField perhaps.. or char_field?
shezazr
8,275 Pointsit specifically says what arguments it expects.. THREE name, language, and steps.. not sure why you are only giving one? :p
shezazr
8,275 PointsI am guessing this part is not clear enough for you ;)
Create a function named create_challenge() that takes name, language, and steps arguments.. You are giving ONE arguement which isnt event correct
michaelangelo owildeberry
18,173 PointsAs in ... def create_challenge(name): ... ? :)
michaelangelo owildeberry
18,173 Pointsnow it says ... 'CharField' is not defined... after I entered....
from models import Challenge def create_challenge(name, language, steps): name = CharField(max_length=100) language = CharField(max_length=100) steps = IntegerField(default=1)
MUZ140170 Privilege Mudzinge
4,346 PointsIts saying CharField is not defined bacause you forgot to import peewee
michaelangelo owildeberry
18,173 PointsWhich exact video? :)
MUZ140348 Sympathy Makururu
10,209 PointsView this for any help please: http://peewee.readthedocs.org/en/latest/peewee/api.html#Model.create
shezazr
8,275 Pointsthe one where he shows how to create a class for database tables perhaps... Come on man, use some initiative here.. do google search.. don't wait for a reply here..