I created 2 model for one to one in Django model
So model codes is very simple
I executed CMD after put the above code python manage.py migrate But I get this error message
I created 2 model for one to one in Django model
So model codes is very simple
I executed CMD after put the above code python manage.py migrate But I get this error message
Always after running create model
in Django apply the below commands in sequence:
python manage.py makemigrations
python manage.py migrate
python mange.py runserver
You should also add the app to INSTALLED_APPS
section of settings.py
file for which you are applying the migrations.
INSTALLED_APPS = [
'myapp',
]
As other mentioned you should copy/paste the error and not add it as a picture. You can edit your question.
As you can see in the error message, you need to create migrations (in the terminal you type: python manage.py makemigrations) then you'll need to run them (with python manage.py migrate) then you'll need to restart your server with (python mange.py runserver). This should solve your issue!