本站首页    管理页面    写新日志    退出


«October 2025»
1234
567891011
12131415161718
19202122232425
262728293031


公告
 本博客在此声明所有文章均为转摘,只做资料收集使用。

我的分类(专题)

日志更新

最新评论

留言板

链接

Blog信息
blog名称:
日志总数:1304
评论数量:2242
留言数量:5
访问次数:7627919
建立时间:2006年5月29日




[Django]使用通用的 views
软件技术

lhwork 发表于 2007/2/3 13:41:50

写一个WEB应用程序是很枯燥的,因为我们要一遍一遍的重复一些模式.在 Django 中,最常用的模式被抽象为 "通用的 views" . 这就使得你不必写代码能使用这些通用的views 展示对象. Django 的通用 views 包括以下内容: 一系列 views 用于实现 list/detail 界面.(比如 Django的 文档索引 和 细节页面).一系列views用于实现 year/month/day 存档页面及相关的细节及 "最新" 页面(比如, Django weblog 的

阅读全文(3397) | 回复(0) | 编辑 | 精华 | 删除
 


[Django]数据库 API 参考
软件技术

lhwork 发表于 2007/2/3 13:40:42

一旦 数据模型 创建完毕, 自然会有存取数据的需要.本文档介绍了由 models 衍生而来的数据库抽象API,及如何创建,得到及更新对象. 贯穿本参考, 我们都会引用下面的民意测验(Poll)应用程序: class Poll(models.Model):
slug = models.SlugField(unique_for_month='pub_date')
question = models.CharField(maxlength=255)
pub_date = models.DateTimeField()
expire_date = models.DateTimeField()

def __repr__(self):
return


阅读全文(3059) | 回复(0) | 编辑 | 精华 | 删除
 


[Django]Apache 基于 Django 用户数据库进行授权
软件技术

lhwork 发表于 2007/2/3 13:39:50

Apache 保持多种授权数据库同步一直有些问题, 你可以配置Apache 直接使用 Django 的 authentication system . 举例来说,你可以: 让 Apache 只对授权用户提供媒体文件服务.授权拥有特定权限的用户访问 Subversion 库.允许特定用户连接到由 mod_dav 创建的 WebDAV share.

阅读全文(3381) | 回复(0) | 编辑 | 精华 | 删除
 


[Django]Django 缓存框架
软件技术

lhwork 发表于 2007/2/3 13:39:02

动态网站的基本功能就在于, 没错, 它是动态的. 用户每次请求一个页面时, Web 服务器都要进行全面的计算 -- 从数据库查询到渲染业务逻辑 -- 直到生成最终展示的页面. 从服务器负载的角度来看,这远比仅仅从文件系统读取一个文件展示要占用的系统资源多得多. 对绝大多数网站应用程序来说, 这点负载不是大问题.绝大部分网站应用不是 washingtonpost.com 或 slashdot.org 这样繁忙; 它们通常是小规模-中等规模的,没有特别高的点击率. 但对大规模高点击率的站点来说, 就应该尽可能的降低WEB服务器的负载. 这正是需要缓存机制的原因. 建立缓存机制的目的就是在适当的时候省略掉计算步骤(再次访问时).下面用伪码来阐述该机制如何运作: 根据 URL 请求, 看看缓存中有没有该页面
如果缓存中有该页面:
返回该页面
否则:
生成该页面
将该页面保存在缓存中(以备下次访问)
返回这

阅读全文(4168) | 回复(0) | 编辑 | 精华 | 删除
 


[Django]http://forum.webfaction.com/viewforum.php?id=19
软件技术

lhwork 发表于 2007/2/3 12:02:10

http://forum.webfaction.com/viewforum.php?id=19

阅读全文(1568) | 回复(0) | 编辑 | 精华 | 删除
 


[Django]http://www.b-list.org/weblog/categories/django
软件技术

lhwork 发表于 2007/2/3 11:58:39

OpenID delegation under Django and lighttpd There’s been lots and lots and lots of buzz around OpenID in the last couple weeks, which makes me happy because OpenID is a pretty ... Read full entry and comments My site is smarter than I am Looking through my stats today, I found an incoming link from a blog w

阅读全文(1522) | 回复(0) | 编辑 | 精华 | 删除
 


[Django]Top 30 Django Tutorials and Articles
软件技术

lhwork 发表于 2007/2/3 11:52:12

As a response to the Top 30 Ruby on Rails Tutorials, I’ve compiled a list of the top 30 Django tutorials and articles. These links are in addition to the great documentation on the Django project site. For those who don’t know, Django is a
阅读全文(2997) | 回复(0) | 编辑 | 精华 | 删除
 


[Django]Using Django's TemplateTags
软件技术

lhwork 发表于 2007/2/3 11:51:15

I've had a number of e-mails about how I include the listing of blog tags and archives by month on the side of my website from people who have obviously built up a blog and now want further integration with their website. Well, it's ultra-simple thanks to a nifty Django feature called template tags. The concept behind template tags is simple - a quick snippet of

阅读全文(1731) | 回复(0) | 编辑 | 精华 | 删除
 


[Django]django with apache2
软件技术

lhwork 发表于 2007/2/3 11:46:21

One thing that I feel is harder than it should be with django is getting it working with Apache2. Sure the built in webserver is nice for development, but there comes a time when you need to step up and use a webserver for development that you can also deploy the site upon. I have used Apache a lot in the past, but recently I have decided to move over to installing everything the Debian way, and this will reflect that. I am goin

阅读全文(2269) | 回复(0) | 编辑 | 精华 | 删除
 


[Django]Windows下Django配置Apache示范设置
软件技术

lhwork 发表于 2007/2/3 11:40:40

[常见错误现象1] 关键词:   

阅读全文(3527) | 回复(0) | 编辑 | 精华 | 删除
 


« 1 2 3 4 5 6 7 8 9 »



站点首页 | 联系我们 | 博客注册 | 博客登陆

Sponsored By W3CHINA
W3CHINA Blog 0.8 Processed in 0.234 second(s), page refreshed 144797753 times.
《全国人大常委会关于维护互联网安全的决定》  《计算机信息网络国际联网安全保护管理办法》
苏ICP备05006046号