Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Django Migration not detected when models.py inside an folder in app

Folder structure that I kept for my project is:

project:
    commons
        settings.py
        manage.py
    app
        models
            models.py
            __init__.py  ()

__init__.py

    from models import xx

on running ./manage.py makemigrations 

no changes are getting detected.

I have added the app in

installed_apps of settings.py as 'app'.

Can this be achieved in django ?

Advance thanks for your time.

like image 912
Alok Agarwal Avatar asked Jan 04 '23 12:01

Alok Agarwal


1 Answers

python manage.py makemigrations app

it will create the missing migrations folder

or you can manually create the migrations folder in your app with the __init__.py inside

it is skipping over your app because that folder does not exist

like image 149
Incognos Avatar answered Jan 13 '23 08:01

Incognos