Reputation: 19
I am following this video tutorial to learn Django: https://www.youtube.com/watch?v=F5mRW0jo-U4&t=909s
I am at the "Your first app component" section where he creates an app and then migrates it. I have followed every one of his steps so far yet I keep getting the no changes detected error when I migrate the app
I have tried researching ways to fix this but it doesn't seem like there is any one right way to do it, it's more of a case by case basis. I've made sure my app is under the install_apps section in the settings. I've tried python manage.py makemigrations but that tells me there are no changes detected. I've tried "python manage.py makemigrations product" to be more specific but it tells me that App 'product' could not be found. Is it in INSTALLED_APPS?" even though it is in installed apps
currently this is my installed apps section:
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'product',
Upvotes: 1
Views: 4811
Reputation: 1
for a proper migrations with 'python manage.py makemigrations' make sure that after creating your model class you save them before you typing any console code very important
Upvotes: 0
Reputation:
after migrate and makemigrations command put your app name like this
python manage.py migrate product
python manage.py makemigrations product
my case it's working
Upvotes: 2
Reputation: 581
You didn't add your app name in 'Installed_Apps' in settings.py. Add this first and then run again.
Upvotes: 0