Differences between revisions 1 and 2
Revision 1 as of 2005-12-31 08:13:41
Size: 695
Editor: ZoomQuiet
Comment:
Revision 2 as of 2009-12-25 07:10:31
Size: 699
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 10: Line 10:
attachment::snap-tryDjango-3-0.png {{attachment::snap-tryDjango-3-0.png}}

LiClass3:MTV初步

触及 MTV (Model Template View)

  • 设置 T 目录先!
  • 顺手将国际化的设置查明了

    TIME_ZONE = 'Asia/Shanghai PRC'
    LANGUAGE_CODE = 'zh-cn'
    居然没有Bei Jing!! 唉呀呀...

刷! :snap-tryDjango-3-0.png 立即就有了; 嗯嗯,从现在开始每个应用都要修改三个文件:

  1. apps 中行动脚本
  2. templates 中输出模板
  3. urls.py 访问入口声明
    • 唉呀呀?这么一说...

          (r'^list/$', 'tryfirst.apps.list.index'),
          (r'^li/$', 'tryfirst.apps.list.index'),
      这样一来就可以方便的将相同的活动发布为不同的访问?!
    果然一试就成!赞!!

DjangoLiClass3 (last edited 2009-12-25 07:10:31 by localhost)