Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Django manage.py Unknown command: 'syncdb'

I'm trying to follow this tutorial but I'm stuck on the 5th step.

When I execute

[~/Django Projects/netmag$] python manage.py syncdb

I get the following error message :

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

and here is the output of ./manage.py help does not contain syncdb command. How do I add it?

Thanks for any help!

Edit :

When I run migrate, I get this error :

"Error creating new content types. Please make sure contenttypes " RuntimeError: Error creating new content types. Please make sure contenttypes is migrated before trying to migrate apps individually.

in settings.py :

INSTALLED_APPS = [     'django.contrib.admin',     'django.contrib.auth',     'django.contrib.contenttypes',     'django.contrib.sessions',     'django.contrib.messages',     'django.contrib.staticfiles',     'django.contrib.admindocs',     'blog', ] 

Edit 2:

If I remove 'blog', from settings.py :

:~/Django Projects/netmag$ python manage.py migrate blog CommandError: App 'blog' does not have migrations.   :~/Django Projects/netmag$ python manage.py makemigrations blog  App 'blog' could not be found. Is it in INSTALLED_APPS? 
like image 651
jeff Avatar asked Feb 11 '15 00:02

jeff


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.


1 Answers

syncdb command is deprecated in django 1.7. Use the python manage.py migrate instead.

like image 187
catavaran Avatar answered Sep 21 '22 14:09

catavaran