I added an ImageField called “content” to my model (for Picture in my app “instaton”), and the python validates, and the sql queries that it’s supposed to be calling include
CREATE TABLE "instaton_picture" (
"id" integer NOT NULL PRIMARY KEY,
"name" varchar(100) NOT NULL,
"pub_date" datetime NOT NULL,
"owner_id" integer NOT NULL REFERENCES "instaton_user" ("id"),
"content" varchar(100) NOT NULL
);
where content is obviously a column, at the very least.
However, when I try to access the “Picture” element from my admin page, it gives “no such column: instaton_picture.content”
I believe it’s right, that the database does not include a column called content, but I’m not terribly familiar with checking columns, and therefore I may have done it incorrectly.
I’m also not familiar with django, and especially not with ImageFields, so anything I could be doing wrong, I’m probably doing wrong.
I solved this by resetting
python manage.py reset instatonpython manage.py syncdbI didn’t have any data, but, to be clear, if you do this, you will destroy all of the data that has been placed in the databases for your app. Wasn’t a problem for me. Might be a problem for you. This is probably bad, overall.