1. Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
  2. Model: The application data
  3. View: which data is presented
  4. Template: How the data is presented
  5. A project is just a collection of settings organized in a defined folder structure to run an instance of Django and they can be auto generated using a Django-admin command offered by the Django package.
  6. The Django development server: python manage.py runserver
  7. The server runs by default on port 8000 and on the default local host IP 127.0.0.01. you can change this by passing the port as the first argument of the runserver command.
  8. Each one of the Django apps included by default needs at least one database table that will be created when we run a Django management command called syncdb.
  9. A Django app is just a Python package with a certain structure located somewhere in your Python path.
  10. The models essentially represented the database layout with some additional metadata.
  11. The first thing that you should note is that each model is represented by a class that is a subclass of Django.db.models.Model.  the class variables in the models represent the database field.
  12. Each field is an istance of the Field class and tells Django what kind of data each field holds. Each field type can be easily understood by looking at the class names.
  13. The name of each field instance is the name that you will use in your Python code to reference the field as well as the column name in your database.
  14. Syncdb command an be called as many times as you like, it will only create the tables that do not exist in the database.
  15. In Django, a view is just a Python function that accepts a request object as the first parameter and returns a valid HttpResponse Object.
  16. When a Django page is requested the engine looks at the ROOT_URLCONF variable in the settings.py file to know which module is responsible for the routing in this module. Django expects to find a variable called urlpatterns, which is a sequence of tuples with following format: (regular expression, Python callback function [, optional directory])
  17. Django starts matching the requested URL against each regular expression in the list, and as soon as it finds one that matches it calls the callback Python function by passing an HttpRequest object as the first argument.
  18. HttpRequest.method: A string representing the HTTP method used in the request. This is guaranteed to be uppercase.
  19. HttpRequest.GET: a dictionary-like object containing all given HTTP GET parameters
  20. HttpRequest.POST: a dictionary-like object containing all given HTTP POST parameters
  21. HttpRequest.META: a standard dictionary Python dictionary containing all available HTTP headers.
  22. HttpRequest.user: A Django.contrib.auth.models.User object representing the currently logged-in user. If the user isn't currently logged in, the user object will be set to an instance of Django.contrib.auth.models.AnonymousUser
  23. HttpRequest.session: a readable-and-writable dictionary-like object that represents the current session. This is only available if your Django installation has session support activated.

Instant Django 1.5 Application Development Starter的更多相关文章

  1. Mastering Web Application Development with AngularJS 读书笔记-前记

    学习AngularJS的笔记,这个是英文版的,有些地方翻译的很随意,做的笔记不是很详细,用来自勉.觉得写下来要比看能理解的更深入点.有理解不对的地方还请前辈们纠正! 一.关于<Mastering ...

  2. Oracle Fusion Applications (11.1.8) Media Pack and Oracle Application Development Framework 11g (11.1.1.7.2) for Microsoft Windows x64 (64-bit)

    Oracle Fusion Applications (11.1.8) Media Pack for Microsoft Windows x64 (64-bit) 重新搜索   常见问题    提示  ...

  3. Professional Android Application Development

    Professional Android Application Development 访问地址 http://docs.google.com/fileview?id=0ByVHV5sjM4fNNj ...

  4. WEB Application Development Integrator : 应用设置

    1.1.       系统安装 应用 Oracle EBS WEB Application Development Integrator WEB ADI在Oracle EBS 11.5.10.* 版本 ...

  5. 4: 模块化应用程序开发 Modular Application Development Using Prism Library 5.0 for WPF (英汉对照版)

    A modular application is an application that is divided into a set of loosely coupled functional uni ...

  6. Shiny for Interactive Application Development using R(转)

    This slidify-based deck introduces the shiny package from R-Studio and walks one through the develop ...

  7. Mastering Web Application Development with AngularJS 读书笔记(三)

    第一章笔记 (三) 一.Factories factory 方法是创建对象的另一种方式,与service相比更灵活,因为可以注册可任何任意对象创造功能.例如: myMod.factory('notif ...

  8. Patterns for application development with ASP.NET Core

    此文章翻译自 NDC { London } 16-20 January 2017 上, Damian Edwards和David Fowler的演讲,如果翻译不周,请大家指出错误. Logging 生 ...

  9. Mastering Web Application Development with AngularJS 读书笔记(二)

    第一章笔记 (二) 一.scopes的层级和事件系统(the eventing system) 在层级中管理的scopes可以被用做事件总线.AngularJS 允许我们去传播已经命名的事件用一种有效 ...

随机推荐

  1. Happy Java:定义泛型参数的方法

    在平时写代码时,可以自定义泛型类.当使用同一类型的对象时,这是非常有用的,但在实例化类之前,我们不知道它将是哪种类型. 下面让我们定义一个使用泛型参数的方法.首先,在定义一个类用到泛型时,必须使用特殊 ...

  2. 一点做用户画像的人生经验:ID强打通

    1. 背景 在构建精准用户画像时,面临着这样一个问题:日志采集不能成功地收集用户的所有ID,且每条业务线有各自定义的UID用来标识用户,从而造成了用户ID的零碎化.因此,为了做用户标签的整合,用户ID ...

  3. [转]Spring mvc interceptor配置拦截器,没有登录跳到登录页

    <?xml  version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.s ...

  4. C#基础第七天-作业答案-利用面向对象的思想去实现名片-动态添加

    class Card { private string name; public string Name { get { return name; } set { name = value; } } ...

  5. TDD 与 BDD 仅仅是语言描述上的区别么?

    当然不是了,通过这个问题,我顺便跟大家聊聊 ATDD,TDD,BDD3者的区别,方便大家有一个清晰的认识和了解. ATDD: Acceptance Test Driven Development(验收 ...

  6. databus编译: Execution failed for task ':databus-core:databus-core-impl:compileJava'.

    在编译databus的过程中,出现了无法找到jdk的错误: 在/etc/.bashrc和/etc/profile中都配置了JAVA_HOME,依然报错,重启后还是报错,原因的是ubuntu中默认的jd ...

  7. ubuntu 14.04安装mysql数据库

    1. apt-get install mysql-server mysql-client 输入root的密码: 确认root的密码: 2. 连接测试是否成功:mysql –hlocalhost –ur ...

  8. 香蕉派 banana pi BPI-M3 八核开源硬件开发板

     Banana PI BPI-M3 是一款8核高性能单板计算机,Banana PI BPI-M3是一款比树莓派 2 B更强悍的8核Android 5.1产品. Banana PI BPI-M3 兼 ...

  9. IOS开发----生成静态库(.a)

    由于iPhone控件的极度匮乏和自定义组件在重用上的限制,在过去的项目中我们积累了大量的“纯代码”组件——因为IB本身的限制,我们无法把这些组件封装为IB组件库(本来我们想通过分发xib文件的方式重用 ...

  10. 使用Xilinx K7 KC705开发板调试PCIe中的问题【持续更新】

    开发板:Xilinx K7 KC705 软件:ISE14.7 1.由于应用需求,我们要将开发板作为主机端,通过PCIe接口转接板外接一个NVMe PCIe SSD.并由FPGA控制SSD的数据读写. ...