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. MySQL -- 全文检索

    mysql支持全文索引和全文检索--全文索引的索引类型是fulltext--全文索引只能用于innodb表和myisam表,对应的列类型只是支持char.varchar.text--mysql5.7. ...

  2. mysql-1045(28000)错误

    说明:win7系统,已经装过一个安装版的mysql(服务没有启动),然后又安装了一个免安装版的mysql,然后启动该免安装版的mysql后,用root用户无法登陆(因为想着root用户默认密码是空,但 ...

  3. Android逆向之旅---破解&quot;穿靴子的猫&quot;游戏的收费功能

    一.游戏收费分析 游戏收费非常正常的,可是玩游戏最恶心的就是你还没玩就要充值,非常恼火,事实上我不怎么玩游戏,主要是给小孩子们弄,比方如今好多小屁孩们喜欢玩水果忍者这个游戏.可是这个游戏在没有開始玩的 ...

  4. nginx+php-fpm性能参数优化原则

    1.worker_processes 越大越好(一定数量后性能增加不明显)   2.worker_cpu_affinity 所有cpu平分worker_processes 要比每个worker_pro ...

  5. 【转载整理】Hibernater的锁机制

    转载原文:http://www.cnblogs.com/otomedaybreak/archive/2012/01/27/2330008.html 概要:数据库事务,事务并发,hibernate悲观锁 ...

  6. alibaba fastjson TypeReference 通过字符串反射返回对象

    TypeReferenceEditNew Page温绍 edited this page Nov 3, 2017 · 8 revisions1. 基础使用在fastjson中提供了一个用于处理泛型反序 ...

  7. nginx增加ssl支持 - 编译时参数详情列表

    ./configure \ --with-http_ssl_module \ make && make install     nginx编译参数说明如下:   --prefix=&l ...

  8. 【剑道】步法(Ashi Sabaki)

    转自 http://www.openkendo.com/class7.html 步法(Ashi Sabaki)可能算是剑道中最重要的部分.,以下大致做一归纳讲解,希望能够帮助到各位新人的练习. “折足 ...

  9. 【android开发】如何在Linux平台下安装JDK环境

    原文:http://android.eoe.cn/topic/android_sdk Linux平台JDK安装 本文主要描述如何在Linux平台下安装JDK环境.进入网页:http://www.ora ...

  10. CodeForces 493B Vasya and Wrestling 【模拟】

    B. Vasya and Wrestling time limit per test 2 seconds memory limit per test 256 megabytes input stand ...