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. C/C++返回内部静态成员的陷阱

    在我们用C/C++开发的过程中,总是有一个问题会给我们带来苦恼.这个问题就是函数内和函数外代码需要通过一块内存来交互(比如,函数返回字符串),这个问题困扰和很多开发人员.如果你的内存是在函数内栈上分配 ...

  2. 安装 Vbundle 的笔记

    Vbundle 挺好用的,能够很方便管理Vim的一些插件.虽然Vbundle的安装方法看的很简单,但是它的配置却让我弄了很久,现在记录如下,方便后面安装时再出现相同的问题: 我按照这里的官方提示的安装 ...

  3. django官方文档--对静态文件的管理

    一.入门级理解: 在django中对静态文件的管理和模板(template)的思路是一样的.在模板的管理中django是把app用到 到的模板都保存到app目录下的templates子目录中. 静态文 ...

  4. Linux查看磁盘占用率及文件大小

    查看磁盘占用率: 在 df 命令中使用-h选项,以人类易读的格式输出(例如,5K,500M 及 5G) linux中df命令的功能是用来检查linux服务器的文件系统的磁盘空间占用情况.可以利用该命令 ...

  5. Zephir入门 —— 语法篇

    概述 Zephir的语法跟PHP很相似,所以这里不会把官网的文档照搬过来翻译一遍,而是会把一些Zephir相较于PHP比较特别的语法挑出来讲一下.如果想要要完整学习Zephir的语法,没有比官网的文档 ...

  6. IIS配置,权限

      2. cd  C:\Windows\Microsoft.NET\Framework64\v4.0.30319 3. aspnet_regiis.exe -i Chen 19:04:42 %wind ...

  7. https://jzh.12333sh.gov.cn/jzh/

    https://jzh.12333sh.gov.cn/jzh/ https://superuser.com/questions/171917/force-a-program-to-run-withou ...

  8. Erlang中一些错误或者异常的标识

    erlang中错误大体分为四种: 1. 编译错误    2. 逻辑错误    3. 运行时错误    4. 用户代码生成的错误 编译错误,主要是编译器检测出的代码语法错误 逻辑错误,是指程序没有完成预 ...

  9. 【MyBean调试笔记】关于单元的释放顺序

    [概述] DEMO提交人:惠商软件  2508696439 问题描述:MDIConsole, DEMO如果Forms单元引用顺序放在mybean.console.pas文件之后如下图所示时: 创建同一 ...

  10. chrome访问不了go语言中文网

    最近开发转用golang语言,所以经常在晚上搜资料,结果发现go语言中文网,我居然访问不了,刚开始以为是跟go有关,所以被防火长城屏蔽了,结果,偶尔讨论发现办公室的其他两个同事都可以访问,真是奇了怪了 ...