• Python中的easy_install安装

    [color=#C0C0C0]来源:http://blog.chinaunix.net/space.php?uid=374372&do=blog&cuid=2201784 冰雪塵埃[/color]Python中的easy_install工具很爽,它的作用类似于Php中的pear,或者Ruby中的gem,或者Perl中的cpan。如果想使用easy_install工具,可能需要先安装setuptools,不过更酷的方法是使用ez_setup.py脚本:[code]wget -q...

  • Ubuntu下使用Eclipse+PyDev插件搭建Python开发环境

    环境:Ubuntu 11.04  自带Python 2.71、首先安装Eclipse[code]sudo apt-get install eclipse[/code]执行如上命令会把相关的依赖库都帮你装好。[separator]2、安装PyDev插件启动Eclipse,在Help菜单中,选择Install New Software···, [img]http://pydev.org/images/install_menu.png[/img]选择Add按钮,...

  • Django中的配置及使用debug_toolbar

    [img][attach]391[/attach][/img]  [url=http://pypi.python.org/pypi/django-debug-toolbar/]django-debug-toolbar[/url]是一个可配置的设置面板显示有关当前各种调试信息的请求/响应和点击时,显示有关该小组的内容更多的细节。为django站点增加调试功能,支持查看django生成的sql语句,及sql的执行时间等,功能强大。[url=https://github.com/r...

  • Django中的内建的模板标签和过滤器(filter)

    Django中的内建的模板标签和过滤器Django Built-in template tags and filters¶https://docs.djangoproject.com/en/dev/ref/templates/builtins/http://djangobook.py3k.cn/appendixF/index.html第四章列出了许多的常用内建模板标签和过滤器。然而,Django自带了更多的内建模板标签及过滤器。 这章附录列出了截止到编写本书时,Django所...

  • Django模板中使用date过滤器 格式化日期

    Django模板中使用date过滤器 格式化日期[color=#C0C0C0]Django template to format the date using the date filter[/color][code] {{scenic.publish|date:"Y年m月d日 H时i分"}} [/code][quote]H 小时 00-23 i 分钟 00-59 Y 年 yyyy 1999 m 月 01-12[/quote] 使用date过滤器...

  • Hello Pinax

    [img][attach]388[/attach][/img][separator][img][attach]389[/attach][/img][img][attach]390[/attach][/img]...

  • Django 开源相册组件介绍 django-photologue

    djang-photologue是一个django的app,用来给web展示图片,功能强大,自动进行图片的大小,亮度什么的转换,生成图片url,图片集支持,水印功能,批量上传,cache,基本上普通WEB图片的功能它都有了.安装方法,见http://simple-is-better.com/news/detail-227...

  • Django prepopulate_from prepopulated_fields

    [code]prepopulated_fields = {'slug': ('aa', 'bb')} [/code]该方法会自动合并aa 和 bb 为aa-bb形式填写到该字段输入框中.  此方法在django 0.96版中以模型中字段参数形式出现,如:[code]models.SlugField(prepopulate_from=("aa", "bb"))...

  • PYTHON正则表达式:re模块

    首先,运行 Python 解释器,导入 re 模块并编译一个 RE: #!python Python 2.2.2 (#1, Feb 10 2003, 12:57:01) >>> import re >>> p = re.compile('[a-z]+') >>> p <_sre.SRE_Pattern object at 80c3c28> 现在,你可以试着用 RE 的 [a-z]+ 去匹配不同的字符串。一个...

  • Try...Excep的用途

    基本上Try...Except...End是進行程式的例外處理Try   //你的程式碼Except   //當你的程式碼處理過程中發生錯誤則執行except以後的這段程式End;...

第 6 页 , 共 8 页