Django Makemigrations No changed detected

app/models:

from django.db import models
# Create your models here.
class Blogpost(models.Model):
    topic = models.TextField(null=True)
    descrip = models.TextField()
    fd = models.CharField(max_length=150)

->I installed app already

INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'website.apps.SbuiltConfig',
    'rest_framework',
]

->I Register models already

from django.contrib import admin
from models import Blogpost, Blog, testblog
# Register your models here.
admin.site.register(Blogpost)

but it's still no change detected enter image description here

You should mention your app/folder name in the INSTALLED_APPS list.

INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'website.apps.SbuiltConfig',
    'rest_framework',
     
     # If your app's root folder name is Blogpost
    'Blogpost',

     # Or if your app's folder name is website
     'website',
]

then after saving your settings.py, in terminal/shell:

python manage.py makemigrations
python manage.py migrate

you can also mention your app's name explicitly in command:

python manage.py makemigrations Blogpost
python manage.py migrate

if your app's name is website then:

python manage.py makemigrations website
python manage.py migrate
Back to Top