I'm on part 2 of the Django tutorial. This is the error I get when try to add a "choice" in Django administration
DatabaseError: table polls_choice has no column named poll_id
This is what I get when I run the command
python manage.py sql polls
BEGIN;
CREATE TABLE "polls_poll" (
"id" integer NOT NULL PRIMARY KEY,
"question" varchar(200) NOT NULL,
"pub_date" datetime NOT NULL
)
;
CREATE TABLE "polls_choice" (
"id" integer NOT NULL PRIMARY KEY,
"poll_id" integer NOT NULL REFERENCES "polls_poll" ("id"),
"choice_text" varchar(200) NOT NULL,
"votes" integer NOT NULL
)
;
COMMIT;
This is my settings.py
Any help is much appreciated! thank you!