A small question about the Python-django database

Source: Internet
Author: User

Recently reading the Django Web Development Guide to learn the Python-django framework, when practicing creating a simple blog, found that the situation and the contents of the book do not match:

1, is currently the new Django version without syncdb This command, replaced by migrate and makemigrations

2, in accordance with the book after the simple blog, the use of the framework to create a simple blog after the save will appear error, prompting operationalerror:no such table:blog_blogpost, because of the database, and errors in the hint can not find Blog_ Blogpost table, guess here is the problem of SQLite, because after the creation of simple blog, related to some like time, title and other data table creation, and in this process is not created, you should use manage.py migrate to update the SQLite database, Problem solving.

A small question about the Python-django database

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.