The Definitive Guide to Django的笔记(6)

>我来写笔记

按有用程度 按页码先后 最新笔记

  • irachex
    Chapter 3: Views and URLconfs

    irachex (去冬天的空岛)

    Chapter 3: Views and URLconfs 自己用ASP.NET MVC 2已经很熟练了,所以有关MVC的内容和设计理念都很了解,主要是对语法点的摘抄 感觉作者的命名有些奇怪,不知道是django有某种约定俗成还是怎么。按我的理解,书中的'views'指MVC中的Controller,书中的'templates'指MVC中的View,为了符合自己的习惯,我把这章称为Controllers and URLconfs。不知道之后的章节会不会推翻我的习惯 [update:看到Chapter 5,django这种叫MTV框.. (更多)

    2011-03-10 19:58:23   回应

  • Ryan.K
    CH2

    Ryan.K (杀人于旷野。)

    ** The Django Book *** CH2 > django-admin.py startproject mysite __init__.py: A file required for perthon to treat mysite directory as a package. manage.py: A command-line unity that lets you interact with Django project in various ways. settings.py Settings/configuration for Django project. Urls.py: The urls fot the Django project **** Running the Dev Server > python man... (更多)

    2011-10-05 00:35:55   回应

  • 适兕
    第43页

    适兕 (我开始鄙视我自己!)

    When you create a Template object, the template system compiles the raw template code into an internal, optimized form, ready for rendering. 网站的Template,这是和程序分离的必要组件。 A Python dictionary is a mapping between known keys and variable values. A Context is similar to a diction- ary, but a Context provides additional functionality, Key, Value.多么永恒的组合。 Django... (更多)

    2011-03-17 17:46:03   回应

  • 适兕
    第28页

    适兕 (我开始鄙视我自己!)

    关于页面URL与view的简单描述: just write view functions and map them to URLs via URLconfs. the principle of loose coupling。 这句话的意思是:松散都耦合原理。 URLconfs and views are loose coupling in action. one of Django’s core philosophies is that URLs should be beautiful. it’s strongly suggested that you use raw strings any time you’re defining a regu- lar expression in Python.... (更多)

    2011-03-17 15:33:07   回应

  • irachex
    Chapter 4: Templates

    irachex (去冬天的空岛)

    Chapter 4: Templates 我很喜欢Django的Templates的设计哲学:业务逻辑应该和表现逻辑相对分开 。我们将模板系统视为控制表现及表现相关逻辑的工具,仅此而已。 模板系统不应提供超出此基本目标的功能。像.NET,php等耦合不够松。 Django 模板解析非常快捷。 大部分的解析工作都是在后台通过对简短正则表达式一次性调用来完成。 基于 XML 的模板引擎往往比 Django 模板渲染引擎要慢上几个数量级。 所以使用同一template源渲染... (更多)

    2011-03-10 20:17:14   回应

  • irachex
    Chapter 2: Getting Started

    irachex (去冬天的空岛)

    Chapter 2: Getting Started Django自带对PostgreSQL,SQLite 3,MySQL,Oracle的支持,作者推荐PostgreSQL 因为 一个值得注意的例外是Django的可选GIS支持,它为PostgreSQL提供了强大的功能。)如果你不准备使用一些老旧系统,而且可以自由的选择数据库后端,我们推荐你使用PostgreSQL,它在成本、特性、速度和稳定性方面都做的比较平衡。 /代码内容已省略/ 从子目录中import时,在目.. (更多)

    2011-03-10 19:33:25   回应

笔记是你写在书页留白边上的内容;是你阅读中的批注、摘抄及随感。

笔记必须是自己所写,不欢迎转载。摘抄原文的部分应该进行特殊标明。

The Definitive Guide to Django

>The Definitive Guide to Django