Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Unknown command syncdb" running "python manage.py syncdb"

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

python manage.py syncdb

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

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

But when I run

manage.py help

I don`t see any command suspicious to substitute

python manage.py syncdb

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

I would be very grateful if somebody could help me to solve this issue.

Regards and thanks in advance

like image 512
lanz Avatar asked Feb 24 '15 00:02

lanz


People also ask

What does Python manage PY Syncdb do?

syncdb is a command which is executed in django shell to create tables for first time for apps which are added to INSTALLED_APPS of settings.py.

Why does Python manage PY Runserver not work?

The site could be temporarily unavailable or too busy. Try again in a few moments. If you are unable to load any pages, check your computer's network connection. If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.


2 Answers

If you look at the release notes for django 1.9, syncdb command is removed.

Please use migrate instead. Moving forward, the migration commands would be as documented here

Please note that the django-1.9 release is not stable as of today.

Edit: Django 1.9 is stable now

like image 174
karthikr Avatar answered Oct 20 '22 03:10

karthikr


the new django 1.9 has removed "syncdb", run "python manage.py migrate", if you are trying to create a super user, run "python manage.py createsuperuser"

like image 23
Sheikh Arham Avatar answered Oct 20 '22 05:10

Sheikh Arham