Django Note manage.py Sync error

Source: Internet
Author: User
Tags install django pip install django

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.