• PracticalDjangoProjects 笔记二


    在syncdb的时候,Django都做了些什么?

    ADMONITION: WHAT GOES ON DURING SYNCDB

    When you run manage.py syncdb, Django actually does several things in order, and the output on your screen shows each step.
    First, Django looks in each application module listed in INSTALLED_APPS and finds the data models. These are Python classes that define the different types of data the application uses, and Django knows how to automatically generate appropriate CREATE TABLE SQL statements from them.

    Once the database tables have been created, Django looks for, and runs, any application-specific initialization code for each application. In this case, django.contrib.auth includes code that prompts you to create a user account.

    Finally, Django finishes the database setup and installs any initial data you’ve provided. The default set of bundled applications doesn’t use this feature, but later on you’ll see how to supply an initial data file that can kick-start an application by giving it data to work with right away. You won't be providing any initial data with this application, but some of Django's bundled applications do provide data which will be inserted into the database when installed.
    作者:Shane
    出处:http://bluescorpio.cnblogs.com
    本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
  • 相关阅读:
    UVA 10935 约瑟夫环
    分拆素数和 埃氏筛法
    POJ 2349 Prim
    POJ 2031 prim
    POJ 1861 Kruskal
    POJ 2395 Prim
    POJ 1751 Prim
    POJ 2421 Prim
    vuejs开发环境搭建及热更新
    vuejs介绍
  • 原文地址:https://www.cnblogs.com/bluescorpio/p/1625705.html
Copyright © 2020-2023  润新知