Jun 4, 2011

django 及笔记


Django 是一个基于 python 的 web application framework
A web application framework is a software framework that is designed to support the development of dynamic websites, web applications and web services. The framework aims to alleviate the overhead associated with common activities performed in Web development. For example, many frameworks provide libraries for database access, templating frameworks and session management, and they often promote code reuse.
学习资料
入门经典


笔记


视图函数可以带多个参数,参数可以从正则表达式传递
def serve(request, path, document_root=None, show_indexes=False):
(r'^site_media/(?P<path>.*)$', 'django.views.static.serve',{'document_root': settings.STATIC_DOC_ROOT}),

django 执行单独的程序,不包含在服务器里
Windows下只需设置系统变量
DJANGO_SETTINGS_MODULE = settings
然后在工程主目录下执行 python script

0 comments: