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

Python Django Forms Model Forms Handling Multiple Form Classes

Ian Salmon
Ian Salmon
Courses Plus Student 10,687 Points

Help! IntegrityError at /courses/1/create_question/tf/ NOT NULL

Please help! I've rewatched and checked my work twice and cannot for the life of me figure out what is wrong. When I try to submit a test tf (or mc) question I get the following error:

IntegrityError at /courses/1/create_question/tf/ NOT NULL constraint failed: courses_question.quizs_id

If I follow the Traceback, here is the problem:

"The above exception (NOT NULL constraint failed: courses_question.quizs_id) was the direct cause of the following exception:

views.py in create_question ... question.save()

For what it's worth, I can successfully add questions through /admin. HELP please!