Error:“Unknown command syncdb” running “python syncdb”

0 votes

I want to create the tables of one database called "database1.sqlite", so I run the command:

python syncdb

but when I execute the command I receive the following error:

Unknown command: 'syncdb' Type ' help' for usage.

But when I run help

I don`t see any command suspicious to substitute

python syncdb

Version of Python I use: 3.4.2 Version of Django I use:1.9

Help me to solve this issue.

Aug 5 in Python by kartik
• 27,780 points

1 answer to this question.

0 votes

Hello @kartik,

$python syncdb is deprecated and not supported now. So instead of this follow below instructions..

Whatever model you have created: First run:

$python makemigrations

After running this command you model will be reflected in a migration.

Then you have to run:

$python migrate

Then run server:

$python runserver

Now, your project will run perfectly.

answered Aug 5 by Niroj
• 59,780 points

Related Questions In Python

0 votes
1 answer

Command "python egg_info" failed with error code 1 in C:\Users\Nadeem\AppData\Local\Temp\

Hi@akhtar, I think you are using previous version ...READ MORE

answered May 4 in Python by MD
• 57,600 points
0 votes
0 answers

Error when running pip install: python egg_info"

Hi Guys, I am trying to install pandas ...READ MORE

Sep 21 in Python by Anqi
• 120 points
0 votes
1 answer

How to temporarily disable a foreign key constraint in MySQL?

Hello @kartik, To turn off foreign key constraint ...READ MORE

answered Jun 23 in Python by Niroj
• 59,780 points
0 votes
1 answer

How do I use Django templates without the rest of Django?

Hello @kartik, Let's say you have this important ...READ MORE

answered Jun 23 in Python by Niroj
• 59,780 points
0 votes
1 answer

Error:pip install mysql-python fails with EnvironmentError: mysql_config not found

Hello @kartik, It seems mysql_config is missing on ...READ MORE

answered May 5 in Python by Niroj
• 59,780 points