No idea why this error is popping up. Here are the models I created -
from django.db import models
from django.contrib.auth.models import User
class Shows(m
This is a late response but hopefully someone will find this useful.
I was working on Django REST APIs using DB models. When I added a new column to my existing model(said column already existed in the db table from the start), I received the error shown below: "Unknown column ',column name>' in 'field list'"executed".
What I missed was migrating the model over to the database.
So I executed the following commands from python terminal:
py -3 manage.py makemigrations ---> It will not allow NULL values for the new column added to the model, even though the column is present in the database from the start. So you need to add a default value, mine was an Integerfield, so I updated my column definition in the model as IntegerField(default=0). From here onwards it should be straightforward, if there are no other errors.
py -3 manage.py migrate
py -3 manage.py runserver
After executing these steps when I called my REST APIs they were working properly.