Improved docs/templates.txt to add example for slice filter. Thanks for the suggestion, Graham Higgins
git-svn-id: http://code.djangoproject.com/svn/django/trunk@681 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
109a915775
commit
2e8e256fe8
|
@ -676,6 +676,8 @@ Built-in filter reference
|
||||||
http://diveintopython.org/native_data_types/lists.html#odbchelper.list.slice
|
http://diveintopython.org/native_data_types/lists.html#odbchelper.list.slice
|
||||||
for an introduction.
|
for an introduction.
|
||||||
|
|
||||||
|
Example: ``{{ some_list|slice:":2" }}``
|
||||||
|
|
||||||
``slugify``
|
``slugify``
|
||||||
Converts to lowercase, removes non-word characters (alphanumerics and
|
Converts to lowercase, removes non-word characters (alphanumerics and
|
||||||
underscores) and converts spaces to hyphens. Also strips leading and
|
underscores) and converts spaces to hyphens. Also strips leading and
|
||||||
|
|
Loading…
Reference in New Issue