zoukankan      html  css  js  c++  java
  • 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
    本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
  • 相关阅读:
    多条件查询测试用例设计方法(1)—Pairwise(转)
    单例饿汉式和饱汉式各自的有缺点(转)
    Intellij IDEA生成JavaDoc(转)
    Linux常用命令分类
    Linux 常用命令
    数据库简单测试
    postman参数为Json数据结构
    WEB测试常见BUG
    APP应用测试技巧
    APP软件半成品测试技巧
  • 原文地址:https://www.cnblogs.com/bluescorpio/p/1625705.html
Copyright © 2011-2022 走看看