Eve people do not set off firecrackers really quiet a lot, nothing to continue to see the book Django
A few days ago saw the data model has been stuck there, today specifically to replace MySQL into a text database SQLite try
But manage.py sync error was encountered, unable to create the initial database
C:\onedriver\onedrive\python\csvr>python manage.py Sync
Unknown command: ' Sync '
Type ' manage.py help ' for usage.
And then help a little, so that the sync parameters are not even
C:\onedriver\onedrive\python\csvr>
Type ' manage.py help <subcommand> ' for help on a specific subcommand.
Available subcommands:
[Auth]
ChangePassword
Createsuperuser
[Django]
Check
Compilemessages
Createcachetable
Dbshell
Diffsettings
DumpData
Flush
Inspectdb
LoadData
Makemessages
Makemigrations
Migrate
Sendtestemail
Shell
Showmigrations
Sqlflush
Sqlmigrate
Sqlsequencereset
Squashmigrations
Startapp
Startproject
Test
TestServer
[Sessions]
Clearsessions
[Staticfiles]
Collectstatic
Findstatic
Runserver
C:\onedriver\onedrive\python\csvr>
Then went to the Django official website, said after 1.7 canceled syncdb instead of migration instead
pip install Django upgrade [option] I have installed the Pip and the latest version 1.9 of the Django the
Python manage.py makemigrations [App name]
Python manage.py Migrate
After running the data can be inserted
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/7A/CC/wKioL1a4vH6ApWu8AAIZBPRSQjQ183.png "/>
There's data in the database, too.
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/7A/CC/wKiom1a4vCjQvnWkAAKaZb6CQM8618.png "/>
Before the admin directory has been reported no such table:auth_user always thought the module is not registered
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/7A/CC/wKioL1a4vIHD7Cb5AAIBN5407Lo860.png "/>
The user name password can be verified
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/7A/CC/wKioL1a4vIGSSPU3AADVxhVZ8rM158.png "/>
Use Python manage.py createsuperuser to create a super user
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/7A/CC/wKiom1a4vCqCQrbIAAF_IOVtlj8329.png "/>
You can login to the admin module
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/7A/CC/wKiom1a4vCugkhx1AADyUxp3nXw740.png "/>
Increase user set permissions without stress
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/7A/CC/wKioL1a4vIPBjEnuAAFxblSZcmg928.png "/>
This article is from the "Hao (pcdog) blog" blog, make sure to keep this source http://433266.blog.51cto.com/423266/1741418
Django Note manage.py Sync error