Supported Filters
From NDjango
Revision as of 13:23, 28 July 2010 by 217.119.26.210 (Talk)
Most Django default filters have been implemented, except where otherwise stated. Filter implementation is an on-going process, and we will be updating this page as new ones become available.
-
add- implemented, see Django add filter -
addslashes- implemented, see Django addslashes filter -
capfirst- implemented, see Django capfirst filter -
center- implemented, see Django center filter -
cut- implemented, see Django cut filter -
date- implemented, see Django date filter -
default- implemented, see Django default filter -
default_if_none- not implemented, see Django default_if_none filter -
dictsort- implemented, see Django dictsort filter -
dictsortreversed- implemented, see Django dictsortreversed filter -
divisibleby- implemented, see Django divisible by filter -
escape- implemented, see Django escape filter -
escapejs- implemented, see Django escapejs filter -
filesizeformat- not implemented, see Django filesizeformat filter -
first- implemented, see Django first filter -
fix_ampersands - implemented, see Django fix_ampersands filter -
floatformat- implemented, see Django floatformat filter -
force_escape- implemented, see Django force_escape filter -
get_digit- implemented, see Django get_digit filter -
iriencode- not implemented, see Django iriencode filter -
join- implemented, see Django join filter -
last- implemented, see Django last filter -
length- implemented, see Django length filter -
length_is- implemented, see Django length_is filter -
linebreaks- implemented, see Django linebreaks filter -
linebreaksbr- implemented, see Django linebreaksbr filter -
linenumbers- implemented, see Django linenumbers filter -
ljust- implemented, see Django ljust filter -
lower- implemented, see Django lower filter -
make_list- implemented, see Django make_list filter
The python implementation just sends the value to the list constructor. C# looks for an IEnumerable interface implementation, and if it's not implemented, the value is converted to string, and then split to characters. This is useful when passing number as value.
-
phone2numeric- not implemented, see Django phone2numeric filter -
pluralize- not implemented, see Django pluralize filter -
pprint- not implemented, see Django pprint filter -
random- implemented, see Django random filter -
removetags- implemented, see Django removetags filter -
rjust- implemented, see Django rjust filter -
safe- not implemented, see Django safe filter -
safeseq- not implemented, see Django safeseq filter -
slice- implemented, see Django slice filter
In NDjango slice is not special mapped subset of array items, but it's just another array assembled from selected items.
-
slugify- implemented, see Django slugify filter
This filter will ignore non-ASCII symbols while converting to ASCII, whereas python implementation will convert characters like Гј to a simple u.
-
stringformat- not implemented, see Django stringformat filter -
striptags- implemented, see Django striptags filter -
time- implemented, see Django time filter -
timesince- implemented, see Django timesince filter -
timeuntil- implemented, see Django rimeuntil filter -
title- implemented, see Django title filter -
truncatewords- implemented, see Django truncatewords filter -
truncatewords_html- not implemented, see Django truncatewords_html filter -
unordered_list- not implemented, see Django unordered_list filter -
upper- implemented, see Django upper filter -
urlencode- implemented, see Django urlencode filter
This filter uses+instead of%20. Also, encoded hexadecimal sequences are written using lower-case a..f.
-
urlize- implemented, see Django urlize filter -
urlizetrunc- implemented, see Django urlizetrunc filter -
wordcount- implemented, see Django wordcount filter -
wordwrap- implemented, see Django wordwrap filter -
yesno- implemented, see Django yesno filter
At this moment NDjango implementation doesn't recognize null, treating it as False.