陈志辉

陈志辉的博客

他的个人主页  他的博客

[Django] tag和filter的分类

陈志辉  2010年02月24日 星期三 21:16 | 1851次浏览 | 0条评论

给Django的built-in tag和filter分一分类,便于以后查找,按音序排列的手册不是特别不方便。

       Django 的文档按音序列出了内建的 tag filter ,功能相近的条目相距比较远,下面将功能相近的条目列在一起,做为索引,以方便在使用时对比选用合适的 tag filter

       与调试有关

               debug pprint

       页面布局

               block comment extends include ssi

       局部排版

              ljust rjust center unordered_list wordwrap widthratio

       循环与控制语句

               cycle  with  filter  firstof

               for  for ... empty

               if  ifchanged  ifequal  ifnotequal

               default  default_if_none

        简单算法与数据结构

               regroup dictsort dictsortreversed

               first last

               get_digit

               join length make_list length_is random slice wordcount divisibleby add

         格式化字符串

               stringformat

         时间相关

                now timesince timeuntil

                date time

          与 URL 相关

                url iriencode urlencode urlize urlizetrunc

           HTML 相关

                 autoescape escape/safe safeseq escapejs force_escape

                 fix_ampersands linebreaks linebreaksbr linenumbers

                 removetags striptags

                 spaceless

                 templatetag

           字符串操作

                 方便阅读: django.contrib.humanize pluralize filesizeformat floatformat yesno

                 转换大小写: lower upper capfirst title

                 truncatewords truncatewords_html

                 addslashes cut slugify

                 phone2numeric

评论

我的评论:

发表评论

请 登录 后发表评论。还没有在Zeuux哲思注册吗?现在 注册 !

暂时没有评论

Zeuux © 2024

京ICP备05028076号