mirror of
https://github.com/django/django.git
synced 2025-07-30 08:35:23 +00:00
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
1 changed files with 2 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue