Answer the question
In order to leave comments, you need to log in
How to sync database in django?
In general:
1) created the article app through the terminal
2) created the article table in models
3) added the article to INSTALLED_APPS.
4) I enter python manage.py syncdb, the database file appears, but the article table is not there.
What is the problem?
Answer the question
In order to leave comments, you need to log in
Before running migrate (aka syncdb, but it's better to migrate, and forget about syncdb), you need to create migrations:
python manage.py makemigrations
python manage.py migrate
This is sync. Did you migrate? Try to do. This is how I solved a similar problem.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question