Django manage.py Unknown command: 'syncdb'

I am trying to follow this tutorial , but I am stuck in step 5.

When i do

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

The following error message appears:

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

and here is the output ./manage.py help does not contain the syncdb . How to add it?

Thanks for any help!

Edit:

When I run migrate, I get this error:

"Error creating new content types. Make sure contenttypes" RuntimeError: Error creating new content types. Please make sure contenttypes migrate before trying to migrate applications 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 the '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? 
+45
python django django-syncdb
Feb 11 '15 at 0:41
source share
3 answers

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

+145
Feb 11 '15 at 0:44
source share

Instead of python manage.py syncdb

you should use python manage.py migrate
+10
Apr 12 '16 at 7:32
source share

Run python manage.py makemigrations result below

 Migrations for 'blog': blog/migrations/0001_initial.py: - Create model Blog 

and after that do python manage.py migrate result below

 Operations to perform: Apply all migrations: admin, blog, auth, contenttypes, sessions Running migrations: Applying article.0001_initial... OK 
+5
Sep 24 '16 at 6:42
source share



All Articles