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 trialDmitry Karamin
10,099 PointsTable can't be created
I use IDE instead of workspace because there is always an error that database is busy or something.
In my IDE everything is fine instead of one thing: When i push "Post!" button there is an error appears about absence of post table. I checked db file - there is not post table where my new post can be uploaded.
so the problem in in line: models.Post.create(user=g.user._get_current_object(), content=form.content.data.strip())
this line created a post itself but where do we create a table post against Post model?
1 Answer
Dmitry Karamin
10,099 Pointsi have sold the question: just right after g.db.connect() i added g.db.create_tables([models.Post], safe=True)